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

negation error with constants inside the negated atom #452

Closed
Laschoking opened this issue Feb 7, 2024 · 1 comment · Fixed by #457
Closed

negation error with constants inside the negated atom #452

Laschoking opened this issue Feb 7, 2024 · 1 comment · Fixed by #457

Comments

@Laschoking
Copy link

Using constants in negated atoms does not work, when there is more than 1 negated atom per rule.
In the example I use string constants, but it is the same with integers.

  1. Error, when using one constant "a" in 2 negated atoms:
C(?a,?a0,?a1):-
    A(?a,?a0,?a1),
    ~ B(?a,?a0),
    ~ B("a",?a1).
  1. Error, when using two constants in 2 negated atoms:
C(?a,?a0,?a1):-
    A(?a,?a0,?a1),
    ~B("a",?a0),
    ~B(?"a",?a1).

The error message is:

thread 'main' panicked at nemo/src/execution/planning/arithmetic.rs:38:26:
Variable order must contain an entry for every variable.

The error also triggers, when the two negated atoms are referring to different relations (i.e. replace the second negated atom with ~D("a",?a1) and it will still not work).

@matzemathics
Copy link
Collaborator

this is likely also related to #446, which definitely needs to be addressed for the next release

@aannleax aannleax mentioned this issue Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants