30 using namespace opencog;
39 throw RuntimeException(TRACE_INFO,
40 "UREConfigReader - invalid rulebase specified!");
95 return LinkCast(rule_names)->getOutgoingSet();
105 typed_var =
_as.
add_link(TYPED_VARIABLE_LINK, var_node, type_node),
125 return LinkCast(outputs)->getOutgoingSet();
133 string input_name =
NodeCast(input)->getName();
137 OC_ASSERT(outputs.size() == 1,
138 "Could not retrieve parameter %s for rule-based system %s. "
139 "There should be one and only one output for\n"
141 " SchemaNode \"%s\"\n"
144 "instead there are %u",
145 schema_name.c_str(), input_name.c_str(),
146 schema_name.c_str(), input_str.c_str(), outputs.size());
156 return tv->getMean() > 0.5;
RuleBaseParameters _rbparams
Handle add_node(Type t, const std::string &name="", bool async=false)
std::vector< Handle > HandleSeq
a list of handles
static const std::string max_iter_name
std::shared_ptr< TruthValue > TruthValuePtr
HandleSeq fetch_rules(Handle rbs)
int get_maximum_iterations() const
std::vector< Rule > rules
static const std::string top_rbs_name
ClassServer & classserver(ClassServerFactory *=ClassServer::createInstance)
static NodePtr NodeCast(const Handle &h)
bool remove_hypergraph(AtomSpace &as, Handle h)
static const Handle UNDEFINED
Handle satisfying_set(AtomSpace *, const Handle &)
void set_attention_allocation(bool)
static const std::string attention_alloc_name
const std::string & getTypeName(Type type)
const std::vector< Rule > & get_rules() const
static LinkPtr LinkCast(const Handle &h)
UREConfigReader(AtomSpace &as, Handle rbs)
static NumberNodePtr NumberNodeCast(const Handle &h)
bool fetch_bool_param(const std::string &pred_name, Handle input)
Handle bindlink(AtomSpace *, const Handle &)
void set_maximum_iterations(int)
HandleSeq fetch_execution_outputs(Handle schema, Handle input, Type type=ATOM)
bool get_attention_allocation() const
TruthValuePtr getTruthValue()
unsigned short Type
type of Atoms, represented as short integer (16 bits)
Handle add_link(Type t, const HandleSeq &outgoing, bool async=false)
double fetch_num_param(const std::string &schema_name, Handle input)