OpenCog Framework
Branch: master, revision 6f0b7fc776b08468cf1b74aa9db028f387b4f0c0
|
#include <Satisfier.h>
Public Member Functions | |
Satisfier (AtomSpace *as) | |
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 > &term_soln) |
![]() | |
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) |
Public Attributes | |
TruthValuePtr | _result |
class Satisfier – pattern matching callback for checking satisfaction.
This class is meant to be used with the pattern matcher. When the pattern matcher calls the callback, it will do so with a particular grounding of the search pattern.
This will set the result TV to TRUE_TV if a grounding is found. More sophisticated TV calculations can be obtained by overloading this class.
Definition at line 48 of file Satisfier.h.
|
inline |
Definition at line 53 of file Satisfier.h.
|
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.
Definition at line 33 of file Satisfier.cc.
References _result, and opencog::TruthValue::TRUE_TV().
|
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 59 of file Satisfier.h.
References opencog::InitiateSearchCB::set_pattern(), and opencog::DefaultPatternMatchCB::set_pattern().
TruthValuePtr opencog::Satisfier::_result |
Definition at line 57 of file Satisfier.h.