cprover
symex_target_equationt::SSA_stept Class Reference

Single SSA step in the equation. More...

#include <symex_target_equation.h>

+ Collaboration diagram for symex_target_equationt::SSA_stept:

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
 
irep_idt get_property_id () const
 
 SSA_stept (const sourcet &_source, goto_trace_stept::typet _type)
 
void output (const namespacet &ns, std::ostream &out) const
 
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

sourcet source
 
goto_trace_stept::typet type
 
bool hidden =false
 
exprt guard
 
literalt guard_literal
 
ssa_exprt ssa_lhs
 
exprt ssa_full_lhs
 
exprt original_full_lhs
 
exprt ssa_rhs
 
assignment_typet assignment_type
 
exprt cond_expr
 
literalt cond_literal
 
std::string comment
 
irep_idt format_string
 
irep_idt io_id
 
bool formatted =false
 
std::list< exprtio_args
 
std::list< exprtconverted_io_args
 
irep_idt called_function
 
std::vector< exprtssa_function_arguments
 
std::vector< exprtconverted_function_arguments
 
unsigned atomic_section_id =0
 
bool ignore =false
 

Detailed Description

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 literals. 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 244 of file symex_target_equation.h.

Constructor & Destructor Documentation

◆ SSA_stept()

symex_target_equationt::SSA_stept::SSA_stept ( const sourcet &  _source,
goto_trace_stept::typet  _type 
)
inline

Definition at line 322 of file symex_target_equation.h.

Member Function Documentation

◆ get_property_id()

irep_idt symex_target_equationt::SSA_stept::get_property_id ( ) const

Definition at line 975 of file symex_target_equation.cpp.

◆ is_assert()

bool symex_target_equationt::SSA_stept::is_assert ( ) const
inline

Definition at line 251 of file symex_target_equation.h.

◆ is_assignment()

bool symex_target_equationt::SSA_stept::is_assignment ( ) const
inline

Definition at line 255 of file symex_target_equation.h.

◆ is_assume()

bool symex_target_equationt::SSA_stept::is_assume ( ) const
inline

Definition at line 253 of file symex_target_equation.h.

◆ is_atomic_begin()

bool symex_target_equationt::SSA_stept::is_atomic_begin ( ) const
inline

Definition at line 279 of file symex_target_equation.h.

◆ is_atomic_end()

bool symex_target_equationt::SSA_stept::is_atomic_end ( ) const
inline

Definition at line 281 of file symex_target_equation.h.

◆ is_constraint()

bool symex_target_equationt::SSA_stept::is_constraint ( ) const
inline

Definition at line 259 of file symex_target_equation.h.

◆ is_decl()

bool symex_target_equationt::SSA_stept::is_decl ( ) const
inline

Definition at line 265 of file symex_target_equation.h.

◆ is_function_call()

bool symex_target_equationt::SSA_stept::is_function_call ( ) const
inline

Definition at line 267 of file symex_target_equation.h.

◆ is_function_return()

bool symex_target_equationt::SSA_stept::is_function_return ( ) const
inline

Definition at line 269 of file symex_target_equation.h.

◆ is_goto()

bool symex_target_equationt::SSA_stept::is_goto ( ) const
inline

Definition at line 257 of file symex_target_equation.h.

◆ is_location()

bool symex_target_equationt::SSA_stept::is_location ( ) const
inline

Definition at line 261 of file symex_target_equation.h.

◆ is_memory_barrier()

bool symex_target_equationt::SSA_stept::is_memory_barrier ( ) const
inline

Definition at line 277 of file symex_target_equation.h.

◆ is_output()

bool symex_target_equationt::SSA_stept::is_output ( ) const
inline

Definition at line 263 of file symex_target_equation.h.

◆ is_shared_read()

bool symex_target_equationt::SSA_stept::is_shared_read ( ) const
inline

Definition at line 271 of file symex_target_equation.h.

◆ is_shared_write()

bool symex_target_equationt::SSA_stept::is_shared_write ( ) const
inline

Definition at line 273 of file symex_target_equation.h.

◆ is_spawn()

