Go to the documentation of this file.
28 if(dest.
id()==ID_side_effect)
33 if(statement==ID_nondet)
42 if(dest.
id()==ID_side_effect &&
47 dest.
id(ID_nondet_symbol);
57 static unsigned count=0;
70 e1.
id() == ID_dereference &&
78 e2.
id() == ID_dereference &&
94 if(e1.
id()==ID_symbol && e2.
id()==ID_symbol)
106 if(e1.
id()==ID_index || e1.
id()==ID_struct)
107 if(e2.
id()!=ID_dereference && e1.
id()!=e2.
id())
110 if(e2.
id()==ID_index || e2.
id()==ID_struct)
111 if(e2.
id()!=ID_dereference && e1.
id()!=e2.
id())
127 if(dest.
id()!=ID_address_of)
132 if(dest.
id()==ID_member ||
133 dest.
id()==ID_index ||
134 dest.
id()==ID_dereference ||
135 dest.
id()==ID_symbol)
152 const if_exprt if_expr(alias_cond, by, dest, dest.
type());
167 if(lhs.
id()==ID_member)
174 new_rhs.
where().
set(ID_component_name, component_name);
181 else if(lhs.
id()==ID_index)
244 if(statement==ID_assign)
246 else if(statement==ID_assume)
248 else if(statement==ID_skip)
250 else if(statement==ID_decl)
252 else if(statement==ID_assert)
254 else if(statement==ID_expression)
256 else if(statement==ID_printf)
258 else if(statement==ID_asm)
260 else if(statement==ID_fence)
263 false,
"sorry, wp(",
id2string(statement),
"...) is not implemented");
Operator to update elements in structs and arrays.
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
void substitute_rec(exprt &dest, const exprt &what, const exprt &by, const namespacet &ns)
replace 'what' by 'by' in 'dest', considering possible aliasing
#define Forall_operands(it, expr)
const dereference_exprt & to_dereference_expr(const exprt &expr)
Cast an exprt to a dereference_exprt.
const index_exprt & to_index_expr(const exprt &expr)
Cast an exprt to an index_exprt.
The trinary if-then-else operator.
A goto_instruction_codet representing the declaration of a local variable.
const exprt & assumption() const
Base class for all expressions.
bool has_nondet(const exprt &dest)
const code_declt & to_code_decl(const goto_instruction_codet &code)
std::string to_string(const string_not_contains_constraintt &expr)
Used for debug printing.
void approximate_nondet(exprt &dest)
Approximate the non-deterministic choice in a way cheaper than by (proper) quantification.
aliasingt
consider possible aliasing
side_effect_exprt & to_side_effect_expr(exprt &expr)
exprt wp_decl(const code_declt &code, const exprt &post, const namespacet &ns)
#define INVARIANT_WITH_DIAGNOSTICS(CONDITION, REASON,...)
Same as invariant, with one or more diagnostics attached Diagnostics can be of any type that has a sp...
void approximate_nondet_rec(exprt &dest, unsigned &count)
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
typet & type()
Return the type of the expression.
const code_assumet & to_code_assume(const codet &code)
const std::string & id2string(const irep_idt &d)
static optionalt< smt_termt > get_identifier(const exprt &expr, const std::unordered_map< exprt, smt_identifier_termt, irep_hash > &expression_handle_identifiers, const std::unordered_map< exprt, smt_identifier_termt, irep_hash > &expression_identifiers)
#define forall_operands(it, expr)
void set(const irep_idt &name, const irep_idt &value)
const exprt & struct_op() const
aliasingt aliasing(const exprt &e1, const exprt &e2, const namespacet &ns)
exprt wp_assign(const code_assignt &code, const exprt &post, const namespacet &ns)
An assumption, which must hold in subsequent code.
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast an exprt to a symbol_exprt.
const irep_idt & id() const
const irep_idt & get_statement() const
A side_effect_exprt that returns a non-deterministically chosen value.
Extract member of struct or union.
void rewrite_assignment(exprt &lhs, exprt &rhs)
exprt wp_assume(const code_assumet &code, const exprt &post, const namespacet &)
const member_exprt & to_member_expr(const exprt &expr)
Cast an exprt to a member_exprt.
irep_idt get_component_name() const
const address_of_exprt & to_address_of_expr(const exprt &expr)
Cast an exprt to an address_of_exprt.
exprt wp(const codet &code, const exprt &post, const namespacet &ns)
Compute the weakest precondition of the given program piece code with respect to the expression post.
Operator to return the address of an object.
A goto_instruction_codet representing an assignment in the program.
const irep_idt & get_statement() const
An expression containing a side effect.
const code_assignt & to_code_assign(const goto_instruction_codet &code)
Data structure for representing an arbitrary statement in a program.