replicode
Public Member Functions | Private Member Functions | List of all members
r_exec::TopLevelMDLController Class Reference

#include <mdl_controller.h>

Inheritance diagram for r_exec::TopLevelMDLController:
Inheritance graph
Collaboration diagram for r_exec::TopLevelMDLController:
Collaboration graph

Public Member Functions

 TopLevelMDLController (r_code::View *view)
 
void take_input (r_exec::View *input)
 
void reduce (r_exec::View *input)
 
void store_requirement (_Fact *f_imdl, MDLController *controller, bool chaining_was_allowed, bool simulation)
 
void predict (HLPBindingMap *bm, _Fact *input, Fact *f_imdl, bool chaining_was_allowed, RequirementsPair &r_p, Fact *ground)
 
void register_pred_outcome (Fact *f_pred, bool success, _Fact *evidence, double confidence, bool rate_failures)
 
void register_goal_outcome (Fact *goal, bool success, _Fact *evidence) const
 
void register_simulated_goal_outcome (Fact *goal, bool success, _Fact *evidence) const
 
void register_req_outcome (Fact *f_pred, bool success, bool rate_failures)
 
- Public Member Functions inherited from r_exec::PMDLController
void add_g_monitor (_GMonitor *m)
 
void remove_g_monitor (_GMonitor *m)
 
void add_r_monitor (_GMonitor *m)
 
void remove_r_monitor (_GMonitor *m)
 
void register_predicted_goal_outcome (Fact *goal, HLPBindingMap *bm, Fact *f_imdl, bool success, bool injected_goal)
 
- Public Member Functions inherited from r_exec::MDLController
void add_monitor (PMonitor *m)
 
void remove_monitor (PMonitor *m)
 
_Factget_lhs () const
 
_Factget_rhs () const
 
Factget_f_ihlp (HLPBindingMap *bindings, bool wr_enabled) const
 
ChainingStatus retrieve_imdl_fwd (HLPBindingMap *bm, Fact *f_imdl, RequirementsPair &r_p, Fact *&ground, MDLController *req_controller, bool &wr_enabled)
 
ChainingStatus retrieve_imdl_bwd (HLPBindingMap *bm, Fact *f_imdl, Fact *&ground)
 
ChainingStatus retrieve_simulated_imdl_fwd (HLPBindingMap *bm, Fact *f_imdl, Controller *root)
 
ChainingStatus retrieve_simulated_imdl_bwd (HLPBindingMap *bm, Fact *f_imdl, Controller *root)
 
void add_requirement_to_rhs ()
 
void remove_requirement_from_rhs ()
 
bool is_requirement () const
 
bool is_reuse () const
 
bool is_cmd () const
 
void register_requirement (_Fact *f_pred, RequirementsPair &r_p)
 
- Public Member Functions inherited from r_exec::HLPController
virtual ~HLPController ()
 
void invalidate ()
 
Codeget_core_object () const
 
Codeget_unpacked_object () const
 
void add_requirement (bool strong)
 
void remove_requirement (bool strong)
 
uint64_t get_requirement_count (uint64_t &weak_requirement_count, uint64_t &strong_requirement_count)
 
uint64_t get_requirement_count ()
 
void store_evidence (_Fact *evidence)
 
void store_predicted_evidence (_Fact *evidence)
 
uint16_t get_out_group_count () const
 
Codeget_out_group (uint16_t i) const
 
Groupget_host () const
 
bool has_tpl_args () const
 
void inject_prediction (Fact *prediction, double confidence) const
 
- Public Member Functions inherited from r_exec::OController
virtual ~OController ()
 
- Public Member Functions inherited from r_exec::Controller
virtual ~Controller ()
 
uint64_t get_tsc ()
 
bool is_invalidated ()
 
void activate (bool a)
 
bool is_activated () const
 
bool is_alive () const
 
r_code::CodegetObject () const
 
r_exec::ViewgetView () const
 
void _take_input (r_exec::View *input)
 
virtual void gain_activation ()
 
virtual void lose_activation ()
 
void set_view (View *view)
 
void debug (View *input)
 
- Public Member Functions inherited from core::_Object
virtual ~_Object ()
 
void incRef ()
 
virtual void decRef ()
 

Private Member Functions

uint64_t get_rdx_out_group_count () const
 
void abduce (HLPBindingMap *bm, Fact *super_goal, double confidence)
 
void abduce_lhs (HLPBindingMap *bm, Fact *super_goal, _Fact *sub_goal_target, Fact *f_imdl, _Fact *evidence)
 
void register_drive_outcome (Fact *goal, bool success) const
 
void check_last_match_time (bool match)
 

Additional Inherited Members

- Static Public Member Functions inherited from r_exec::MDLController
static MDLControllerNew (View *view, bool &inject_in_secondary_group)
 
- Protected Types inherited from r_exec::MDLController
enum  RType { NaR = 0, WR = 1, SR = 2 }
 
- Protected Member Functions inherited from r_exec::PMDLController
void inject_goal (HLPBindingMap *bm, Fact *goal, Fact *f_imdl) const
 
void inject_simulation (Fact *simulation) const
 
bool monitor_goals (_Fact *input)
 
uint64_t get_sim_thz (uint64_t now, uint64_t deadline) const
 
 PMDLController (r_code::View *view)
 
- Protected Member Functions inherited from r_exec::MDLController
void _store_requirement (r_code::list< REntry > *cache, REntry &e)
 
float get_cfd () const
 
template<class C >
void reduce_cache (Fact *f_p_f_imdl, MDLController *controller)
 
template<class E >
void reduce_cache (Cache< E > *cache, Fact *f_p_f_imdl, MDLController *controller)
 
bool monitor_predictions (_Fact *input)
 predictions are admissible inputs (for checking predicted counter-evidences). More...
 
 MDLController (r_code::View *view)
 
- Protected Member Functions inherited from r_exec::HLPController
template<class E >
void _store_evidence (Cache< E > *cache, _Fact *evidence)
 
bool evaluate_bwd_guards (HLPBindingMap *bm)
 
MatchResult check_evidences (_Fact *target, _Fact *&evidence)
 
MatchResult check_predicted_evidences (_Fact *target, _Fact *&evidence)
 
bool is_orphan ()
 
bool become_invalidated ()
 
virtual void kill_views ()
 
 HLPController (r_code::View *view)
 
- Protected Member Functions inherited from r_exec::OController
 OController (r_code::View *view)
 
- Protected Member Functions inherited from r_exec::Controller
template<class C >
void __take_input (r_exec::View *input)
 
 Controller (r_code::View *view)
 
- Protected Member Functions inherited from core::_Object
 _Object ()
 
- Protected Attributes inherited from r_exec::PMDLController
std::mutex m_gMonitorsMutex
 
r_code::list< P< _GMonitor > > g_monitors
 
r_code::list< P< _GMonitor > > r_monitors
 
- Protected Attributes inherited from r_exec::MDLController
RCache requirements
 
RCache simulated_requirements
 
std::mutex m_monitorMutex
 
r_code::list< P< PMonitor > > p_monitors
 
P< Codelhs
 
P< Coderhs
 
RType _is_requirement
 
bool _is_reuse
 
bool _is_cmd
 
std::mutex m_activeRequirementsMutex
 
std::unordered_map< P< _Fact >, RequirementsPair, PHash< _Fact > > active_requirements
 
- Protected Attributes inherited from r_exec::HLPController
Cache< EEntryevidences
 
Cache< PEEntrypredicted_evidences
 
P< HLPBindingMapbindings
 
bool _has_tpl_args
 
uint64_t ref_count
 
std::vector< P< HLPController > > controllers
 
uint64_t last_match_time
 
- Protected Attributes inherited from r_exec::OController
r_code::list< P< Overlay > > overlays
 
- Protected Attributes inherited from r_exec::Controller
volatile uint64_t invalidated
 
volatile uint64_t activated
 
uint64_t tsc
 
r_code::Viewview
 
std::mutex m_reductionMutex
 
- Protected Attributes inherited from core::_Object
std::atomic_int_fast64_t refCount
 
- Static Protected Attributes inherited from r_exec::MDLController
static const uint64_t LHSController = 0
 
static const uint64_t RHSController = 1
 

Constructor & Destructor Documentation

r_exec::TopLevelMDLController::TopLevelMDLController ( r_code::View view)

Member Function Documentation

void r_exec::TopLevelMDLController::abduce ( HLPBindingMap bm,
Fact super_goal,
double  confidence 
)
private

Here is the call graph for this function:

Here is the caller graph for this function:

void r_exec::TopLevelMDLController::abduce_lhs ( HLPBindingMap bm,
Fact super_goal,
_Fact sub_goal_target,
Fact f_imdl,
_Fact evidence 
)
private

Here is the call graph for this function:

Here is the caller graph for this function:

void r_exec::TopLevelMDLController::check_last_match_time ( bool  match)
inlineprivatevirtual

Implements r_exec::HLPController.

uint64_t r_exec::TopLevelMDLController::get_rdx_out_group_count ( ) const
inlineprivatevirtual

Reimplemented from r_exec::PMDLController.

Here is the call graph for this function:

void r_exec::TopLevelMDLController::predict ( HLPBindingMap bm,
_Fact input,
Fact f_imdl,
bool  chaining_was_allowed,
RequirementsPair r_p,
Fact ground 
)
virtual

Implements r_exec::MDLController.

void r_exec::TopLevelMDLController::reduce ( r_exec::View input)

Here is the call graph for this function:

void r_exec::TopLevelMDLController::register_drive_outcome ( Fact goal,
bool  success 
) const
private

Here is the call graph for this function:

Here is the caller graph for this function:

void r_exec::TopLevelMDLController::register_goal_outcome ( Fact goal,
bool  success,
_Fact evidence 
) const
virtual

Implements r_exec::PMDLController.

Here is the call graph for this function:

void r_exec::TopLevelMDLController::register_pred_outcome ( Fact f_pred,
bool  success,
_Fact evidence,
double  confidence,
bool  rate_failures 
)
virtual

Implements r_exec::MDLController.

void r_exec::TopLevelMDLController::register_req_outcome ( Fact f_pred,
bool  success,
bool  rate_failures 
)
virtual

Implements r_exec::MDLController.

void r_exec::TopLevelMDLController::register_simulated_goal_outcome ( Fact goal,
bool  success,
_Fact evidence 
) const
virtual

Implements r_exec::PMDLController.

Here is the call graph for this function:

void r_exec::TopLevelMDLController::store_requirement ( _Fact f_imdl,
MDLController controller,
bool  chaining_was_allowed,
bool  simulation 
)
virtual

Implements r_exec::MDLController.

void r_exec::TopLevelMDLController::take_input ( r_exec::View input)
virtual

Reimplemented from r_exec::Controller.

Here is the call graph for this function:


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