AERA
Classes | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
r_exec::_TPX Class Referenceabstract
Inheritance diagram for r_exec::_TPX:
r_exec::TPX core::_Object r_exec::CTPX r_exec::GTPX r_exec::PTPX

Classes

class  Component
 
class  FindFIcstResult
 

Public Member Functions

void debug (View *)
 
- Public Member Functions inherited from r_exec::TPX
 TPX (AutoFocusController *auto_focus, _Fact *target, _Fact *pattern, BindingMap *bindings)
 
_Factget_pattern () const
 
BindingMapget_bindings () const
 
virtual bool take_input (View *view, _Fact *abstracted_input, BindingMap *bm)
 
virtual void signal (View *input) const
 
virtual void ack_pred_success (Success *success)
 
- Public Member Functions inherited from core::_Object
void incRef ()
 
virtual void decRef ()
 

Protected Member Functions

void filter_icst_components (ICST *icst, uint32 icst_index, std::vector< Component > &components)
 
void _find_f_icst (_Fact *component, std::vector< FindFIcstResult > &results, bool find_multiple)
 
void find_f_icst (_Fact *component, std::vector< FindFIcstResult > &results, bool find_multiple=false)
 
void find_f_icst (_Fact *component, std::vector< FindFIcstResult > &results, P< r_code::Code > &new_cst, bool find_multiple=false)
 
_Factmake_f_icst (_Fact *component, _Fact *&component_pattern, P< r_code::Code > &new_cst)
 
r_code::Codebuild_cst (const std::vector< Component > &components, BindingMap *bm, _Fact *main_component)
 
bool build_requirement (HLPBindingMap *bm, r_code::Code *m0, std::chrono::microseconds period, const std::vector< FindFIcstResult > &results, r_code::Code *new_cst)
 
void build_mdl_tail (r_code::Code *mdl, uint16 write_index)
 
void inject_hlps () const
 
void inject_hlps (Timestamp analysis_starting_time)
 
virtual std::string get_header () const =0
 
 _TPX (AutoFocusController *auto_focus, _Fact *target, _Fact *pattern, BindingMap *bindings)
 
 _TPX (AutoFocusController *auto_focus, _Fact *target)
 
- Protected Member Functions inherited from r_exec::TPX
bool filter (View *input, _Fact *abstracted_input, BindingMap *bm)
 
 TPX (AutoFocusController *auto_focus, _Fact *target)
 

Static Protected Member Functions

static _Factfind_f_icst_component (_Fact *fact, const _Fact *component, int max_depth=3)
 
static r_code::Codebuild_mdl_head (HLPBindingMap *bm, uint16 tpl_arg_count, _Fact *lhs, _Fact *rhs, uint16 &write_index, bool allow_shared_timing_vars=true)
 
static r_code::Codebuild_mdl_head_from_abstract (uint16 tpl_arg_count, r_code::Code *lhs, r_code::Code *rhs, uint16 &write_index)
 

Protected Attributes

r_code::list< Inputinputs_
 
std::vector< P< r_code::Code > > mdls_
 
std::vector< P< r_code::Code > > csts_
 
std::vector< P< _Fact > > f_icsts_
 
- Protected Attributes inherited from r_exec::TPX
AutoFocusControllerauto_focus_
 
P< _Facttarget_
 
P< BindingMaptarget_bindings_
 
P< _Factabstracted_target_
 
P< CSTControllercst_hook_
 
std::vector< P< BindingMap > > new_maps_
 
- Protected Attributes inherited from core::_Object
std::atomic_int32_t refCount_
 

Detailed Description

Definition at line 176 of file pattern_extractor.h.

Member Function Documentation

◆ _find_f_icst()

void r_exec::_TPX::_find_f_icst ( _Fact component,
std::vector< FindFIcstResult > &  results,
bool  find_multiple 
)
protected

Find an f_icst for the component by looking in inputs_ and f_icsts_.

Parameters
componentThe cst component to search for.
resultsCall this with an empty vector<FindFIcstResult>. If no f_icst is found, then this is empty. Otherwise an entry has the found f_icst and the Code pattern in the unpacked cst that matches the given component.
find_multipleIf true then add an entry to results for each f_icst found in inputs_ and f_icsts_ . If false, then results has at most one entry.

Definition at line 261 of file pattern_extractor.cpp.

◆ find_f_icst() [1/2]

void r_exec::_TPX::find_f_icst ( _Fact component,
std::vector< FindFIcstResult > &  results,
bool  find_multiple = false 
)
protected

Find an f_icst for the component by looking in inputs_ and f_icsts_.

Parameters
componentThe cst component to search for.
resultsCall this with an empty vector<FindFIcstResult>. If no f_icst is found, then this is empty. Otherwise an entry has the found f_icst and the Code pattern in the unpacked cst that matches the given component.
find_multiple(optional) If true then add an entry to results for each f_icst found in inputs_ and f_icsts_ . If omitted or false, then results has at most one entry.

◆ find_f_icst() [2/2]

void r_exec::_TPX::find_f_icst ( _Fact component,
std::vector< FindFIcstResult > &  results,
P< r_code::Code > &  new_cst,
bool  find_multiple = false 
)
protected

Find an f_icst for the component by looking in inputs_ and f_icsts_, or if not found then try to make one with a new cst.

Parameters
componentThe cst component to search for.
resultsCall this with an empty vector<FindFIcstResult>. If no f_icst is found, then this is empty. Otherwise an entry has the found f_icst and the Code pattern in the unpacked cst that matches the given component.
new_cstIf no existing f_icst is found, then this sets new_cst to a new cst and results has one entry with the new f_icst.
find_multiple(optional) If true then add an entry to results for each f_icst found in inputs_ and f_icsts_ . If omitted or false, then results has at most one entry.

◆ find_f_icst_component()

_Fact * r_exec::_TPX::find_f_icst_component ( _Fact fact,
const _Fact component,
int  max_depth = 3 
)
staticprotected

If the fact is a (fact (icst ...)) then search the icst for the component. If not found, then recursively search all members which are (fact (icst ...)).

Parameters
factThe fact to search for the component. If fact->get_reference(0) is not an icst, then return NULL.
componentThe component to search for by being the same object (not matching).
max_depth(optional) The maximum recursion depth for when this calls itself to search members. If this is zero, then don't recurse. If omitted, use a default.
Returns
The Code pattern in the unpacked cst that matches the component, if found. NULL if not found.

Definition at line 235 of file pattern_extractor.cpp.


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