You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit introduces the --paths flag to CBMC, which makes CBMC
model-check each individual path of the program rather than merging
paths and model-checking the entire program.
The overall strategy involves allowing the "state" of symbolic
execution---i.e., a pair of goto_symex_statet and symex_target_equationt
---to be saved during an execution, and for an execution to be resumed
from a saved pair. By saving the state at every branch point and
disabling path merging, symbolic execution only runs along one path but
populates a worklist of saved states that should be executed later. At
the top level, CBMC or JBMC loops while the worklist of saved states is
non-empty, creating a new bmct object to resume executing each saved
path.
This commit includes the following supporting changes:
- goto_symex_statet now owns a symbol table, separate from the one
supporting the goto_program, which is used for dynamically created
objects during symbolic execution. goto_symex was previously using a
symbol table that was passed to it by reference for this purpose, but
that symbol table is needed when resuming symbolic execution from a
saved point and so ought properly to be part of the symbolic execution
state.
- goto_symex_statet now has a pointer to a symex_target_equationt, which
can be updated with an equation from a previously-saved symbolic
execution run. While equations are also conceptually part of the state
of symbolic execution, they are heavily used after symbolic execution
has completed (and the symex state has been deallocated) and so the
equation is not owned by the state. An explicit copy constructor has
been added to goto_symex_statet that initializes the equation member,
so that symbolic execution can proceed either with an empty equation
or with an equation that was earlier saved.
- goto_symex_statet no longer has a pointer to a dirtyt, as this was
hindering it from being copied.
0 commit comments