bool symex_target_equationt::SSA_stept::is_spawn ( ) const
inline

Definition at line 275 of file symex_target_equation.h.

◆ output() [1/2]

void symex_target_equationt::SSA_stept::output ( const namespacet ns,
std::ostream &  out 
) const

Definition at line 693 of file symex_target_equation.cpp.

◆ output() [2/2]

void symex_target_equationt::SSA_stept::output ( std::ostream &  out) const

Definition at line 796 of file symex_target_equation.cpp.

◆ validate()

void symex_target_equationt::SSA_stept::validate ( const namespacet ns,
const validation_modet  vm 
) const

Check that the SSA step is well-formed.

Parameters
nsnamespace to lookup identifiers
vmvalidation mode to be used for reporting failures

Definition at line 914 of file symex_target_equation.cpp.

Member Data Documentation

◆ assignment_type

assignment_typet symex_target_equationt::SSA_stept::assignment_type

Definition at line 296 of file symex_target_equation.h.

◆ atomic_section_id

unsigned symex_target_equationt::SSA_stept::atomic_section_id =0

Definition at line 317 of file symex_target_equation.h.

◆ called_function

irep_idt symex_target_equationt::SSA_stept::called_function

Definition at line 310 of file symex_target_equation.h.

◆ comment

std::string symex_target_equationt::SSA_stept::comment

Definition at line 301 of file symex_target_equation.h.

◆ cond_expr

exprt symex_target_equationt::SSA_stept::cond_expr

Definition at line 299 of file symex_target_equation.h.

◆ cond_literal

literalt symex_target_equationt::SSA_stept::cond_literal

Definition at line 300 of file symex_target_equation.h.

◆ converted_function_arguments

std::vector<exprt> symex_target_equationt::SSA_stept::converted_function_arguments

Definition at line 313 of file symex_target_equation.h.

◆ converted_io_args

std::list<exprt> symex_target_equationt::SSA_stept::converted_io_args

Definition at line 307 of file symex_target_equation.h.

◆ format_string

irep_idt symex_target_equationt::SSA_stept::format_string

Definition at line 304 of file symex_target_equation.h.

◆ formatted

bool symex_target_equationt::SSA_stept::formatted =false

Definition at line 305 of file symex_target_equation.h.

◆ guard

exprt symex_target_equationt::SSA_stept::guard

Definition at line 289 of file symex_target_equation.h.

◆ guard_literal

literalt symex_target_equationt::SSA_stept::guard_literal

Definition at line 290 of file symex_target_equation.h.

◆ hidden

bool symex_target_equationt::SSA_stept::hidden =false

Definition at line 287 of file symex_target_equation.h.

◆ ignore

bool symex_target_equationt::SSA_stept::ignore =false

Definition at line 320 of file symex_target_equation.h.

◆ io_args

std::list<exprt> symex_target_equationt::SSA_stept::io_args

Definition at line 306 of file symex_target_equation.h.

◆ io_id

irep_idt symex_target_equationt::SSA_stept::io_id

Definition at line 304 of file symex_target_equation.h.

◆ original_full_lhs

exprt symex_target_equationt::SSA_stept::original_full_lhs

Definition at line 294 of file symex_target_equation.h.

◆ source

sourcet symex_target_equationt::SSA_stept::source

Definition at line 247 of file symex_target_equation.h.

◆ ssa_full_lhs

exprt symex_target_equationt::SSA_stept::ssa_full_lhs

Definition at line 294 of file symex_target_equation.h.

◆ ssa_function_arguments

std::vector<exprt> symex_target_equationt::SSA_stept::ssa_function_arguments

Definition at line 313 of file symex_target_equation.h.

◆ ssa_lhs

ssa_exprt symex_target_equationt::SSA_stept::ssa_lhs

Definition at line 293 of file symex_target_equation.h.

◆ ssa_rhs

exprt symex_target_equationt::SSA_stept::ssa_rhs

Definition at line 295 of file symex_target_equation.h.

◆ type

goto_trace_stept::typet symex_target_equationt::SSA_stept::type

Definition at line 248 of file symex_target_equation.h.


The documentation for this class was generated from the following files: