OpenCog Framework
Branch: master, revision 6f0b7fc776b08468cf1b74aa9db028f387b4f0c0
|
#include <ForwardChainerPMCB.h>
Public Member Functions | |
ForwardChainerPMCB (AtomSpace *as) | |
virtual | ~ForwardChainerPMCB () |
virtual void | set_pattern (const Variables &vars, const Pattern &pat) |
HandleSeq | get_products (void) |
void | set_fcmem (FCMemory *fcmem) |
virtual bool | node_match (const Handle &node1, const Handle &node2) |
virtual bool | link_match (const LinkPtr &lpat, const LinkPtr &lsoln) |
virtual bool | grounding (const std::map< Handle, Handle > &var_soln, const std::map< Handle, Handle > &pred_soln) |
![]() | |
Implicator (AtomSpace *as) | |
virtual void | insert_result (const Handle &) |
virtual UnorderedHandleSet | get_result_set () |
virtual HandleSeq | get_result_list () |
![]() | |
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) |
![]() | |
InitiateSearchCB (AtomSpace *) | |
virtual bool | initiate_search (PatternMatchEngine *) |
![]() | |
DefaultPatternMatchCB (AtomSpace *) | |
virtual bool | variable_match (const Handle &, const Handle &) |
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 | |
AtomSpace * | _as |
FCMemory * | _fcmem |
Definition at line 36 of file ForwardChainerPMCB.h.
ForwardChainerPMCB::ForwardChainerPMCB | ( | AtomSpace * | as | ) |
Definition at line 30 of file ForwardChainerPMCB.cc.
References _fcmem.
|
virtual |
Definition at line 37 of file ForwardChainerPMCB.cc.
HandleSeq ForwardChainerPMCB::get_products | ( | void | ) |
Definition at line 83 of file ForwardChainerPMCB.cc.
References opencog::Implicator::_result_list, opencog::Implicator::_result_set, and opencog::Implicator::get_result_list().
|
virtual |
A callback handler of the Pattern matcher used to store references to new conclusion the source list
Reimplemented from opencog::Implicator.
Definition at line 63 of file ForwardChainerPMCB.cc.
References _fcmem, opencog::FCMemory::get_cur_source(), opencog::Implicator::implicand, opencog::Implicator::insert_result(), opencog::Implicator::inst, and opencog::Instantiator::instantiate().
Called when a link in the template pattern needs to be compared to a possibly matching link in the atomspace. The first argument is a link from the pattern, and the second is a possible solution link from the atomspace. Return true if the links should be compared, else return false.
By default, the search continues if the link arity and the link types match.
Reimplemented from opencog::DefaultPatternMatchCB.
Definition at line 52 of file ForwardChainerPMCB.cc.
References opencog::DefaultPatternMatchCB::link_match().
Called when a node in the template pattern needs to be compared to a possibly matching node in the atomspace. The first argument is a node from the pattern, and the second is a possible solution (grounding) node from the atomspace.
Return true if the nodes match, else return false. By default, the nodes must be identical.
Reimplemented from opencog::DefaultPatternMatchCB.
Definition at line 41 of file ForwardChainerPMCB.cc.
References opencog::DefaultPatternMatchCB::node_match().
void ForwardChainerPMCB::set_fcmem | ( | FCMemory * | fcmem | ) |
Definition at line 78 of file ForwardChainerPMCB.cc.
References _fcmem.
|
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 47 of file ForwardChainerPMCB.h.
References opencog::InitiateSearchCB::set_pattern(), and opencog::DefaultPatternMatchCB::set_pattern().
|
private |
Definition at line 41 of file ForwardChainerPMCB.h.
|
private |
Definition at line 42 of file ForwardChainerPMCB.h.