16 const exprt &min_value_expr,
17 const exprt &max_value_expr,
18 const std::string &basename_prefix,
27 type, basename_prefix);
34 allocate_local_symbol,
39 const exprt &min_value_expr,
40 const exprt &max_value_expr,
41 const std::string &basename_prefix,
47 const typet &int_type = min_value_expr.
type();
51 alocate_local_symbol(int_type, basename_prefix);
75 const std::string &basename_prefix,
76 const typet &int_type,
94 const typet &int_type,
101 if(switch_cases.size() == 1)
107 mode, source_location, name_prefix, symbol_table};
111 switch_cases.size() - 1,
119 size_t case_number = 0;
120 for(
const auto &switch_case : switch_cases)
123 this_block.
add(switch_case);
129 switch_block.
add(std::move(this_case));
134 result_block.add(std::move(result_switch));
exprt allocate_automatic_local_object(code_blockt &assignments, const exprt &target_expr, const typet &allocate_type, const irep_idt &basename_prefix="tmp")
Creates a local variable with automatic lifetime.
A base class for expressions that are predicates, i.e., Boolean-typed, and that take exactly two argu...
An assumption, which must hold in subsequent code.
A codet representing sequential composition of program statements.
void add(const codet &code)
codet representation of a break statement (within a for or while loop).
A codet representing an assignment in the program.
A codet representing the declaration of a local variable.
codet representation of a switch-case, i.e. a case statement within a switch.
codet representing a switch statement.
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Base class for all expressions.
exprt & with_source_location(source_locationt location) &
Add the source location from location, if it is non-nil.
typet & type()
Return the type of the expression.
A side_effect_exprt that returns a non-deterministically chosen value.
Expression to hold a symbol (variable)
The symbol table base class interface.
The type of an expression, extends irept.
code_blockt generate_nondet_switch(const irep_idt &name_prefix, const alternate_casest &switch_cases, const typet &int_type, const irep_idt &mode, const source_locationt &source_location, symbol_table_baset &symbol_table)
Pick nondeterministically between imperative actions 'switch_cases'.
symbol_exprt generate_nondet_int(const exprt &min_value_expr, const exprt &max_value_expr, const std::string &basename_prefix, const source_locationt &source_location, allocate_objectst &allocate_objects, code_blockt &instructions)
Same as generate_nondet_int( const mp_integer &min_value, const mp_integer &max_value,...
std::vector< codet > alternate_casest
std::function< symbol_exprt(const typet &type, std::string)> allocate_local_symbolt
#define PRECONDITION(CONDITION)