Method and apparatus for expression coverage
Original Publication Date: 2002-Oct-29
Included in the Prior Art Database: 2003-Jun-21
Problem Many code coverage models are readily available (e.g., http://www.bullseye.com/webCoverage.html). Currently-used practical coverage models (such as statement coverage, and decision coverage) are weak in that 100% coverage can easily be reached, yet 100% coverage does not guarantee high-quality testing. Other models, such as path coverage and define-use coverage are impractical, in that reaching high coverage or even defining the set of legal coverage tasks is very hard. Solution We propose here two new types of coverage models, expression coverage and enumerated expression coverage. These models are both practical and stronger than existing practical models: Expression coverage: We want to see that every expression in the program gets more than one value. Enumerated expression coverage: We want to see that every expression in the program gets more than one value, if it is a normal expression, and all the values it can get, if it is enumerated. An enumerated expression is an expression in which the result control flow is conditional on the expression (if, case), or an enumerated variable or function of a single enumerated variable, or the expression is assigned to enumerated type variable. The enumerated expression coverage model includes decision coverage.