AERA
|
Public Member Functions | |
BindingMap (const BindingMap *source) | |
BindingMap (const BindingMap &source) | |
BindingMap & | operator= (const BindingMap &source) |
void | load (const BindingMap *source) |
virtual void | clear () |
void | init (const r_code::Code *object, uint16 index) |
_Fact * | abstract_fact (_Fact *fact, const _Fact *original, bool force_sync, int timing_vars_first_search_index=0) |
r_code::Code * | abstract_object (r_code::Code *object, bool force_sync, int timing_vars_first_search_index=0) |
void | reset_fwd_timings (_Fact *reference_fact) |
bool | match_fwd_timings (Timestamp after, Timestamp before) |
MatchResult | match_fwd_lenient (const _Fact *f_object, const _Fact *f_pattern) |
bool | match_fwd_strict (const _Fact *f_object, const _Fact *f_pattern) |
bool | is_timestamp (uint16 i) const |
bool | has_fwd_after () const |
bool | has_fwd_before () const |
Timestamp | get_fwd_after () const |
Timestamp | get_fwd_before () const |
bool | match_object (const r_code::Code *object, const r_code::Code *pattern) |
bool | match_structure (const r_code::Code *object, uint16 o_base_index, uint16 o_index, const r_code::Code *pattern, uint16 p_index) |
bool | match_atom (Atom o_atom, Atom p_atom) |
void | bind_variable (BoundValue *value, uint8 id) |
void | bind_variable (Atom *code, uint8 id, uint16 value_index, Atom *intermediate_results) |
Atom * | get_value_code (uint16 id) const |
uint16 | get_value_code_size (uint16 id) const |
uint16 | get_first_index () const |
bool | intersect (const BindingMap *bm) const |
bool | is_fully_specified () const |
Atom * | get_code (uint16 i) const |
r_code::Code * | get_object (uint16 i) const |
int16 | get_fwd_after_index () const |
int16 | get_fwd_before_index () const |
bool | scan_variable (uint16 id) const |
bool | match_timings (Timestamp after, Timestamp before, uint32 after_index, uint32 before_index) |
std::string | trace_string (uint16 i) const |
![]() | |
void | incRef () |
virtual void | decRef () |
Static Public Member Functions | |
static _Fact * | abstract_f_ihlp (const _Fact *fact) |
static uint16 | get_abstracted_ihlp_exposed_args_index (const r_code::Code *ihlp) |
Protected Member Functions | |
void | add_unbound_value (uint8 id) |
bool | match_fwd_timings (const _Fact *f_object) |
bool | match (const r_code::Code *object, uint16 o_base_index, uint16 o_index, const r_code::Code *pattern, uint16 p_index, uint16 o_arity) |
void | abstract_member (const r_code::Code *object, uint16 index, r_code::Code *abstracted_object, uint16 write_index, uint16 &extent_index, int first_search_index=0) |
Atom | get_atom_variable (Atom a) |
Atom | get_structure_variable (const r_code::Code *object, uint16 index, int first_search_index=0) |
Atom | get_object_variable (r_code::Code *object) |
Protected Attributes | |
std::vector< P< Value > > | map_ |
uint32 | unbound_values_ |
uint16 | first_index_ |
int16 | fwd_after_index_ |
int16 | fwd_before_index_ |
![]() | |
std::atomic_int32_t | refCount_ |
Friends | |
class | UnboundValue |
Definition at line 247 of file binding_map.h.
_Fact * r_exec::BindingMap::abstract_fact | ( | _Fact * | fact, |
const _Fact * | original, | ||
bool | force_sync, | ||
int | timing_vars_first_search_index = 0 |
||
) |
Fill in the fresh fact object as an abstract copy of the original fact, creating new bindings as needed.
fact | A fresh Fact or AntiFact object. |
original | The original object to copy. |
timing_vars_first_search_index | (optional) Use this for first_search_index when calling abstract_member() for the fact's timing values. If omitted, use 0. |
Definition at line 414 of file binding_map.cpp.
|
static |
Get the code index where the exposed args will start after calling abstract_object on the ihlp. This is Necessary because the ihlp may have structured values before the exposed args which will be removed by abstract_object (which only has variables and no structured values).
ihlp | The imdl or icst. |
Definition at line 483 of file binding_map.cpp.
|
protected |
Get a VLPointer for the structre at object->code(index), adding a new binding if needed.
object | The code with the structure. |
index | The index in the object code of the structure. |
first_search_index | (optional) If >= 0, use this as the start index in the binding map to check if it already contains the structure and return a VLPointer to the binding index if found. (This starts at the index and wraps around to search the entire binding map.) If -1, then always add the structure as a new binding. If omitted, then use 0 to search the whole map from the beginning. |
Definition at line 570 of file binding_map.cpp.
bool r_exec::BindingMap::intersect | ( | const BindingMap * | bm | ) | const |
Check if any value in bm matches any value in this BindingMap
bm | The other BindingMap with values to check. |
Definition at line 905 of file binding_map.cpp.
|
inline |
Check if the map entry at i is bound to a timestamp.
Definition at line 327 of file binding_map.h.
|
inline |
Match the given time interval to the time interval at this binding map's fwd_after_index_ and fwd_before_index_, updating this binding map's values to "narrow" them to the given time interval if needed. This assumes you have already called has_fwd_after() and has_fwd_before() to make sure that there are valid Timestamp bindings at fwd_after_index_ and fwd_before_index_.
after | The beginning of the time interval to compare with this binding map's fwd time interval. |
before | The end of the time interval to compare with this binding map's fwd time interval. |
Definition at line 316 of file binding_map.h.
bool r_exec::BindingMap::match_timings | ( | Timestamp | after, |
Timestamp | before, | ||
uint32 | after_index, | ||
uint32 | before_index | ||
) |
Match the given time interval to the time interval at this binding map's after_index and before_index, updating the binding map's values to "narrow" them to the given time interval if needed. This assumes you have already checked to make sure that there are valid Timestamp bindings at after_index and before_index.
after | The beginning of the time interval to compare with this binding map's time interval. |
before | The end of the time interval to compare with this binding map's time interval. |
after_index | The index in the binding map of the time interval after Timestamp. |
before_index | The index in the binding map of the time interval before Timestamp. |
Definition at line 771 of file binding_map.cpp.
|
inline |
Return the trace of the value at index i as a string by creating a temporary Code object and calling valuate(). For debugging purposes only (can be inefficient).
Definition at line 389 of file binding_map.h.