OpenCog Framework
Branch: master, revision 6f0b7fc776b08468cf1b74aa9db028f387b4f0c0
|
#include <UnifyPMCB.h>
Public Member Functions | |
UnifyPMCB (AtomSpace *, VariableListPtr, VariableListPtr) | |
virtual | ~UnifyPMCB () |
virtual bool | variable_match (const Handle &, const Handle &) |
virtual bool | grounding (const std::map< Handle, Handle > &var_soln, const std::map< Handle, Handle > &pred_soln) |
![]() | |
BackwardChainerPMCB (AtomSpace *, VariableListPtr) | |
virtual | ~BackwardChainerPMCB () |
virtual void | set_pattern (const Variables &vars, const Pattern &pat) |
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 | 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) |
Private Attributes | |
VariableListPtr | _ext_vars |
Definition at line 32 of file UnifyPMCB.h.
UnifyPMCB::UnifyPMCB | ( | AtomSpace * | as, |
VariableListPtr | int_vars, | ||
VariableListPtr | ext_vars | ||
) |
Constructor for the Unify PMCB.
as | the AtomSpace pointer |
ext_vars | a VariableList of external variables that typed variables can map to |
Definition at line 34 of file UnifyPMCB.cc.
|
virtual |
Definition at line 40 of file UnifyPMCB.cc.
|
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.
Reimplemented from opencog::BackwardChainerPMCB.
Definition at line 69 of file UnifyPMCB.cc.
References opencog::BackwardChainerPMCB::_int_vars, opencog::DefaultPatternMatchCB::_type_restrictions, opencog::BackwardChainerPMCB::pred_solns_, and opencog::BackwardChainerPMCB::var_solns_.
Called when a variable in the template pattern needs to be compared to a possible grounding node in the atomspace. The first argument is a variable from the pattern, and the second is a possible grounding node from the atomspace. Return true if the nodes match, else return false.
Reimplemented from opencog::DefaultPatternMatchCB.
Definition at line 45 of file UnifyPMCB.cc.
References _ext_vars, opencog::BackwardChainerPMCB::_int_vars, opencog::Atom::getType(), and opencog::DefaultPatternMatchCB::variable_match().
|
private |
Definition at line 43 of file UnifyPMCB.h.