Coverage
The Coverage tab generates minimal test vectors that achieve a selected structural coverage criterion for the active expression.
Overview
Coverage analysis generates a small set of input assignments (test vectors) that, when exercised, guarantee that a particular structural criterion is met. This is used in testing to derive a test suite from a logic expression.
Coverage strategies
| Strategy | Description |
|---|---|
| Branch | Each condition (atom) takes both true and false values in at least one test. Also called decision coverage. |
| MC/DC | Modified Condition/Decision Coverage. Each condition independently affects the outcome. Required by DO-178C and similar aerospace standards. Produces a compact test set. |
| Pairwise | Every pair of conditions takes all four combinations (T/T, T/F, F/T, F/F) in at least one test. Good for finding interaction defects. |
| Prime Implicant | Each prime implicant of the expression is covered by at least one test. Based on the QM simplification output. |
Generating test vectors
- Select a coverage strategy from the dropdown.
- Click Generate.
- The test vector table populates with the minimum set of inputs that achieve the criterion.
Reading the table
Each row is one test vector — one assignment of all input variables. Columns are the input variables (0 or 1 for booleans; predicate bucket labels for typed variables). The last column shows the expected output (0 or 1).
A summary line above the table shows how many vectors were generated and which criterion they cover.
Exporting test code
The Coverage panel includes code export buttons. Click a language tab (JavaScript, Python, C, SQL) and then Copy to get the test vectors as runnable test code or parameter tables in that language.
Limitations
- Coverage is computed for the active binding's boolean atoms. Predicate atoms are treated as independent booleans — the coverage generator doesn't know that
age < 18andage >= 18are mutually exclusive. - There is no Karnaugh map renderer. Prime implicants are listed textually, not visually on a K-map grid.
- For large expressions, MC/DC vector generation can be slow.