Skip to content

Commit

Permalink
Bug-fix for issue opencog#2546
Browse files Browse the repository at this point in the history
CondLink was incomplete in reducing things.
  • Loading branch information
linas committed Apr 20, 2020
1 parent 1a8c7f5 commit 32599fb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion opencog/atoms/core/CondLink.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include <opencog/atoms/base/ClassServer.h>
#include <opencog/atoms/execution/EvaluationLink.h>
#include <opencog/atoms/execution/Instantiator.h>

#include "CondLink.h"

Expand Down Expand Up @@ -96,7 +97,10 @@ ValuePtr CondLink::execute(AtomSpace *scratch, bool silent)
{
if (exps[i]->is_executable())
return exps[i]->execute(scratch, silent);
return exps[i];

// Reduce the clause further, if possible.
Instantiator inst(scratch);
return inst.execute(exps[i]);
}
}

Expand Down

0 comments on commit 32599fb

Please sign in to comment.