39 const exprt &
function,
47 new_function=
function;
57 if(new_function.id()==ID_symbol &&
60 new_arguments.clear();
68 if(new_function.id()==ID_if)
71 new_lhs,
to_if_expr(new_function), new_arguments, dest, mode);
73 else if(new_function.id()==ID_symbol)
78 else if(new_function.id() == ID_null_object)
81 else if(new_function.id()==ID_dereference ||
82 new_function.id()==
"virtual_function")
89 error() <<
"unexpected function argument: " << new_function.id()
138 v->guard=
function.cond();
140 v->source_location=
function.cond().source_location();
162 const exprt &
function,
171 function_call.
lhs()=lhs;
175 t->source_location=
function.source_location();
176 t->code.swap(function_call);
const if_exprt & to_if_expr(const exprt &expr)
Cast a generic exprt to an if_exprt.
const irep_idt & get_identifier() const
void destructive_append(goto_programt &p)
Appends the given program, which is destroyed.
virtual void do_function_call_symbol(const exprt &lhs, const symbol_exprt &function, const exprt::operandst &arguments, goto_programt &dest)
add function calls to function queue for later processing
The trinary if-then-else operator.
static mstreamt & eom(mstreamt &m)
void clean_expr(exprt &expr, goto_programt &dest, const irep_idt &mode, bool result_is_used=true)
instructionst::iterator targett
#define Forall_expr(it, expr)
source_locationt source_location
void convert_function_call(const code_function_callt &code, goto_programt &dest, const irep_idt &mode)
instructionst instructions
The list of instructions in the goto program.
API to expression classes.
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast a generic exprt to a symbol_exprt.
virtual void do_function_call(const exprt &lhs, const exprt &function, const exprt::operandst &arguments, goto_programt &dest, const irep_idt &mode)
virtual void do_function_call_other(const exprt &lhs, const exprt &function, const exprt::operandst &arguments, goto_programt &dest)
std::vector< exprt > operandst
A generic container class for the GOTO intermediate representation of one function.
targett add_instruction()
Adds an instruction at the end.
Base class for all expressions.
source_locationt & add_source_location()
virtual void do_function_call_if(const exprt &lhs, const if_exprt &function, const exprt::operandst &arguments, goto_programt &dest, const irep_idt &mode)