Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

numbervars/2 is not working #95

Open
rmanhaeve opened this issue Dec 12, 2022 · 3 comments
Open

numbervars/2 is not working #95

rmanhaeve opened this issue Dec 12, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@rmanhaeve
Copy link
Contributor

Produces a UnifyError

To reproduce:

query(numbervars(a(X))).
@rmanhaeve rmanhaeve added the bug Something isn't working label Dec 12, 2022
@VincentDerk
Copy link
Collaborator

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).

@rmanhaeve
Copy link
Contributor Author

Sorry, the example that breaks it is

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

@VincentDerk
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants