12 #ifndef CPROVER_ANALYSES_LOCAL_CONTROL_FLOW_HISTORY_H
13 #define CPROVER_ANALYSES_LOCAL_CONTROL_FLOW_HISTORY_H
29 typedef std::shared_ptr<const local_control_flow_decisiont>
lcfd_ptrt;
44 template <
bool track_forward_jumps,
bool track_backward_jumps>
58 track_backward_jumps>>
64 track_backward_jumps>>(in);
140 void output(std::ostream &out)
const override;
169 return std::make_shared<local_control_flow_historyt<true, true>>(
175 return std::make_shared<local_control_flow_historyt<true, false>>(
184 return std::make_shared<local_control_flow_historyt<false, true>>(
190 return std::make_shared<local_control_flow_historyt<false, false>>(
Abstract Interpretation history.
A history object is an abstraction / representation of the control-flow part of a set of traces.
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.
std::pair< step_statust, trace_ptrt > step_returnt
goto_programt::const_targett locationt
std::set< trace_ptrt, compare_historyt > trace_sett
As more detailed histories can get complex (for example, nested loops or deep, mutually recursive cal...
Records all local control-flow decisions up to a limit of number of histories per location.
local_control_flow_decisiont(locationt loc, bool taken, lcfd_ptrt ptr)
std::shared_ptr< const local_control_flow_decisiont > lcfd_ptrt
bool operator<(const local_control_flow_decisiont &op) const
bool operator==(const local_control_flow_decisiont &op) const
locationt branch_location
ai_history_baset::locationt locationt
ai_history_baset::trace_ptrt epoch(ai_history_baset::locationt l) override
Creates a new history from the given starting point.
bool track_backward_jumps
local_control_flow_history_factoryt(bool track_f, bool track_b, size_t max_hist)
size_t max_histories_per_location
virtual ~local_control_flow_history_factoryt()
Whether we track forwards and / or backwards jumps is compile-time fixed as it does not need to be va...
bool operator<(const ai_history_baset &op) const override
The order for history_sett.
local_control_flow_historyt(locationt loc)
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...
void output(std::ostream &out) const override
bool operator==(const ai_history_baset &op) const override
History objects should be comparable.
local_control_flow_decisiont::lcfd_ptrt lcfd_ptrt
local_control_flow_historyt(locationt loc, size_t max_hist)
std::shared_ptr< const local_control_flow_historyt< track_forward_jumps, track_backward_jumps > > to_local_control_flow_history(trace_ptrt in) const
bool has_histories_per_location_limit(void) const
lcfd_ptrt control_flow_decision_history
const locationt & current_location(void) const override
The current location in the history, used to compute the transformer POSTCONDITION(return value is de...
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...
size_t max_histories_per_location
local_control_flow_historyt(locationt loc, lcfd_ptrt hist, size_t max_hist)
local_control_flow_historyt(const local_control_flow_historyt< track_forward_jumps, track_backward_jumps > &old)
bool is_path_merge_history(void) const
#define UNREACHABLE
This should be used to mark dead code.
#define PRECONDITION(CONDITION)