Symbolic Model Checking
Overview
Section titled “Overview”The current nightly builds of ProB support different symbolic model checking algorithms:
- Bounded Model Checking (BMC),
- k-Induction, and
- different Variants of the IC3 algorithm.
As opposed to constraint-based checking, these algorithms find counterexamples which are reachable from the INITIALISATION. As opposed to ordinary model checking, they do not build up the state space explicitly, e.g., they do not compute all possible solutions for parameters and constants. This can be useful when the out-degree of the state-space is very high, i.e., when there are many possible solutions for the constants, the initialisation and/or the individual operations and their parameters.
In addition to the algorithms explained here, BMC*, a bounded model checking algorithm based on a different technique is available in Prob. See its wiki page for details.
Take the following example:
MACHINE VerySimpleCounterWrongCONSTANTS limPROPERTIES lim = 2**25VARIABLES ctINVARIANT ct:INTEGER & ct < limINITIALISATION ct::0..(lim-1)OPERATIONS Inc(i) = PRE i:1..1000 & ct + i <= lim THEN ct := ct+i END; Reset = PRE ct = lim THEN ct := 0 ENDENDThe ProB model checker will here run for a very long time before uncovering the error that occurs when ct is set to lim. If you run the TLC backend you will get the error message “Too many possible next states for the last state in the trace.”
However, for the symbolic model checking techniques this is less of a problem. You can use them via command-line version of ProB as follows:
$ probcli VerySimpleCounterWrong.mch -symbolic_model_check bmcK = 0solve/2: result of prob: contradiction_foundK = 1solve/2: result of prob: contradiction_foundK = 2solve/2: result of prob: contradiction_foundK = 3solve/2: result of prob: contradiction_foundK = 4solve/2: result of prob: solutionsuccessor_found(0) --> INITIALISATION(0)successor_found(1) --> Incsuccessor_found(2) --> Incsuccessor_found(3) --> Incsuccessor_found(4) --> Inc! *** error occurred ***! invariant_violationInstead of “bmc” you can use “kinduction” and “ic3” as command line arguments in order to use the other algorithms.
The algorithms are also available from within ProB Tcl/Tk. They can be found inside the “Symbolic Model Checking” sub-menu of the “Analyse” menu.
More details
Section titled “More details”A paper describing the symbolic model checking algorithms and how they are applied to B and Event-B machines has been submitted to ABZ 2016.