30 if(src.
id() == ID_forall)
38 .variables() = variables;
42 else if(src.
id() == ID_function_application)
46 function_application.arguments().size() == 1 &&
47 function_application.arguments().front().type().id() == ID_state)
49 if(function_application.arguments().front().id() == ID_symbol)
52 for(
auto &v : variables)
53 new_arguments.push_back(v);
54 function_application.arguments() = new_arguments;
56 else if(function_application.arguments().front().id() == ID_tuple)
59 function_application.arguments().front().operands().size() ==
61 "tuple size must match");
62 auto operands = function_application.arguments().front().operands();
63 function_application.arguments() = operands;
71 else if(src.
id() == ID_evaluate)
74 if(evaluate_expr.address().id() == ID_object_address)
80 else if(src.
id() == ID_update_state)
83 if(update_state_expr.address().id() == ID_object_address)
88 for(
auto &v : variables)
91 operands.push_back(update_state_expr.new_value());
93 operands.push_back(v);
109 variables.push_back(v);
111 if(variables.empty())
119 return id2string(a.get_identifier()) < id2string(b.get_identifier());
122 for(
auto &c : constraints)
Thrown when an unexpected error occurs during the analysis (e.g., when the SAT solver returns an erro...
std::vector< symbol_exprt > variablest
Base class for all expressions.
std::vector< exprt > operandst
const irep_idt & id() const
symbol_exprt object_expr() const
Expression to hold a symbol (variable)
The type of an expression, extends irept.
#define forall_expr(it, expr)
std::unordered_set< symbol_exprt, irep_hash > find_variables(const std::vector< exprt > &src)
Returns the set of program variables (as identified by object_address expressions) in the given expre...
API to expression classes for 'mathematical' expressions.
const function_application_exprt & to_function_application_expr(const exprt &expr)
Cast an exprt to a function_application_exprt.
const forall_exprt & to_forall_expr(const exprt &expr)
API to expression classes for Pointers.
const object_address_exprt & to_object_address_expr(const exprt &expr)
Cast an exprt to an object_address_exprt.
#define DATA_INVARIANT(CONDITION, REASON)
This condition should be used to document that assumptions that are made on goto_functions,...
const update_state_exprt & to_update_state_expr(const exprt &expr)
Cast an exprt to a update_state_exprt.
const evaluate_exprt & to_evaluate_expr(const exprt &expr)
Cast an exprt to a evaluate_exprt.
exprt variable_encoding(exprt src, const binding_exprt::variablest &variables)