OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-ure commits / 6f4c6ee

Bug fix incorrect use of API, and remove old deprecated API
6f4c6eeba34cf6f17c534abf67cf1274a7ba32b4
by Linas Vepštas <linasvepstas@gmail.com> · 2025-02-02T20:31:31.000Z

Changed files (2) +3 -2

opencog/ure/Rule.cc +1 -1
……@@ -218,7 +218,7 @@ void Rule::init(const Handle& rule_alias, const Handle& rule, const Handle& rbs)
218218 _name = _rule_alias->get_name();
219219 _rbs = rbs;
220220 AtomSpace& as = *rule_alias->getAtomSpace();
221 Handle ml = as.get_link(MEMBER_LINK, rule_alias, rbs);
221 Handle ml = as.add_link(MEMBER_LINK, rule_alias, rbs);
222222 _tv = ml->getTruthValue();
223223
224224 verify_rule();
opencog/ure/UREConfig.cc +2 -1
……@@ -307,7 +307,8 @@ bool UREConfig::fetch_bool_param(const string& pred_name,
307307 Handle pred = _as.get_node(PREDICATE_NODE,
308308 std::move(std::string(pred_name)));
309309 if (pred) {
310 Handle eval = _as.get_link(EVALUATION_LINK, pred, input);
310 Handle eval = _as.get_link(EVALUATION_LINK,
311 std::move(HandleSeq({pred, input})));
311312 if (eval) {
312313 bool value = eval->getTruthValue()->get_mean() > 0.5;
313314 log_param_value(input, pred_name, value);