Go to the documentation of this file.
12 #ifndef CPROVER_ANALYSES_AI_HISTORY_H
13 #define CPROVER_ANALYSES_AI_HISTORY_H
43 typedef std::shared_ptr<const ai_history_baset>
trace_ptrt;
79 typedef std::set<trace_ptrt, compare_historyt>
trace_sett;
144 virtual void output(std::ostream &out)
const
184 INVARIANT(others.size() == 1,
"Only needs one history per location");
186 const auto it = others.begin();
189 "The next location in history map must contain next history");
229 void output(std::ostream &out)
const override
253 template <
typename traceT>
264 #endif // CPROVER_ANALYSES_AI_HISTORY_H
virtual bool operator==(const ai_history_baset &op) const =0
History objects should be comparable.
virtual void output(std::ostream &out) const
The common case of history is to only care about where you are now, not how you got there!...
virtual const locationt & current_location(void) const =0
The current location in the history, used to compute the transformer POSTCONDITION(return value is de...
virtual ~ai_history_baset()
In a number of places we need to work with sets of histories so that these (a) make use of the immuta...
static const trace_ptrt no_caller_history
virtual ai_history_baset::trace_ptrt epoch(ai_history_baset::locationt)=0
Creates a new history from the given starting point.
bool operator==(const ai_history_baset &op) const override
History objects should be comparable.
bool operator<(const ai_history_baset &op) const override
The order for history_sett.
ai_history_baset(const ai_history_baset &)
virtual bool operator<(const ai_history_baset &op) const =0
The order for history_sett.
ahistoricalt(locationt l)
std::set< trace_ptrt, compare_historyt > trace_sett
virtual xmlt output_xml(void) const
ahistoricalt(const ahistoricalt &old)
An easy factory implementation for histories that don't need parameters.
#define PRECONDITION(CONDITION)
bool should_widen(const ai_history_baset &other) const override
Domains with a substantial height may need to widen when merging this method allows the history to pr...
virtual jsont output_json(void) const
void output(std::ostream &out) const override
goto_programt::const_targett locationt
virtual step_returnt step(locationt to, const trace_sett &others, trace_ptrt caller_hist) const =0
Step creates a new history by advancing the current one to location "to" It is given the set of all o...
virtual ~ai_history_factory_baset()
step_returnt step(locationt to, const trace_sett &others, trace_ptrt caller_hist) const override
Step creates a new history by advancing the current one to location "to" It is given the set of all o...
A history object is an abstraction / representation of the control-flow part of a set of traces.
ai_history_baset::trace_ptrt epoch(ai_history_baset::locationt l) override
Creates a new history from the given starting point.
std::shared_ptr< const ai_history_baset > trace_ptrt
History objects are intended to be immutable so they can be shared to reduce memory overhead.
ai_history_baset(locationt)
Create a new history starting from a given location This is used to start the analysis from scratch P...
As more detailed histories can get complex (for example, nested loops or deep, mutually recursive cal...
bool operator()(const trace_ptrt &l, const trace_ptrt &r) const
std::pair< step_statust, trace_ptrt > step_returnt
instructionst::const_iterator const_targett
const locationt & current_location(void) const override
The current location in the history, used to compute the transformer POSTCONDITION(return value is de...
virtual bool should_widen(const ai_history_baset &other) const
Domains with a substantial height may need to widen when merging this method allows the history to pr...