31 using namespace opencog;
45 if (VARIABLE_NODE != t)
51 std::map<Handle,Handle>::const_iterator it =
_vmap->find(expr);
82 const HandleSeq& oset = lexpr->getOutgoingSet();
87 groset.push_back(oset[0]);
88 groset.push_back(gargs);
101 for (
const Handle& h : lexpr->getOutgoingSet())
109 oset_results.push_back(hg);
114 if (DELETE_LINK == t)
116 for (
const Handle& h: oset_results)
117 if (VARIABLE_NODE != h->getType())
128 if (EXECUTION_OUTPUT_LINK == t)
147 size_t sz = oset_results.size();
148 for (
size_t i=0; i< sz; i++)
152 return eolp->execute(
_as);
159 return flp->execute(
_as);
167 size_t sz = oset_results.size();
168 for (
size_t i=0; i< sz; i++)
195 const std::map<Handle, Handle> &vars)
199 throw InvalidParamException(TRACE_INFO,
200 "Asked to ground a null expression");
static PutLinkPtr PutLinkCast(const Handle &h)
const std::map< Handle, Handle > * _vmap
std::vector< Handle > HandleSeq
a list of handles
static LinkPtr factory(LinkPtr)
#define createExecutionOutputLink
std::shared_ptr< Link > LinkPtr
std::shared_ptr< FunctionLink > FunctionLinkPtr
ClassServer & classserver(ClassServerFactory *=ClassServer::createInstance)
static const Handle UNDEFINED
Handle satisfying_set(AtomSpace *, const Handle &)
static FunctionLinkPtr FunctionLinkCast(const Handle &h)
Handle instantiate(const Handle &expr, const std::map< Handle, Handle > &vars)
bool remove_atom(Handle h, bool recursive=false)
static LinkPtr LinkCast(const Handle &h)
std::shared_ptr< ExecutionOutputLink > ExecutionOutputLinkPtr
TruthValuePtr getTruthValue()
Handle walk_tree(const Handle &tree)
unsigned short Type
type of Atoms, represented as short integer (16 bits)
std::shared_ptr< PutLink > PutLinkPtr
Handle add_atom(AtomPtr atom, bool async=false)