OpenCog Framework  Branch: master, revision 6f0b7fc776b08468cf1b74aa9db028f387b4f0c0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
opencog::InferenceSCM Class Reference

#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 *)
 

Detailed Description

Definition at line 32 of file InferenceSCM.h.

Constructor & Destructor Documentation

InferenceSCM::InferenceSCM ( )

Definition at line 36 of file InferenceSCM.cc.

References init_in_guile().

Member Function Documentation

Handle InferenceSCM::do_backward_chaining ( Handle  h,
Handle  rbs 
)
private
Parameters
htarget
rbsrule-based system atom
Returns
???

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.

+ Here is the caller graph for this function:

Handle InferenceSCM::do_forward_chaining ( Handle  h,
Handle  rbs 
)
private

Run Forward Chaining on source h and rule-based system rbs

Parameters
htarget
rbsrule-based system atom
Returns
???

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

Parameters
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.

+ Here is the caller graph for this function:

void InferenceSCM::init ( void  )
private

Definition at line 71 of file InferenceSCM.cc.

References do_backward_chaining(), and do_forward_chaining().

+ Here is the caller graph for this function:

void * InferenceSCM::init_in_guile ( void *  self)
staticprivate

Init function for using with scm_with_guile.

Creates the scheme module and uses it by default.

Parameters
selfpointer to the InferenceSCM object
Returns
null

Definition at line 52 of file InferenceSCM.cc.

References init_in_module().

+ Here is the caller graph for this function:

void InferenceSCM::init_in_module ( void *  data)
staticprivate

The main function for defining stuff in the scheme module.

Parameters
datapointer to the InferenceSCM object

Definition at line 64 of file InferenceSCM.cc.

References init().

+ Here is the caller graph for this function:


The documentation for this class was generated from the following files: