AERA
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
r_exec::HLPOverlay Class Reference
Inheritance diagram for r_exec::HLPOverlay:
r_exec::Overlay core::_Object r_exec::CSTOverlay r_exec::MDLOverlay r_exec::PrimaryMDLOverlay r_exec::SecondaryMDLOverlay

Public Member Functions

 HLPOverlay (Controller *c, const HLPBindingMap *bindings, bool load_code)
 
HLPBindingMapget_bindings () const
 
Atomget_value_code (uint16 id) const
 
uint16 get_value_code_size (uint16 id) const
 
r_code::Codeget_unpacked_object () const
 
bool evaluate_bwd_guards ()
 
- Public Member Functions inherited from r_exec::Overlay
 Overlay (size_t values_size)
 
virtual void reset ()
 
virtual Overlayreduce (r_exec::View *input)
 
void invalidate ()
 
virtual bool is_invalidated ()
 
r_code::Codeget_object () const
 
r_exec::Viewget_view () const
 
r_code::Codebuild_object (r_code::Atom head) const
 
const r_code::Atomvalues () const
 
- Public Member Functions inherited from core::_Object
void incRef ()
 
virtual void decRef ()
 

Static Public Member Functions

static bool EvaluateBWDGuards (Controller *c, HLPBindingMap *bindings)
 
static bool EvaluateFWDTimings (Controller *c, HLPBindingMap *bindings)
 
static bool ScanBWDGuards (Controller *c, HLPBindingMap *bindings)
 

Protected Member Functions

bool evaluate_guards (uint16 guard_set_iptr_index)
 
bool evaluate_fwd_guards ()
 
bool evaluate (uint16 index)
 
bool evaluate_fwd_timings ()
 
bool scan_bwd_guards () const
 
bool scan_location (uint16 index, uint16 parent_guard_index) const
 
bool scan_variable (uint16 index, uint16 parent_guard_index) const
 
void store_evidence (_Fact *evidence, bool prediction, bool is_simulation)
 
 HLPOverlay (Controller *c, HLPBindingMap *bindings)
 
- Protected Member Functions inherited from r_exec::Overlay
void load_code ()
 
void patch_code (uint16 index, r_code::Atom value)
 
uint16 get_last_patch_index ()
 
void unpatch_code (uint16 patch_index)
 
void rollback ()
 
void commit ()
 
r_code::Codeget_core_object () const
 
 Overlay (Controller *c, bool load_code=true)
 

Protected Attributes

P< HLPBindingMapbindings_
 
- Protected Attributes inherited from r_exec::Overlay
volatile uint32 invalidated_
 
Controllercontroller_
 
r_code::resized_vector< r_code::Atomvalues_
 
r_code::Atomcode_
 
uint16 code_size_
 
std::vector< uint16 > patch_indices_
 
uint16 value_commit_index_
 
- Protected Attributes inherited from core::_Object
std::atomic_int32_t refCount_
 

Friends

class HLPContext
 
class CSTController
 

Detailed Description

Definition at line 97 of file hlp_overlay.h.

Member Function Documentation

◆ evaluate()

bool r_exec::HLPOverlay::evaluate ( uint16  index)
protected

Create an HLPContext and evaluate code_ at index.

Parameters
indexThe index in code_ to evaluate.
Returns
True if successfully evaluated, false for problem evaluated including unbound variables. Note that if the code at index is a boolean expression, then this can return true for successful evaluation even though the expression value is boolean false.

Definition at line 160 of file hlp_overlay.cpp.

◆ EvaluateFWDTimings()

bool r_exec::HLPOverlay::EvaluateFWDTimings ( Controller c,
HLPBindingMap bindings 
)
static

Find the backward guards which assign the forward timings and evaluate them.

Parameters
cThe model controller with the code for the backward guards.
bindingsUpdate the binding map forward timings.
Returns
True if evaluted, false if no backward guards assign the forward timings or if can't evaluate.

Definition at line 100 of file hlp_overlay.cpp.


The documentation for this class was generated from the following files: