Go to the documentation of this file.
28 const irep_idt identifier=
"$stack_depth";
32 new_symbol.
name=identifier;
64 const std::size_t i_depth,
65 const exprt &max_depth)
75 assert_ins->source_location_nonconst().set_comment(
77 assert_ins->source_location_nonconst().set_property_class(
"stack-depth");
86 assert(last->is_end_function());
97 const std::size_t depth,
107 gf_entry.second.body_available() &&
111 stack_depth(gf_entry.second.body, sym, depth, depth_expr);
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
const symbolt & lookup_ref(const irep_idt &name) const
Find a symbol in the symbol table for read-only access.
#define CHECK_RETURN(CONDITION)
typet type
Type of symbol.
The plus expression Associativity is not specified.
Base class for all expressions.
irep_idt base_name
Base (non-scoped) name.
std::string to_string(const string_not_contains_constraintt &expr)
Used for debug printing.
function_mapt function_map
Expression to hold a symbol (variable)
static instructiont make_assignment(const code_assignt &_code, const source_locationt &l=source_locationt::nil())
Create an assignment instruction.
Fixed-width bit-vector with unsigned binary interpretation.
irep_idt pretty_name
Language-specific display name.
void goto_convert(const codet &code, symbol_table_baset &symbol_table, goto_programt &dest, message_handlert &message_handler, const irep_idt &mode)
typet & type()
Return the type of the expression.
targett insert_before(const_targett target)
Insertion before the instruction pointed-to by the given instruction iterator target.
static instructiont make_assertion(const exprt &g, const source_locationt &l=source_locationt::nil())
irep_idt mode
Language mode.
static bool failed(bool error_indicator)
static symbol_exprt add_stack_depth_symbol(goto_modelt &goto_model, message_handlert &message_handler)
class symbol_exprt symbol_expr() const
Produces a symbol_exprt for a symbol.
#define INITIALIZE_FUNCTION
static void stack_depth(goto_programt &goto_program, const symbol_exprt &symbol, const std::size_t i_depth, const exprt &max_depth)
bool add(const symbolt &symbol)
Add a new symbol to the symbol table.
instructionst instructions
The list of instructions in the goto program.
exprt value
Initial value of symbol.
goto_functionst goto_functions
GOTO functions.
source_locationt location
Source code location of definition of symbol.
static optionalt< codet > static_lifetime_init(const irep_idt &identifier, symbol_tablet &symbol_table)
A base class for relations, i.e., binary predicates whose two operands have the same type.
A generic container class for the GOTO intermediate representation of one function.
static irep_idt entry_point()
Get the identifier of the entry point to a goto model.
void insert_before_swap(targett target)
Insertion that preserves jumps to "target".
A goto_instruction_codet representing an assignment in the program.
This class represents an instruction in the GOTO intermediate representation.
const source_locationt & source_location() const
symbol_tablet symbol_table
Symbol table.
irep_idt name
The unique identifier.
instructionst::iterator targett