Go to the documentation of this file.
36 locationt l_call_site = p_call->current_location();
43 l_callee_end->is_end_function(),
44 "The last instruction of a goto_program must be END_FUNCTION");
49 auto next = p_call_site->step(
51 *(
storage->abstract_traces_before(l_callee_start)),
90 auto traces =
storage->abstract_traces_before(l_callee_end);
92 bool new_data =
false;
97 for(
auto p_callee_end : *traces)
106 auto return_step = p_callee_end->step(
108 *(
storage->abstract_traces_before(l_return_site)),
114 trace_ptrt p_return_site = return_step.second;
116 const std::unique_ptr<statet> ptr_s_callee_end_copy(
120 INVARIANT(tmp !=
nullptr,
"Three-way merge requires domain support");
137 const std::unique_ptr<statet> ptr_s_working_copy(
147 merge(s_working, p_callee_end, p_return_site) ||
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
trace_ptrt get_next(working_sett &working_set)
Get the next location from the work queue.
goto_programt::const_targett locationt
trace_sett working_sett
The work queue, sorted using the history's ordering operator.
virtual std::unique_ptr< statet > make_temporary_state(const statet &s)
Make a copy of a state.
bool is_bottom() const override
Find out if the domain is currently unreachable.
void put_in_working_set(working_sett &working_set, trace_ptrt t)
static const trace_ptrt no_caller_history
An abstract interpreter, based on the default recursive-interprocedural that uses variable sensitivit...
virtual bool is_bottom() const =0
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
virtual statet & get_state(trace_ptrt p)
Get the state for the given history, creating it with the factory if it doesn't exist.
#define DATA_INVARIANT(CONDITION, REASON)
This condition should be used to document that assumptions that are made on goto_functions,...
#define PRECONDITION(CONDITION)
std::unique_ptr< ai_storage_baset > storage
virtual void merge_three_way_function_return(const ai_domain_baset &function_call, const ai_domain_baset &function_start, const ai_domain_baset &function_end, const namespacet &ns)
Perform a context aware merge of the changes that have been applied between function_start and the cu...
void transform(const irep_idt &function_from, trace_ptrt trace_from, const irep_idt &function_to, trace_ptrt trace_to, ai_baset &ai, const namespacet &ns) override
Compute the abstract transformer for a single instruction.
bool visit_edge(const irep_idt &function_id, trace_ptrt p, const irep_idt &to_function_id, locationt to_l, trace_ptrt caller_history, const namespacet &ns, working_sett &working_set)
virtual bool merge(const statet &src, trace_ptrt from, trace_ptrt to)
Merge the state src, flowing from tracet from to tracet to, into the state currently stored for trace...
instructionst instructions
The list of instructions in the goto program.
A collection of goto functions.
virtual bool fixedpoint(trace_ptrt starting_trace, const irep_idt &function_id, const goto_programt &goto_program, const goto_functionst &goto_functions, const namespacet &ns)
Run the fixedpoint algorithm until it reaches a fixed point.
A history object is an abstraction / representation of the control-flow part of a set of traces.
There are different ways of handling arrays, structures, unions and pointers.
A generic container class for the GOTO intermediate representation of one function.
ai_history_baset::trace_ptrt trace_ptrt
#define INVARIANT(CONDITION, REASON)
This macro uses the wrapper function 'invariant_violated_string'.
The interface offered by a domain, allows code to manipulate domains without knowing their exact type...
bool visit_edge_function_call(const irep_idt &calling_function_id, trace_ptrt p_call, locationt l_return, const irep_idt &callee_function_id, working_sett &working_set, const goto_programt &callee, const goto_functionst &goto_functions, const namespacet &ns) override