A history object is an abstraction / representation of the control-flow part of a set of traces. More...
#include <ai_history.h>
A history object is an abstraction / representation of the control-flow part of a set of traces.
The simplest example is a single location which represents "all traces that reach this location". More sophisticated history objects represent "all traces that reach this point after exactly N iterations of this loop", "all traces that follow a given pattern of branching to reach this point" or "all traces that have the following call stack and reach this location".
These are used to control the abstract interpreter; edges are computed per history. Depending on what storage is used, they may also control or influence the number of domains that are used, supporting delayed merging, loop unwinding, context dependent analysis, etc. This is the base interface; derive from this.
Definition at line 36 of file ai_history.h.
Definition at line 39 of file ai_history.h.
Definition at line 88 of file ai_history.h.
History objects are intended to be immutable so they can be shared to reduce memory overhead.
Definition at line 43 of file ai_history.h.
Definition at line 79 of file ai_history.h.
| Enumerator | |
|---|---|
| NEW | |
| MERGED | |
| BLOCKED | |
Definition at line 81 of file ai_history.h.
Create a new history starting from a given location This is used to start the analysis from scratch PRECONDITION(l.is_dereferenceable());.
Definition at line 49 of file ai_history.h.
Definition at line 53 of file ai_history.h.
Definition at line 58 of file ai_history.h.
The current location in the history, used to compute the transformer POSTCONDITION(return value is dereferenceable)
Implemented in ahistoricalt, call_stack_historyt, and local_control_flow_historyt< track_forward_jumps, track_backward_jumps >.
The order for history_sett.
Implemented in ahistoricalt, call_stack_historyt, and local_control_flow_historyt< track_forward_jumps, track_backward_jumps >.
History objects should be comparable.
Implemented in ahistoricalt, call_stack_historyt, and local_control_flow_historyt< track_forward_jumps, track_backward_jumps >.
Reimplemented in ahistoricalt, call_stack_historyt, and local_control_flow_historyt< track_forward_jumps, track_backward_jumps >.
Definition at line 144 of file ai_history.h.
Definition at line 14 of file ai_history.cpp.
Definition at line 22 of file ai_history.cpp.
Domains with a substantial height may need to widen when merging this method allows the history to provide a hint on when to do this The suggested use of this is for domains merge operation to check this and then widen in a domain specific way.
However it could be used in other ways (such as the transformer). The key idea is that the history tracks / should know when to widen and when to continue.
Reimplemented in ahistoricalt, call_stack_historyt, and local_control_flow_historyt< track_forward_jumps, track_backward_jumps >.
Definition at line 139 of file ai_history.h.
Step creates a new history by advancing the current one to location "to" It is given the set of all other histories that have reached this point.
In the case of function call return it is also given the full history of the caller. This allows function-local histories as they can "pick up" the state from before the call when computing the return edge.
PRECONDITION(to.id_dereferenceable()); PRECONDITION(to in goto_program.get_successors(current_location()) || current_location()->is_function_call() || current_location()->is_end_function()); PRECONDITION(caller_hist == no_caller_history || current_location()->is_end_function);
Step may do one of three things :
Implemented in ahistoricalt, call_stack_historyt, and local_control_flow_historyt< track_forward_jumps, track_backward_jumps >.
Definition at line 121 of file ai_history.h.