CBMC
|
Container for data that varies per program point, e.g. More...
#include <goto_state.h>
Public Member Functions | |
const symex_level2t & | get_level2 () const |
void | output_propagation_map (std::ostream &) |
Print the constant propagation map in a human-friendly format. More... | |
goto_statet ()=delete | |
Constructors. More... | |
goto_statet & | operator= (const goto_statet &other)=delete |
goto_statet & | operator= (goto_statet &&other)=default |
goto_statet (const goto_statet &other)=default | |
goto_statet (goto_statet &&other)=default | |
goto_statet (guard_managert &guard_manager) | |
void | apply_condition (const exprt &condition, const goto_symex_statet &previous_state, const namespacet &ns) |
Given a condition that must hold on this path, propagate as much knowledge as possible. More... | |
Public Attributes | |
unsigned | depth = 0 |
Distance from entry. More... | |
sharing_mapt< exprt, symbol_exprt, false, irep_hash > | dereference_cache |
This is used for eliminating repeated complicated dereferences. More... | |
value_sett | value_set |
Uses level 1 names, and is used to do dereferencing. More... | |
guardt | guard |
bool | reachable |
Is this code reachable? If not we can take shortcuts such as not entering function calls, but we still conduct guard arithmetic as usual. More... | |
sharing_mapt< irep_idt, exprt > | propagation |
unsigned | atomic_section_id = 0 |
Threads. More... | |
Protected Attributes | |
symex_level2t | level2 |
Container for data that varies per program point, e.g.
the constant propagator state, when state needs to branch. This is copied out of goto_symex_statet at a control-flow fork and then back into it at a control-flow merge.
Definition at line 31 of file goto_state.h.
|
delete |
Constructors.
|
default |
|
default |
|
inlineexplicit |
Definition at line 85 of file goto_state.h.
void goto_statet::apply_condition | ( | const exprt & | condition, |
const goto_symex_statet & | previous_state, | ||
const namespacet & | ns | ||
) |
Given a condition that must hold on this path, propagate as much knowledge as possible.
For example, if the condition is (x == 5), whether that's an assumption or a GOTO condition that we just passed through, we can propagate the constant '5' for future 'x' references. If the condition is (y == &o1) then we can use that to populate the value set.
condition | condition that must hold on this path. Expected to already be L2-renamed. |
previous_state | currently active state, not necessarily the same as *this. For a GOTO instruction this is the state immediately preceding the branch while *this is the state that will be used on the taken- or not-taken path. For an ASSUME instruction previous_state and *this are equal. |
ns | global namespace |
Definition at line 43 of file goto_state.cpp.
|
inline |
Definition at line 45 of file goto_state.h.
|
delete |
|
default |
void goto_statet::output_propagation_map | ( | std::ostream & | out | ) |
Print the constant propagation map in a human-friendly format.
This is primarily for use from the debugger; please don't delete me just because there aren't any current callers.
Definition at line 19 of file goto_state.cpp.
unsigned goto_statet::atomic_section_id = 0 |
Threads.
Definition at line 76 of file goto_state.h.
unsigned goto_statet::depth = 0 |
Distance from entry.
Definition at line 35 of file goto_state.h.
sharing_mapt<exprt, symbol_exprt, false, irep_hash> goto_statet::dereference_cache |
This is used for eliminating repeated complicated dereferences.
Definition at line 43 of file goto_state.h.
guardt goto_statet::guard |
Definition at line 58 of file goto_state.h.
|
protected |
Definition at line 38 of file goto_state.h.
sharing_mapt<irep_idt, exprt> goto_statet::propagation |
Definition at line 71 of file goto_state.h.
bool goto_statet::reachable |
Is this code reachable? If not we can take shortcuts such as not entering function calls, but we still conduct guard arithmetic as usual.
Definition at line 62 of file goto_state.h.
value_sett goto_statet::value_set |
Uses level 1 names, and is used to do dereferencing.
Definition at line 51 of file goto_state.h.