CBMC
|
Single SSA step in the equation. More...
#include <ssa_step.h>
Public Member Functions | |
bool | is_assert () const |
bool | is_assume () const |
bool | is_assignment () const |
bool | is_goto () const |
bool | is_constraint () const |
bool | is_location () const |
bool | is_output () const |
bool | is_decl () const |
bool | is_function_call () const |
bool | is_function_return () const |
bool | is_shared_read () const |
bool | is_shared_write () const |
bool | is_spawn () const |
bool | is_memory_barrier () const |
bool | is_atomic_begin () const |
bool | is_atomic_end () const |
exprt | get_ssa_expr () const |
SSA_stept (const symex_targett::sourcet &_source, goto_trace_stept::typet _type) | |
void | output (std::ostream &out) const |
void | validate (const namespacet &ns, const validation_modet vm) const |
Check that the SSA step is well-formed. More... | |
Public Attributes | |
symex_targett::sourcet | source |
goto_trace_stept::typet | type |
bool | hidden = false |
exprt | guard |
exprt | guard_handle |
ssa_exprt | ssa_lhs |
exprt | ssa_full_lhs |
exprt | original_full_lhs |
exprt | ssa_rhs |
symex_targett::assignment_typet | assignment_type |
exprt | cond_expr |
exprt | cond_handle |
std::string | comment |
irep_idt | property_id |
irep_idt | format_string |
irep_idt | io_id |
bool | formatted = false |
std::list< exprt > | io_args |
std::list< exprt > | converted_io_args |
irep_idt | called_function |
std::vector< exprt > | ssa_function_arguments |
std::vector< exprt > | converted_function_arguments |
unsigned | atomic_section_id = 0 |
bool | ignore = false |
bool | converted = false |
Single SSA step in the equation.
Its type
is defined as goto_trace_stept::typet. Every SSA step has a source
to identify its origin in the input GOTO program and a guard
expression which holds the path condition required to reach this step: they limit the scope of this step.
SSA steps that represent assignments and declarations also store the left- and right-hand sides of the assignment. The left-hand side ssa_lhs
is required to be of type ssa_exprt: in SSA form, variables are only assigned once, see Static Single Assignment (SSA) Form. To achieve that, we annotate the original name with 3 types of levels, see ssa_exprt. The assignment step also represents the left-hand side in two other full forms: ssa_full_lhs
and original_full_lhs
, which store the original expressions from the input GOTO program before removing array indexes, pointers, etc. The ssa_full_lhs
uses the level-annotated names.
Assumptions, assertions, goto steps, and constraints have cond_expr
which represent the condition guarding this step, i.e. what must hold for this step to be taken. Both guard
and cond_expr
will later be translated into verification condition for the SAT/SMT solver (or some other decision procedure), to be referred by their respective handles. Constraints usually arise from external conditions, such as memory models or partial orders: they represent assumptions with global effect.
Function calls store called_function
name as well as a vector of arguments ssa_function_arguments
. The converted
version of a variable will contain its version for the SAT/SMT conversion.
Definition at line 46 of file ssa_step.h.
|
inline |
Definition at line 177 of file ssa_step.h.
|
inline |
Definition at line 151 of file ssa_step.h.
|
inline |
Definition at line 52 of file ssa_step.h.
|
inline |
Definition at line 62 of file ssa_step.h.
|
inline |
Definition at line 57 of file ssa_step.h.
|
inline |
Definition at line 122 of file ssa_step.h.
|
inline |
Definition at line 127 of file ssa_step.h.
|
inline |
Definition at line 72 of file ssa_step.h.
|
inline |
Definition at line 87 of file ssa_step.h.
|
inline |
Definition at line 92 of file ssa_step.h.
|
inline |
Definition at line 97 of file ssa_step.h.
|
inline |
Definition at line 67 of file ssa_step.h.
|
inline |
Definition at line 77 of file ssa_step.h.
|
inline |
Definition at line 117 of file ssa_step.h.
|
inline |
Definition at line 82 of file ssa_step.h.
|
inline |
Definition at line 102 of file ssa_step.h.
|
inline |
Definition at line 107 of file ssa_step.h.
|
inline |
Definition at line 112 of file ssa_step.h.
void SSA_stept::output | ( | std::ostream & | out | ) | const |
Definition at line 14 of file ssa_step.cpp.
void SSA_stept::validate | ( | const namespacet & | ns, |
const validation_modet | vm | ||
) | const |
Check that the SSA step is well-formed.
ns | namespace to lookup identifiers |
vm | validation mode to be used for reporting failures |
Definition at line 129 of file ssa_step.cpp.
symex_targett::assignment_typet SSA_stept::assignment_type |
Definition at line 142 of file ssa_step.h.
unsigned SSA_stept::atomic_section_id = 0 |
Definition at line 169 of file ssa_step.h.
irep_idt SSA_stept::called_function |
Definition at line 163 of file ssa_step.h.
std::string SSA_stept::comment |
Definition at line 147 of file ssa_step.h.
exprt SSA_stept::cond_expr |
Definition at line 145 of file ssa_step.h.
exprt SSA_stept::cond_handle |
Definition at line 146 of file ssa_step.h.
bool SSA_stept::converted = false |
Definition at line 175 of file ssa_step.h.
std::vector<exprt> SSA_stept::converted_function_arguments |
Definition at line 166 of file ssa_step.h.
std::list<exprt> SSA_stept::converted_io_args |
Definition at line 160 of file ssa_step.h.
irep_idt SSA_stept::format_string |
Definition at line 157 of file ssa_step.h.
bool SSA_stept::formatted = false |
Definition at line 158 of file ssa_step.h.
exprt SSA_stept::guard |
Definition at line 135 of file ssa_step.h.
exprt SSA_stept::guard_handle |
Definition at line 136 of file ssa_step.h.
bool SSA_stept::hidden = false |
Definition at line 133 of file ssa_step.h.
bool SSA_stept::ignore = false |
Definition at line 172 of file ssa_step.h.
std::list<exprt> SSA_stept::io_args |
Definition at line 159 of file ssa_step.h.
irep_idt SSA_stept::io_id |
Definition at line 157 of file ssa_step.h.
exprt SSA_stept::original_full_lhs |
Definition at line 140 of file ssa_step.h.
irep_idt SSA_stept::property_id |
Definition at line 149 of file ssa_step.h.
symex_targett::sourcet SSA_stept::source |
Definition at line 49 of file ssa_step.h.
exprt SSA_stept::ssa_full_lhs |
Definition at line 140 of file ssa_step.h.
std::vector<exprt> SSA_stept::ssa_function_arguments |
Definition at line 166 of file ssa_step.h.
ssa_exprt SSA_stept::ssa_lhs |
Definition at line 139 of file ssa_step.h.
exprt SSA_stept::ssa_rhs |
Definition at line 141 of file ssa_step.h.
goto_trace_stept::typet SSA_stept::type |
Definition at line 50 of file ssa_step.h.