Replies: 1 comment
|
The context bound is not a limit on the number of counterexamples. It is the maximum number of thread context switches explored in a schedule. Also, multi-property does not mean that ESBMC will enumerate every violating interleaving. With the default search behavior, ESBMC can stop after it finds a failing trace, and assertions after the first failure on that trace are not reached. The manual documents all-runs as the option that keeps exploring after a counterexample: https://github.com/esbmc/esbmc/blob/master/docs/manual.tex For a diagnostic run, try: I would also remove result-only while diagnosing so the scheduling and property information is visible. One more issue in the sample is that data is read and written by both threads without synchronization. That is a C data race, independent of the assertion count. If this is meant to be a valid concurrent program, protect the shared object with a mutex or use an appropriate atomic type. If the race itself is what you want to analyze, enable the data-race checking option as a separate experiment. |
Uh oh!
There was an error while loading. Please reload this page.
In the program below, I get counterexamples for either "a: 10" or "b: 4", but none of the other properties, and I get only one counterexample per verification run. I am able to toggle between "a: 10" and "b: 4" failing by including or not including some extraneous .h files (I'm hypothesizing that it's tweaking the random seed.)
The output from ESBMC indicates that it has covered all possible interleavings, and increasing
--context-bounddid not change the number of interleavings that were explored.I had expected that I would get a counterexample for each assertion, because for each assertion there is a schedule where the other task could execute between the assignment to
dataand the assertion. Adding some extraneous assignments between the assignment todataand the assertion (e.g.++dummy), did not change the behaviour.Am I misunderstanding how interleaving is done?
-mark
Revision:
70c01619e7Command line:
esbmc --multi-property --result-only --context-bound=50 dinphil-2.cAll reactions