ML-KULeuven / problog

ProbLog is a Probabilistic Logic Programming Language for logic programs with probabilities.

Home Page:https://dtai.cs.kuleuven.be/problog/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

numbervars/2 is not working

rmanhaeve opened this issue · comments

Produces a UnifyError

To reproduce:

query(numbervars(a(X))).

I get the following error on your example:

UnknownClause: No clauses found for 'numbervars/1' at 1:7.

, which seems expected to me.

You probably mean to use numbervars/2 or numbervars/3 (libraries).

Sorry, the example that breaks it is

query(numbervars(a(X),0)).

Ah yes.

Normal usage: query(numbervars(a(X),Y)).
Output: numbervars(a(X1),a($Var(0)))

What happens is engine_builtin.py::_built_in_numbervars() fails when calling unify_value. Because engine_unify.py::unify_value() raises the UnifyError. I am not familiar with numbervars so I'm not sure what the desired behavior is. Might need a try-catch there.