CBMC
|
Functor for symex assignment. More...
#include <symex_assign.h>
Public Member Functions | |
symex_assignt (std::optional< shadow_memoryt > shadow_memory, goto_symex_statet &state, symex_targett::assignment_typet assignment_type, const namespacet &ns, const symex_configt &symex_config, symex_targett &target) | |
void | assign_symbol (const ssa_exprt &lhs, const expr_skeletont &full_lhs, const exprt &rhs, const exprt::operandst &guard) |
Record the assignment of value rhs to variable lhs in state and add the equation to target: lhs#{n+1} == guard ? rhs#{m} : lhs#{n} where {n} and {m} denote the current L2 indexes of lhs and rhs respectively. More... | |
void | assign_rec (const exprt &lhs, const expr_skeletont &full_lhs, const exprt &rhs, exprt::operandst &guard) |
Private Member Functions | |
void | assign_from_struct (const ssa_exprt &lhs, const expr_skeletont &full_lhs, const struct_exprt &rhs, const exprt::operandst &guard) |
Assign a struct expression to a symbol. More... | |
void | assign_non_struct_symbol (const ssa_exprt &lhs, const expr_skeletont &full_lhs, const exprt &rhs, const exprt::operandst &guard) |
template<bool use_update> | |
void | assign_array (const index_exprt &lhs, const expr_skeletont &full_lhs, const exprt &rhs, exprt::operandst &guard) |
template<bool use_update> | |
void | assign_struct_member (const member_exprt &lhs, const expr_skeletont &full_lhs, const exprt &rhs, exprt::operandst &guard) |
void | assign_if (const if_exprt &lhs, const expr_skeletont &full_lhs, const exprt &rhs, exprt::operandst &guard) |
void | assign_typecast (const typecast_exprt &lhs, const expr_skeletont &full_lhs, const exprt &rhs, exprt::operandst &guard) |
void | assign_byte_extract (const byte_extract_exprt &lhs, const expr_skeletont &full_lhs, const exprt &rhs, exprt::operandst &guard) |
Private Attributes | |
std::optional< shadow_memoryt > | shadow_memory |
goto_symex_statet & | state |
symex_targett::assignment_typet | assignment_type |
const namespacet & | ns |
const symex_configt & | symex_config |
symex_targett & | target |
Functor for symex assignment.
Definition at line 27 of file symex_assign.h.
|
inline |
Definition at line 30 of file symex_assign.h.
|
private |
use_update | use update_exprt instead of with_exprt when building expressions that modify components of an array or a struct |
Definition at line 290 of file symex_assign.cpp.
|
private |
Definition at line 406 of file symex_assign.cpp.
|
private |
Assign a struct expression to a symbol.
If symex_assignt::assign_symbol was used then we would assign the whole symbol, before extracting its components, with results like x = {1, 2}; x..field1 = x.field1; x..field2 = x.field2;
This abbreviates the process, directly producing x..field1 = 1; x..field2 = 2;
lhs | symbol to assign (already renamed to L1) |
full_lhs | expression skeleton corresponding to lhs , to be included in the result trace |
rhs | struct expression to assign to lhs |
guard | guard conjuncts that must hold for this assignment to be made |
Definition at line 165 of file symex_assign.cpp.
|
private |
Definition at line 389 of file symex_assign.cpp.
|
private |
Definition at line 190 of file symex_assign.cpp.
void symex_assignt::assign_rec | ( | const exprt & | lhs, |
const expr_skeletont & | full_lhs, | ||
const exprt & | rhs, | ||
exprt::operandst & | guard | ||
) |
Definition at line 58 of file symex_assign.cpp.
|
private |
use_update | use update_exprt instead of with_exprt when building expressions that modify components of an array or a struct |
Definition at line 327 of file symex_assign.cpp.
void symex_assignt::assign_symbol | ( | const ssa_exprt & | lhs, |
const expr_skeletont & | full_lhs, | ||
const exprt & | rhs, | ||
const exprt::operandst & | guard | ||
) |
Record the assignment of value rhs
to variable lhs
in state
and add the equation to target: lhs#{n+1} == guard ? rhs#{m} : lhs#{n}
where {n} and {m} denote the current L2 indexes of lhs and rhs respectively.
Definition at line 263 of file symex_assign.cpp.
|
private |
Definition at line 276 of file symex_assign.cpp.
|
private |
Definition at line 65 of file symex_assign.h.
|
private |
Definition at line 66 of file symex_assign.h.
|
private |
Definition at line 63 of file symex_assign.h.
|
private |
Definition at line 64 of file symex_assign.h.
|
private |
Definition at line 67 of file symex_assign.h.
|
private |
Definition at line 68 of file symex_assign.h.