Skip to content

Commit

Permalink
Add missing special-case.
Browse files Browse the repository at this point in the history
  • Loading branch information
linas committed Apr 7, 2020
1 parent 9be3333 commit 5b1642d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion opencog/atoms/truthvalue/FormulaTruthValue.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <opencog/util/platform.h>
#include <opencog/util/exceptions.h>

#include <opencog/atoms/execution/EvaluationLink.h>
#include <opencog/atoms/value/ValueFactory.h>
#include "FormulaTruthValue.h"

Expand Down Expand Up @@ -80,7 +81,12 @@ void FormulaTruthValue::update(void) const
// If there is just one formula, then we expect it to produce
// two numbers, the strength and the confidence.
const Handle& fo = _formula[0];
if (fo->is_evaluatable())
if (fo->get_type() == PREDICATE_FORMULA_LINK)
{
TruthValuePtr tvp = EvaluationLink::do_evaluate(_as, fo);
_value = tvp->value();
}
else if (fo->is_evaluatable())
{
TruthValuePtr tvp = fo->evaluate(_as);
_value = tvp->value();
Expand Down

0 comments on commit 5b1642d

Please sign in to comment.