|
OpenCog Framework
Branch: master, revision 6f0b7fc776b08468cf1b74aa9db028f387b4f0c0
|
#include <FunctionLink.h>
Inheritance diagram for opencog::FunctionLink:
Collaboration diagram for opencog::FunctionLink:Static Public Member Functions | |
| static Handle | do_execute (AtomSpace *, const Handle &) |
| static LinkPtr | factory (LinkPtr) |
| static Handle | factory (Type, const HandleSeq &) |
Additional Inherited Members | |
Protected Types inherited from opencog::Atom | |
| typedef std::shared_ptr< InSet > | InSetPtr |
Protected Attributes inherited from opencog::FreeLink | |
| HandleSeq | _varseq |
| std::map< Handle, unsigned int > | _index |
Protected Attributes inherited from opencog::Link | |
| HandleSeq | _outgoing |
Protected Attributes inherited from opencog::Atom | |
| UUID | _uuid |
| AtomTable * | _atomTable |
| Type | _type |
| char | _flags |
| TruthValuePtr | _truthValue |
| AttentionValuePtr | _attentionValue |
| std::mutex | _mtx |
| InSetPtr | _incoming_set |
The FunctionLink provides a base class with an important method: execute().
The execute() method executes the given expression, and returns a Handle resulting from the execution.
The difference between execution and reduction is this: an expression that contains free variables will contain the same free variables (or a subset of them) after reduction. By contrast, it is (usually) not valid to execute an expression that contains free variables; usually, an error will be thrown. Thus, reduction is for open sentences, execution is for closed sentences.
Note also: EvaluationLinks can be reduced, but they can never be executed (they can only be evaluated).
Definition at line 52 of file FunctionLink.h.
|
protected |
Definition at line 44 of file FunctionLink.cc.
References opencog::classserver(), and opencog::FreeLink::init().
|
protected |
Definition at line 54 of file FunctionLink.cc.
References opencog::classserver(), and opencog::FreeLink::init().
| FunctionLink::FunctionLink | ( | Type | t, |
| const HandleSeq & | oset, | ||
| TruthValuePtr | tv = TruthValue::NULL_TV(), |
||
| AttentionValuePtr | av = AttentionValue::DEFAULT_AV() |
||
| ) |
Definition at line 34 of file FunctionLink.cc.
References opencog::classserver(), and opencog::FreeLink::init().
| FunctionLink::FunctionLink | ( | Link & | l | ) |
Definition at line 64 of file FunctionLink.cc.
References opencog::classserver(), opencog::Atom::getType(), and opencog::FreeLink::init().
|
inlinevirtual |
Definition at line 69 of file FunctionLink.h.
Definition at line 79 of file FunctionLink.cc.
References factory(), opencog::FunctionLinkCast(), and opencog::LinkCast().
Here is the caller graph for this function:Reimplemented in opencog::RemoveLink, opencog::InsertLink, opencog::AssignLink, opencog::ArithmeticLink, and opencog::ExecutionOutputLink.
Definition at line 73 of file FunctionLink.cc.
References opencog::classserver(), and opencog::Atom::getType().
Definition at line 90 of file FunctionLink.cc.
References opencog::FunctionLinkCast(), and opencog::LinkCast().
Here is the caller graph for this function:Definition at line 104 of file FunctionLink.cc.
References createAssignLink, createDeleteLink, createInsertLink, createPlusLink, createRemoveLink, createTimesLink, and opencog::Atom::Handle.