OpenCog Framework
Branch: master, revision 6f0b7fc776b08468cf1b74aa9db028f387b4f0c0
|
#include <BackwardChainerPMCB.h>
Public Member Functions | |
BackwardChainerPMCB (AtomSpace *, VariableListPtr) | |
virtual | ~BackwardChainerPMCB () |
virtual void | set_pattern (const Variables &vars, const Pattern &pat) |
virtual bool | grounding (const std::map< Handle, Handle > &var_soln, const std::map< Handle, Handle > &pred_soln) |
std::vector< std::map< Handle, Handle > > | get_var_list () |
std::vector< std::map< Handle, Handle > > | get_pred_list () |
![]() | |
InitiateSearchCB (AtomSpace *) | |
virtual bool | initiate_search (PatternMatchEngine *) |
![]() | |
virtual | ~PatternMatchCallback () |
virtual bool | fuzzy_match (const Handle &ph, const Handle &gh) |
virtual IncomingSet | get_incoming_set (const Handle &h) |
virtual void | push (void) |
virtual void | pop (void) |
![]() | |
DefaultPatternMatchCB (AtomSpace *) | |
virtual bool | node_match (const Handle &, const Handle &) |
virtual bool | variable_match (const Handle &, const Handle &) |
virtual bool | link_match (const LinkPtr &, const LinkPtr &) |
virtual bool | post_link_match (const LinkPtr &, const LinkPtr &) |
virtual bool | clause_match (const Handle &, const Handle &) |
virtual bool | optional_clause_match (const Handle &pattrn, const Handle &grnd) |
virtual bool | evaluate_sentence (const Handle &pat, const std::map< Handle, Handle > &gnds) |
virtual const std::set< Type > & | get_connectives (void) |
bool | optionals_present (void) |
Protected Attributes | |
AtomSpace * | _as |
VariableListPtr | _int_vars |
std::vector< std::map< Handle, Handle > > | var_solns_ |
std::vector< std::map< Handle, Handle > > | pred_solns_ |
![]() | |
ClassServer & | _classserver |
const Variables * | _variables |
const Pattern * | _pattern |
const VariableTypeMap * | _type_restrictions |
const std::set< Handle > * | _dynamic |
Handle | _root |
Handle | _starter_term |
bool | _search_fail |
AtomSpace * | _as |
![]() | |
ClassServer & | _classserver |
const VariableTypeMap * | _type_restrictions = NULL |
const std::set< Handle > * | _dynamic = NULL |
bool | _have_evaluatables = false |
AtomSpace | _temp_aspace |
Instantiator | _instor |
std::set< Type > | _connectives |
bool | _optionals_present = false |
AtomSpace * | _as |
Additional Inherited Members | |
![]() | |
virtual Handle | find_starter (const Handle &, size_t &, Handle &, size_t &) |
virtual Handle | find_thinnest (const HandleSeq &, const std::set< Handle > &, Handle &, size_t &) |
virtual void | find_rarest (const Handle &, Handle &, size_t &) |
virtual bool | neighbor_search (PatternMatchEngine *) |
virtual bool | link_type_search (PatternMatchEngine *) |
virtual bool | variable_search (PatternMatchEngine *) |
virtual bool | no_search (PatternMatchEngine *) |
![]() | |
bool | eval_term (const Handle &pat, const std::map< Handle, Handle > &gnds) |
bool | eval_sentence (const Handle &pat, const std::map< Handle, Handle > &gnds) |
Definition at line 33 of file BackwardChainerPMCB.h.
BackwardChainerPMCB::BackwardChainerPMCB | ( | AtomSpace * | as, |
VariableListPtr | int_vars | ||
) |
Definition at line 29 of file BackwardChainerPMCB.cc.
|
virtual |
Definition at line 37 of file BackwardChainerPMCB.cc.
Definition at line 67 of file BackwardChainerPMCB.cc.
References pred_solns_.
Return list of matching results found by the pattern matcher
Definition at line 63 of file BackwardChainerPMCB.cc.
References var_solns_.
|
virtual |
Called when a complete grounding for all clauses is found. Should return false to search for more solutions; or return true to terminate search. (Just as in all the other callbacks, a return value of true
means that the proposed grounding is acceptable. The engine is designed to halt once an acceptable solution has been found; thus, in order to force it to search for more, a return value of false is needed.)
Note that the callback may be called many times reporting the same result.
Implements opencog::PatternMatchCallback.
Reimplemented in opencog::UnifyPMCB.
Definition at line 41 of file BackwardChainerPMCB.cc.
References _int_vars, pred_solns_, and var_solns_.
|
inlinevirtual |
Called before search initiation, to indicate the pattern that will be searched for, and the variables to be grounded during the search.
Reimplemented from opencog::DefaultPatternMatchCB.
Definition at line 48 of file BackwardChainerPMCB.h.
References opencog::InitiateSearchCB::set_pattern(), and opencog::DefaultPatternMatchCB::set_pattern().
|
protected |
Definition at line 38 of file BackwardChainerPMCB.h.
|
protected |
Definition at line 39 of file BackwardChainerPMCB.h.
Definition at line 42 of file BackwardChainerPMCB.h.
Definition at line 41 of file BackwardChainerPMCB.h.