AERA
factory.h
1 //_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
2 //_/_/
3 //_/_/ AERA
4 //_/_/ Autocatalytic Endogenous Reflective Architecture
5 //_/_/
6 //_/_/ Copyright (c) 2018-2025 Jeff Thompson
7 //_/_/ Copyright (c) 2018-2025 Kristinn R. Thorisson
8 //_/_/ Copyright (c) 2018-2025 Icelandic Institute for Intelligent Machines
9 //_/_/ http://www.iiim.is
10 //_/_/
11 //_/_/ Copyright (c) 2010-2012 Eric Nivel
12 //_/_/ Center for Analysis and Design of Intelligent Agents
13 //_/_/ Reykjavik University, Menntavegur 1, 102 Reykjavik, Iceland
14 //_/_/ http://cadia.ru.is
15 //_/_/
16 //_/_/ Part of this software was developed by Eric Nivel
17 //_/_/ in the HUMANOBS EU research project, which included
18 //_/_/ the following parties:
19 //_/_/
20 //_/_/ Autonomous Systems Laboratory
21 //_/_/ Technical University of Madrid, Spain
22 //_/_/ http://www.aslab.org/
23 //_/_/
24 //_/_/ Communicative Machines
25 //_/_/ Edinburgh, United Kingdom
26 //_/_/ http://www.cmlabs.com/
27 //_/_/
28 //_/_/ Istituto Dalle Molle di Studi sull'Intelligenza Artificiale
29 //_/_/ University of Lugano and SUPSI, Switzerland
30 //_/_/ http://www.idsia.ch/
31 //_/_/
32 //_/_/ Institute of Cognitive Sciences and Technologies
33 //_/_/ Consiglio Nazionale delle Ricerche, Italy
34 //_/_/ http://www.istc.cnr.it/
35 //_/_/
36 //_/_/ Dipartimento di Ingegneria Informatica
37 //_/_/ University of Palermo, Italy
38 //_/_/ http://diid.unipa.it/roboticslab/
39 //_/_/
40 //_/_/
41 //_/_/ --- HUMANOBS Open-Source BSD License, with CADIA Clause v 1.0 ---
42 //_/_/
43 //_/_/ Redistribution and use in source and binary forms, with or without
44 //_/_/ modification, is permitted provided that the following conditions
45 //_/_/ are met:
46 //_/_/ - Redistributions of source code must retain the above copyright
47 //_/_/ and collaboration notice, this list of conditions and the
48 //_/_/ following disclaimer.
49 //_/_/ - Redistributions in binary form must reproduce the above copyright
50 //_/_/ notice, this list of conditions and the following disclaimer
51 //_/_/ in the documentation and/or other materials provided with
52 //_/_/ the distribution.
53 //_/_/
54 //_/_/ - Neither the name of its copyright holders nor the names of its
55 //_/_/ contributors may be used to endorse or promote products
56 //_/_/ derived from this software without specific prior
57 //_/_/ written permission.
58 //_/_/
59 //_/_/ - CADIA Clause: The license granted in and to the software
60 //_/_/ under this agreement is a limited-use license.
61 //_/_/ The software may not be used in furtherance of:
62 //_/_/ (i) intentionally causing bodily injury or severe emotional
63 //_/_/ distress to any person;
64 //_/_/ (ii) invading the personal privacy or violating the human
65 //_/_/ rights of any person; or
66 //_/_/ (iii) committing or preparing for any act of war.
67 //_/_/
68 //_/_/ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
69 //_/_/ CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
70 //_/_/ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
71 //_/_/ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
72 //_/_/ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
73 //_/_/ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
74 //_/_/ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
75 //_/_/ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
76 //_/_/ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
77 //_/_/ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
78 //_/_/ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
79 //_/_/ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
80 //_/_/ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
81 //_/_/ OF SUCH DAMAGE.
82 //_/_/
83 //_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
84 
85 #ifndef factory_h
86 #define factory_h
87 
88 #include "../r_code/utils.h"
89 #include "binding_map.h"
90 #include "overlay.h"
91 #include "dll.h"
92 
93 
94 namespace r_exec {
95 
96 // No instances of the following classes can transmited; for now: facts and icst will be.
97 
98 // Notification markers are not put in their references marker sets.
99 // They are not used to propagate saliency changes.
100 // They are encoded as Atom::Object instead of Atom::Marker.
101 
102 class r_exec_dll MkNew :
103  public LObject {
104 public:
105  MkNew(r_code::Mem *m, r_code::Code *object);
106 };
107 
108 class r_exec_dll MkLowRes :
109  public LObject {
110 public:
111  MkLowRes(r_code::Mem *m, r_code::Code *object);
112 };
113 
114 class r_exec_dll MkLowSln :
115  public LObject {
116 public:
117  MkLowSln(r_code::Mem *m, r_code::Code *object);
118 };
119 
120 class r_exec_dll MkHighSln :
121  public LObject {
122 public:
123  MkHighSln(r_code::Mem *m, r_code::Code *object);
124 };
125 
126 class r_exec_dll MkLowAct :
127  public LObject {
128 public:
129  MkLowAct(r_code::Mem *m, r_code::Code *object);
130 };
131 
132 class r_exec_dll MkHighAct :
133  public LObject {
134 public:
135  MkHighAct(r_code::Mem *m, r_code::Code *object);
136 };
137 
138 class r_exec_dll MkSlnChg :
139  public LObject {
140 public:
141  MkSlnChg(r_code::Mem *m, r_code::Code *object, float32 value);
142 };
143 
144 class r_exec_dll MkActChg :
145  public LObject {
146 public:
147  MkActChg(r_code::Mem *m, r_code::Code *object, float32 value);
148 };
149 
150 class Pred;
151 class Goal;
152 class Success;
153 
154 class r_exec_dll _Fact :
155  public LObject {
156 protected:
157  _Fact();
158  _Fact(r_code::SysObject *source);
159  _Fact(_Fact *f);
160  _Fact(uint16 opcode, r_code::Code *object, Timestamp after, Timestamp before, float32 confidence, float32 psln_thr);
161 public:
162  static bool MatchAtom(Atom lhs, Atom rhs);
163  static bool MatchStructure(const r_code::Code* lhs, uint16 lhs_base_index, uint16 lhs_index, const r_code::Code* rhs, uint16 rhs_index, bool same_binding_state = false);
164  static bool Match(const r_code::Code* lhs, uint16 lhs_base_index, uint16 lhs_index, const r_code::Code* rhs, uint16 rhs_index, uint16 lhs_arity, bool same_binding_state = false);
165  static bool CounterEvidence(const r_code::Code* lhs, const r_code::Code* rhs);
172  static bool MatchObject(const r_code::Code *lhs, const r_code::Code *rhs, bool same_binding_state = false);
173 
174  bool is_invalidated() override;
175 
176  bool is_fact() const { return (code(0).asOpcode() == Opcodes::Fact); }
177  bool is_anti_fact() const { return (code(0).asOpcode() == Opcodes::AntiFact); }
178  void set_opposite() {
179  if (is_fact())
180  code(0) = Atom::Object(Opcodes::AntiFact, FACT_ARITY);
181  else
182  code(0) = Atom::Object(Opcodes::Fact, FACT_ARITY);
183  }
184  _Fact *get_absentee() const;
185 
186  bool match_timings_sync(const _Fact *evidence) const;
187  bool match_timings_overlap(const _Fact *evidence) const;
188  bool match_timings_inclusive(const _Fact *evidence) const;
189 
190  MatchResult is_evidence(const _Fact *target) const;
191  MatchResult is_timeless_evidence(const _Fact *target) const;
192 
193  bool has_after() const { return r_code::Utils::HasTimestamp<r_code::Code>(this, FACT_AFTER); }
194  bool has_before() const { return r_code::Utils::HasTimestamp<r_code::Code>(this, FACT_BEFORE); }
198  int get_after_var() const {
199  uint16 v_index = code(FACT_AFTER).asIndex();
200  if (code(v_index) == Atom::Object(Opcodes::Var, 1))
201  return (int)code(v_index + 1).asFloat();
202  return -1;
203  }
207  int get_before_var() const {
208  uint16 v_index = code(FACT_BEFORE).asIndex();
209  if (code(v_index) == Atom::Object(Opcodes::Var, 1))
210  return (int)code(v_index + 1).asFloat();
211  return -1;
212  }
213  Timestamp get_after() const;
214  Timestamp get_before() const;
215  float32 get_cfd() const { return code(FACT_CFD).asFloat(); }
216 
217  void set_cfd(float32 cfd) { code(FACT_CFD) = Atom::Float(cfd); }
218 
219  Pred *get_pred() const {
220  Code *pred = get_reference(0);
221  if (pred->code(0).asOpcode() == Opcodes::Pred)
222  return (Pred *)pred;
223  return NULL;
224  }
225  Goal *get_goal() const {
226  Code *goal = get_reference(0);
227  if (goal->code(0).asOpcode() == Opcodes::Goal)
228  return (Goal *)goal;
229  return NULL;
230  }
231  Success *get_success() const {
232  Code *success = get_reference(0);
233  if (success->code(0).asOpcode() == Opcodes::Success)
234  return (Success *)success;
235  return NULL;
236  }
237 
238  void trace() const;
239 };
240 
241 typedef enum {
242  SIM_ROOT = 0,
243  SIM_OPTIONAL = 1,
244  SIM_MANDATORY = 2
245 }SimMode;
246 
247 class r_exec_dll Sim :
248  public LObject {
249 public:
250  Sim(Sim *s); // is_requirement=false (not copied).
251  // For SIM_MANDATORY or SIM_OPTIONAL, provide solution_controller, solution_cfd and solution_before. Otherwise, defaults for SIM_ROOT.
252  // For SIM_ROOT, solution_before is unused so use Utils::GetTimeReference() which is 0s:0ms:0us in the decompiled output.
253  Sim(SimMode mode, std::chrono::microseconds thz, Fact *super_goal, bool opposite, Controller *root, float32 psln_thr, Controller *solution_controller = NULL, float32 solution_cfd = 0, Timestamp solution_before = r_code::Utils::GetTimeReference());
254  bool invalidate() override;
255  bool is_invalidated() override;
256  // If SIM_MANDATORY or SIM_OPTIONAL: qualifies a sub-goal of the branch's root.
257  SimMode get_mode() const { return (SimMode)(int)code(SIM_MODE).asFloat(); }
258  // simulation time allowance (this is not the goal deadline); 0 indicates no time for simulation.
259  std::chrono::microseconds get_thz() const {
260  return r_code::Utils::GetDuration<Code>(this, SIM_THZ);
261  }
262 
266  Fact* get_f_super_goal() const { return (Fact*)get_reference(0); }
267 
272  bool get_opposite() const { return code(SIM_OPPOSITE).asBoolean(); }
273 
277  float32 get_solution_cfd() const { return code(SIM_SOLUTION_CFD).asFloat(); }
278 
282  Timestamp get_solution_before() const { return r_code::Utils::GetTimestamp<Code>(this, SIM_SOLUTION_BEFORE); }
283 
287  void set_solution_before(Timestamp before) { return r_code::Utils::SetTimestamp<Code>(this, SIM_SOLUTION_BEFORE, before); }
288 
293  Sim* get_root_sim();
294 
303  bool register_goal_target(_Fact* f_obj);
304 
305  bool is_requirement_;
306 
307  P<Controller> root_; // controller that produced the simulation branch root (SIM_ROOT): identifies the branch.
308  P<Controller> solution_controller_; // controller that produced a sub-goal of the branch's root: identifies the model that can be a solution for the super-goal.
309 
316  public:
318  : promoted_fact_(NULL), original_fact_(NULL), defeasible_validity_(NULL)
319  {}
320 
327  DefeasiblePromotedFact(_Fact* original_fact, _Fact* promoted_fact, DefeasibleValidity* defeasible_validity)
328  : original_fact_(original_fact), promoted_fact_(promoted_fact), defeasible_validity_(defeasible_validity)
329  {}
330 
337  static bool has_original_fact(const r_code::list<DefeasiblePromotedFact>& list, const _Fact* original_fact);
338 
339  P<_Fact> original_fact_;
340  P<_Fact> promoted_fact_;
341  P<DefeasibleValidity> defeasible_validity_;
342  };
343  CriticalSectionList<DefeasiblePromotedFact> defeasible_promoted_facts_;
344 
345  // The list of actual (non-icst) facts in this Sim which are able to (or already have) defeat a fact in defeasible_promoted_facts_ .
346  // (For a critical section, expect to use defeasible_promoted_facts_.CS_ .)
347  r_code::list<P<_Fact> > defeating_facts_;
348 
349  // A list of (fact (pred (fact (cmd ::)))) to check if a command has already been signalled in this sim.
350  std::vector<P<_Fact> > already_signalled_;
351 
352 private:
353  std::vector<P<_Fact> > goalTargets_;
354 };
355 
356 // Caveat: instances of Fact can becone instances of AntiFact (set_opposite() upon MATCH_SUCCESS_NEGATIVE during backward chaining).
357 // In particular, is_fact() and is_anti_fact() are based on the opcode, not on the class.
358 // Do not store any data in this class.
359 class r_exec_dll Fact :
360  public _Fact {
361 public:
362  void *operator new(size_t s);
363  Fact();
364  Fact(r_code::SysObject *source);
365  Fact(Fact *f);
366  Fact(r_code::Code *object, Timestamp after, Timestamp before, float32 confidence, float32 psln_thr);
367 };
368 
369 // Caveat: as for Fact.
370 class r_exec_dll AntiFact :
371  public _Fact {
372 public:
373  void *operator new(size_t s);
374  AntiFact();
375  AntiFact(r_code::SysObject *source);
376  AntiFact(AntiFact *f);
377  AntiFact(r_code::Code *object, Timestamp after, Timestamp before, float32 confidence, float32 psln_thr);
378 };
379 
380 // Goals and predictions:
381 // When positive evidences are found for a goal/prediction, said object is invalidated: in g-monitors and p-monitors, respectively.
382 // Idem for negative evidences In such cases, an absentee (absence of the expected fact) is injected.
383 //
384 // A negative evidence is either:
385 // (a) a fact that is either the absence of the target (absentee) or a fact asserting a state for the target which is not the expected one (it is assumed that an object can be in only one state WRT a given attribute; and recurse in icst) or,
386 // (b) a prediction holding a fact that is a counter evidence for the target with a confidence higher than said target.
387 //
388 // When a decision ground is invalidated, the subsequent is also invalidated: said invalidation is performed in the p-monitors and g-monitors.
389 // When a super-goal is invalidated (simulated or actual), sub-goals are also invalidated: said invalidation is performed in the g-monitors of the sub-goals.
390 //
391 // Invalidation checks are performed at both _take_input() time and reduce() time as the invalidation may occur during the transit in the pipe.
392 
393 class r_exec_dll Pred :
394  public LObject {
395 public:
396  Pred();
397  Pred(r_code::SysObject *source);
404  Pred(_Fact *target, const std::vector<P<Sim> >& simulations, float32 psln_thr) : LObject() {
405  construct(target, simulations, psln_thr);
406  }
412  Pred(_Fact *target, float32 psln_thr) : LObject() {
413  construct(target, std::vector<P<Sim>>(), psln_thr);
414  }
421  Pred(_Fact *target, Sim* sim, float32 psln_thr) : LObject() {
422  std::vector<P<Sim>> simulations;
423  simulations.push_back(sim);
424  construct(target, simulations, psln_thr);
425  }
433  Pred(_Fact *target, const Pred* simulations_source, float32 psln_thr);
434 
441  bool is_invalidated() override;
442  bool grounds_invalidated(_Fact *evidence);
443 
444  _Fact *get_target() const { return (_Fact *)get_reference(0); }
445 
446  std::vector<P<_Fact> > grounds_; // f1->obj; predictions that were used to build this predictions (i.e. antecedents); empty if simulated.
447  // The set of DefeasibleValidity which is copied to each Pred made from this one. See is_invalidated().
448  std::set<P<DefeasibleValidity> > defeasible_validities_;
449  // This is set true when a DefeasibleValidity is added for a promoted prediction.
450  bool is_promoted_;
451 
452  bool is_simulation() const { return get_simulations_size() > 0; }
453 
458  uint16 get_simulations_size() const {
459  auto sim_set_index = code(PRED_SIMS).asIndex();
460  return code(sim_set_index).getAtomCount();
461  }
462 
468  Sim* get_simulation(uint16 i) const {
469  auto sim_set_index = code(PRED_SIMS).asIndex();
470  auto atom = code(sim_set_index + i);
471  return (Sim*)get_reference(atom.asIndex());
472  }
473 
479  Sim *get_simulation(Controller *root) const;
480 
486  bool has_simulation(Sim* sim) const;
487 
492  bool has_defeasible_consequence() const { return !!defeasible_consequence_; }
493 
500  if (!defeasible_consequence_)
501  defeasible_consequence_ = new DefeasibleValidity();
502  return defeasible_consequence_;
503  }
504 
505 private:
511  P<DefeasibleValidity> defeasible_consequence_;
512 
513  void construct(_Fact *target, const std::vector<P<Sim> >& simulations, float32 psln_thr);
514 };
515 
516 class r_exec_dll Goal :
517  public LObject {
518 public:
519  Goal();
520  Goal(r_code::SysObject *source);
521  Goal(_Fact *target, r_code::Code *actor, Sim* sim, float32 psln_thr);
522 
523  bool invalidate() override;
524  bool is_invalidated() override;
525  bool ground_invalidated(_Fact *evidence);
526 
527  bool is_requirement() const;
528 
529  bool is_self_goal() const;
530  bool is_drive() const { return (!has_sim() && is_self_goal() && get_target()->get_reference(0)->code(0).asOpcode() == Opcodes::Ent); }
531  bool is_imdl_drive() const {
532  return (!has_sim() && is_self_goal() && get_target()->get_reference(0)->code(0).asOpcode() == Opcodes::IMdl);
533  }
534 
535  _Fact *get_target() const { return (_Fact *)get_reference(0); }
536  _Fact *get_super_goal() const { return get_sim()->get_f_super_goal(); }
537  r_code::Code *get_actor() const { return get_reference(code(GOAL_ACTR).asIndex()); }
538 
543  bool has_sim() const { return code(GOAL_SIM).getDescriptor() == Atom::R_PTR; }
544 
549  // Debug: Define _Sim because if a replicode file defines (sim ...) it won't have all the fields.
550  Sim* get_sim() const { return has_sim() ? (Sim*)get_reference(code(GOAL_SIM).asIndex()) : NULL; }
551 
558  void set_sim(Sim* sim) {
559  if (has_sim()) {
560  std::cerr << "Goal::set_sim: Error: The goal already has a Sim. Ignoring the new sim." << std::endl;
561  return;
562  }
563 
564  code(GOAL_SIM) = Atom::RPointer(references_size());
565  add_reference(sim);
566  }
567 
573  bool is_simulation() const {
574  Sim* sim = get_sim();
575  return sim && sim->get_thz() != std::chrono::seconds(0);
576  }
577 
578  P<_Fact> ground_; // f->p->f->imdl (weak requirement) that allowed backward chaining, if any.
579 
580  // goal->target->cfd/(before-now).
581  float32 get_strength(Timestamp now) const {
582  _Fact *target = get_target();
583  return target->get_cfd() / std::chrono::duration_cast<std::chrono::microseconds>(target->get_before() - now).count();
584  }
585 };
586 
587 class r_exec_dll MkRdx :
588  public LObject {
589 public:
590  MkRdx();
591  MkRdx(r_code::SysObject *source);
592  MkRdx(r_code::Code *imdl_fact, r_code::Code *input, r_code::Code *output, float32 psln_thr, BindingMap *binding_map); // for mdl.
593  MkRdx(r_code::Code *imdl_fact, r_code::Code *input1, r_code::Code *input2, r_code::Code *output, float32 psln_thr, BindingMap *binding_map); // for mdl.
594 
595  r_code::Code* get_first_input() {
596  return get_reference(code(code(MK_RDX_INPUTS).asIndex() + 1).asIndex());
597  }
598 
599  r_code::Code* get_first_production() {
600  return get_reference(code(code(MK_RDX_PRODS).asIndex() + 1).asIndex());
601  }
602 
603  P<BindingMap> bindings_; // NULL when produced by programs.
604 };
605 
606 class r_exec_dll Success :
607  public LObject {
608 public:
609  Success();
610  Success(_Fact *object, _Fact *evidence, r_code::Code* object_mk_rdx, float32 psln_thr);
611  Success(_Fact* object, _Fact* evidence, float32 psln_thr): Success(object, evidence, NULL, psln_thr) {}
612 
617  _Fact *get_object() const { return (_Fact*)get_reference(code(SUCCESS_OBJ).asIndex()); }
618 
623  bool has_evidence() const { return code(SUCCESS_EVD).getDescriptor() == Atom::R_PTR; }
624 
629  _Fact* get_evidence() const { return has_evidence() ? (_Fact*)get_reference(code(SUCCESS_EVD).asIndex()) : NULL; }
630 
635  bool has_object_mk_rdx() const {
636  return code(SUCCESS_OBJ_MK_RDX).getDescriptor() == Atom::R_PTR &&
637  get_reference(code(SUCCESS_OBJ_MK_RDX).asIndex())->code(0).asOpcode() == Opcodes::MkRdx;
638  }
639 
644  MkRdx* get_object_mk_rdx() const { return has_object_mk_rdx() ? (MkRdx*)get_reference(code(SUCCESS_OBJ_MK_RDX).asIndex()) : NULL; }
645 };
646 
647 class r_exec_dll Perf :
648  public LObject {
649 public:
650  Perf();
651  Perf(std::chrono::microseconds reduction_job_avg_latency, std::chrono::microseconds d_reduction_job_avg_latency, std::chrono::microseconds time_job_avg_latency, std::chrono::microseconds d_time_job_avg_latency);
652 };
653 
654 class r_exec_dll ICST :
655  public LObject {
656 public:
657  ICST();
658  ICST(r_code::SysObject *source);
659 
660  bool is_invalidated() override;
661 
668  bool contains(const _Fact *component, uint16 &component_index) const;
669 
676  bool r_contains(const _Fact* component) const;
677 
678  P<BindingMap> bindings_;
679  std::vector<P<_Fact> > components_; // the inputs that triggered the building of the icst.
680 };
681 }
682 
683 
684 #endif
r_exec::Pred::get_simulation
Sim * get_simulation(uint16 i) const
Definition: factory.h:468
r_exec::Sim::get_f_super_goal
Fact * get_f_super_goal() const
Definition: factory.h:266
r_exec::Sim::get_solution_cfd
float32 get_solution_cfd() const
Definition: factory.h:277
r_exec::Sim::set_solution_before
void set_solution_before(Timestamp before)
Definition: factory.h:287
r_exec::AntiFact
Definition: factory.h:371
r_exec::_Fact::get_before_var
int get_before_var() const
Definition: factory.h:207
r_exec::Pred::get_defeasible_consequence
DefeasibleValidity * get_defeasible_consequence()
Definition: factory.h:499
r_exec::Goal::get_sim
Sim * get_sim() const
Definition: factory.h:550
r_exec::MkLowRes
Definition: factory.h:109
r_exec::Sim::get_solution_before
Timestamp get_solution_before() const
Definition: factory.h:282
r_exec::MkRdx
Definition: factory.h:588
r_exec::MkLowAct
Definition: factory.h:127
r_exec::BindingMap
Definition: binding_map.h:248
r_exec::Goal
Definition: factory.h:517
r_code::Atom
Definition: atom.h:104
r_exec::Sim
Definition: factory.h:248
r_exec::MkActChg
Definition: factory.h:145
r_exec::Sim::DefeasiblePromotedFact::DefeasiblePromotedFact
DefeasiblePromotedFact(_Fact *original_fact, _Fact *promoted_fact, DefeasibleValidity *defeasible_validity)
Definition: factory.h:327
r_exec::Pred::Pred
Pred(_Fact *target, float32 psln_thr)
Definition: factory.h:412
r_exec::_Fact
Definition: factory.h:155
r_code::SysObject
Definition: r_code/object.h:136
r_exec::Pred::Pred
Pred(_Fact *target, const std::vector< P< Sim > > &simulations, float32 psln_thr)
Definition: factory.h:404
r_exec::DefeasibleValidity
Definition: overlay.h:161
r_exec::LObject
Definition: r_exec/object.h:195
r_exec::Success::has_evidence
bool has_evidence() const
Definition: factory.h:623
r_exec::ICST
Definition: factory.h:655
core::P
Definition: base.h:103
r_exec::Success::get_evidence
_Fact * get_evidence() const
Definition: factory.h:629
r_exec::MkLowSln
Definition: factory.h:115
r_code::Code
Definition: r_code/object.h:224
r_exec::Success
Definition: factory.h:607
r_exec::MkHighSln
Definition: factory.h:121
r_exec::Success::has_object_mk_rdx
bool has_object_mk_rdx() const
Definition: factory.h:635
r_exec::Success::get_object_mk_rdx
MkRdx * get_object_mk_rdx() const
Definition: factory.h:644
r_exec::Goal::is_simulation
bool is_simulation() const
Definition: factory.h:573
r_exec::Pred::get_simulations_size
uint16 get_simulations_size() const
Definition: factory.h:458
r_exec::Perf
Definition: factory.h:648
r_exec::Pred
Definition: factory.h:394
r_exec::MkNew
Definition: factory.h:103
r_exec::Goal::set_sim
void set_sim(Sim *sim)
Definition: factory.h:558
r_exec::MkHighAct
Definition: factory.h:133
r_exec::Sim::get_opposite
bool get_opposite() const
Definition: factory.h:272
r_code::Mem
Definition: r_code/object.h:420
r_exec::Controller
Definition: controller.h:104
r_exec::Pred::has_defeasible_consequence
bool has_defeasible_consequence() const
Definition: factory.h:492
r_exec::_Fact::get_after_var
int get_after_var() const
Definition: factory.h:198
r_code::list
Definition: list.h:99
r_exec::Fact
Definition: factory.h:360
r_exec::CriticalSectionList
Definition: overlay.h:183
r_exec::Success::get_object
_Fact * get_object() const
Definition: factory.h:617
r_exec::Sim::DefeasiblePromotedFact
Definition: factory.h:315
r_exec::Goal::has_sim
bool has_sim() const
Definition: factory.h:543
r_exec::MkSlnChg
Definition: factory.h:139
r_exec::Pred::Pred
Pred(_Fact *target, Sim *sim, float32 psln_thr)
Definition: factory.h:421