Definition
A table of bounded-model, conformance and fuzzing §10.9 counts is a table that reports three kinds of automated checking. A bounded model is a finite, simplified description of a system whose states a tool explores up to a stated limit, the bound. Conformance testing runs the same operations on the implementation and on the model and compares the results. Fuzzing runs a program on many generated inputs. Each row gives a count of the work done, such as states explored or executions run, and a result, such as “no violation”.
Where it fits
Main entry: Coverage versus correctness (§10.40).
The coverage versus correctness entry separates two questions: how much of a program the checks exercised, and whether the program’s results were right. A row of this table answers the first question with its count. It answers the second only within limits that the count does not show. Read every row with four questions.
Domain and bound. Which states, operations or inputs could the check reach, and where did it stop?
Properties. Which statements about the system were written down to be checked, for example “no key is used after it is revoked”?
Oracle. What decided that a run passed? It may be an assertion in the code, a sanitizer §10.21 (a checker compiled into the program that reports errors such as a memory access out of bounds), or a comparison with the model. The test oracle §10.5 entry treats this part.
Exclusions. What did the model leave out, such as a loss of power or the largest values of a counter?
The three counts measure different things.
A bounded-model count, such as 4 reachable states §3.21 and 6 transitions (moves from one state to another), describes the model. If the tool explored every reachable state, “no violation” is a proof about the model: no reachable state breaks a checked property. Checking a model by exploring every reachable state is called model checking §3.30. Bounded model checking §3.29 explores only runs of up to a chosen number of steps, so it misses a violation that needs steps.
A conformance count, such as 50 cases, measures the link between the model and the implementation: on each case, the two produced the same observed outputs. That link holds only on the cases run and only for the outputs compared.
A fuzzing count measures work done on the implementation itself: the number of executions, and the number of distinct inputs among them. “No violation” means that no execution triggered the oracle.
A state, a case and an execution are different units. A sum of counts across rows is a number with no meaning.
In an invented fuzzing row, the fuzzer ran 100 executions on 20 distinct inputs. The ratio executions per input does not mean five independent samples of anything. If the program is deterministic, meaning that the same input always produces the same behavior, the repeated executions reproduce behavior already seen and add no evidence about other inputs. If the program is not deterministic, for example because it depends on timing, repeats can reveal new behavior, but still only for the same 20 inputs. The evidence about the variety of inputs is the 20, together with the code coverage §10.18 those 20 inputs reached. A row may also report effort as CPU time §18.1.5, the processor time used, summed over all parallel workers, which differs from wall time, the elapsed time: 8 workers running for 2 hours use CPU-hours in 2 hours of wall time.
All data in this entry’s examples are invented.
Limits and common mistakes
No finite count becomes a guarantee about every input. A million executions without a violation do not show that a failure has a probability below one in a million in real use. The fuzzer’s inputs are not drawn from the inputs the system meets in real use, and a fuzzer usually makes each new input by changing an earlier one, so its inputs are not independent random samples.
A model omits whatever its author left out. A model whose counters run from 0 to 3 says nothing about a fault that needs the value 4. A model without loss of power says nothing about recovery after a loss of power. A complete exploration of such a model is complete only for the model.
Sanitizer silence covers only the errors that the sanitizer detects, on the paths that ran. A program that grants a request it should refuse, without any memory error, passes a sanitizer. Only an oracle that knows the right decision catches a wrong decision, for example a model, or a second implementation compared with the first in differential testing §10.6.
A result about the model carries over to the implementation only through a conformance argument, and conformance shown on 50 cases is evidence about those 50 cases. A table that reports “no violation” for a model, with no conformance row, has said nothing about the code.
A property that was not written down was not checked. “No violation” is silent about every property missing from the list.
Questions answered
What does no violation mean?
“No violation” means that no property written down to be checked was found false in the checking that a row reports: the tool examined the states, cases or inputs it reached, and the oracle, the check that decides whether a run passed, never reported a failure. It is a statement about three named things: the domain explored and its bound, the list of properties, and the oracle. It is not a statement that the system is correct.
Its strength depends on the method. For a bounded model explored completely, it is a proof that no reachable state of the model breaks a checked property; it says nothing about states the model leaves out or about runs longer than the bound. For conformance testing, it means that on each case run, the implementation and the model gave the same observed outputs. For fuzzing, it means that no execution triggered the oracle. If that oracle detects only crashes or memory errors, a result that is wrong without crashing passes. A reader should therefore expect “no violation” to be reported together with the bound, the properties, the oracle and what was left out.
Related entries: Bounded model checking (§3.29), Test oracle (§10.5), Fuzzing (§10.9), Differential testing (§10.6), Model checking (§3.30), Sanitizer (§10.21).