OpenCog Framework
Branch: master, revision 6f0b7fc776b08468cf1b74aa9db028f387b4f0c0
|
#include <InferenceSCM.h>
Public Member Functions | |
InferenceSCM () | |
Private Member Functions | |
void | init (void) |
Handle | do_forward_chaining (Handle h, Handle rbs) |
Handle | do_backward_chaining (Handle h, Handle rbs) |
Static Private Member Functions | |
static void * | init_in_guile (void *) |
static void | init_in_module (void *) |
Definition at line 32 of file InferenceSCM.h.
InferenceSCM::InferenceSCM | ( | ) |
Definition at line 36 of file InferenceSCM.cc.
References init_in_guile().
h | target |
rbs | rule-based system atom |
Definition at line 119 of file InferenceSCM.cc.
References opencog::AtomSpace::add_link(), opencog::BackwardChainer::do_chain(), opencog::BackwardChainer::get_chaining_result(), opencog::BackwardChainer::set_target(), opencog::SchemeSmob::ss_get_env_as(), and opencog::Handle::UNDEFINED.
Run Forward Chaining on source h and rule-based system rbs
h | target |
rbs | rule-based system atom |
Parse (cog-fc ListLink()) as forward chaining with Handle::UNDEFINED which does pattern matching on the atomspace using the rules declared in the config. A similar functionality with the python version of the forward chainer.
Does variable fulfillment forward chaining or forward chaining based on target node
h. | example (cog-fc (InheritanceLink (VariableNode "$X") (ConceptNode "Human"))) finds all the matches for $X by first finding matching rules and then applying all of them using the pattern matcher. and (cog-fc (ConceptNode "Human")) will start forward chaining on the concept Human trying to generate inferences associated only with the conceptNode Human. |
Definition at line 83 of file InferenceSCM.cc.
References opencog::AtomSpace::add_link(), opencog::ForwardChainer::do_chain(), opencog::ForwardChainer::get_chaining_result(), opencog::AtomSpace::get_outgoing(), opencog::Atom::getType(), python.bindlink::result, opencog::SchemeSmob::ss_get_env_as(), and opencog::Handle::UNDEFINED.
|
private |
Definition at line 71 of file InferenceSCM.cc.
References do_backward_chaining(), and do_forward_chaining().
|
staticprivate |
Init function for using with scm_with_guile.
Creates the scheme module and uses it by default.
self | pointer to the InferenceSCM object |
Definition at line 52 of file InferenceSCM.cc.
References init_in_module().
|
staticprivate |
The main function for defining stuff in the scheme module.
data | pointer to the InferenceSCM object |
Definition at line 64 of file InferenceSCM.cc.
References init().