Central data structure: state. More...
#include <goto_symex_state.h>
symex_target member. expr. invalid (or a failed symbol) to the value_set if ssa is a pointer, ensure that level2 index of symbols in fields of ssa are at 1, and rename ssa to level 2. lvalue is a read-only object, such as the null object. level. Central data structure: state.
The state is a persistent data structure that symex maintains as it executes. As we walk over each instruction, state will be updated reflecting their effects until a branch occurs (such as an if), where parts of the state will be copied into a goto_statet, stored in a map for later reference and then merged again (via merge_goto) once it reaches a control-flow graph convergence.
Definition at line 41 of file goto_symex_state.h.
Definition at line 179 of file goto_symex_state.h.
Definition at line 180 of file goto_symex_state.h.
Definition at line 136 of file goto_symex_state.h.
| Enumerator | |
|---|---|
| NOT_SHARED | |
| IN_ATOMIC_SECTION | |
| SHARED | |
Definition at line 201 of file goto_symex_state.h.
Definition at line 31 of file goto_symex_state.cpp.
Fake "copy constructor" that initializes the symex_target member.
Definition at line 54 of file goto_symex_state.h.
Dangerous, do not use.
Copying a state S1 to S2 risks S2 pointing to a deallocated symex_target_equationt if S1 (and the symex_target_equationt that its symex_target member points to) go out of scope. If your class has a goto_symex_statet member and needs a copy constructor, copy instances of this class using the public two-argument copy constructor constructor to ensure that the copy points to an allocated symex_target_equationt. The two-argument copy constructor uses this private copy constructor as a delegate.
Instantiate the object expr.
An instance of an object is an L1-renamed SSA expression such that its L1-index has not previously been used.
Definition at line 804 of file goto_symex_state.cpp.
Definition at line 78 of file goto_symex_state.cpp.
Definition at line 147 of file goto_symex_state.h.
Definition at line 153 of file goto_symex_state.h.
Add invalid (or a failed symbol) to the value_set if ssa is a pointer, ensure that level2 index of symbols in fields of ssa are at 1, and rename ssa to level 2.
Definition at line 829 of file goto_symex_state.cpp.
Drops an L1 name from the local L2 map.
Definition at line 233 of file goto_symex_state.h.
Drops an L1 name from the local L2 map.
Definition at line 239 of file goto_symex_state.h.
Definition at line 244 of file goto_symex_state.h.
Definition at line 141 of file goto_symex_state.h.
Returns true if lvalue is a read-only object, such as the null object.
Definition at line 250 of file goto_symex_state.h.
Definition at line 305 of file goto_symex_state.cpp.
thread encoding
Definition at line 376 of file goto_symex_state.cpp.
thread encoding
expr is shared between threads Definition at line 542 of file goto_symex_state.cpp.
Dumps the current state of symex, printing the function name and location number for each stack frame in the currently active thread.
This is for use from the debugger or in debug code; please don't delete it just because it isn't called at present.
Definition at line 783 of file goto_symex_state.cpp.
Rewrites symbol expressions in exprt, applying a suffix to each symbol reflecting its most recent version, which differs depending on which level you requested.
Each level also updates its predecessors, so a L1 rename will update L1 and L0. A L2 will update L2, L1 and L0.
What happens at each level: L0. Applies a suffix giving the current thread number. (Excludes guards, dynamic objects and anything not considered thread-local) L1. Applies a suffix giving the current loop iteration or recursive function invocation. L2. Applies a suffix giving the generation of this variable.
Renaming will not increment any of these values, just update the expression with them. Levels matter when reading a variable, for example: reading the value of x really means reading the particular x symbol for this thread (L0 renaming, if applicable), the most recent instance of x (L1 renaming), and the most recent write to x (L2 renaming).
The above example after being renamed could look like this: 'x!0@0#42'. That states it's the 42nd generation of this variable, on the first thread, in the first frame.
A full explanation of SSA (which is why we do this renaming) is in the SSA section of background-concepts.md.
Definition at line 163 of file goto_symex_state.cpp.
Definition at line 700 of file goto_symex_state.cpp.
Definition at line 571 of file goto_symex_state.cpp.
Version of rename which is specialized for SSA exprt.
Ensure rename_ssa gets compiled for L0.
Implementation only exists for level L0 and L1.
Definition at line 144 of file goto_symex_state.cpp.
Definition at line 514 of file goto_symex_state.cpp.
Definition at line 215 of file goto_symex_state.h.
Definition at line 122 of file goto_symex_state.h.
Definition at line 263 of file goto_symex_state.h.
Definition at line 70 of file goto_symex_state.h.
This state is saved, with the PC pointing to the target of a GOTO.
Definition at line 220 of file goto_symex_state.h.
This state is saved, with the PC pointing to the next instruction of a GOTO.
Definition at line 224 of file goto_symex_state.h.
Definition at line 137 of file goto_symex_state.h.
Definition at line 262 of file goto_symex_state.h.
Definition at line 73 of file goto_symex_state.h.
Definition at line 181 of file goto_symex_state.h.
Definition at line 213 of file goto_symex_state.h.
Definition at line 230 of file goto_symex_state.h.
Should the additional validation checks be run?
Definition at line 227 of file goto_symex_state.h.
Definition at line 217 of file goto_symex_state.h.
Definition at line 124 of file goto_symex_state.h.
Definition at line 62 of file goto_symex_state.h.
contains symbols that are minted during symbolic execution, such as dynamically created objects etc.
The names in this table are needed for error traces even after symbolic execution has finished.
Definition at line 67 of file goto_symex_state.h.
Definition at line 71 of file goto_symex_state.h.
Definition at line 199 of file goto_symex_state.h.
Definition at line 229 of file goto_symex_state.h.
Definition at line 183 of file goto_symex_state.h.