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

rules with equality in body (sometimes) not processed? #5

Closed
alanruttenberg opened this issue May 23, 2018 · 3 comments
Closed

rules with equality in body (sometimes) not processed? #5

alanruttenberg opened this issue May 23, 2018 · 3 comments

Comments

@alanruttenberg
Copy link

I'm trying to track down why I'm getting fewer facts with graal than with my previous solution. I think I've narrowed it down to rules like the below.

precedes(O1,O2) :- precedes(Sk2,Sk1),Sk1 = O2 ,temporallyProjectsOnto(O1,Sk2).

It's a stupid use of =. While a person wouldn't write these rules, the process that generates them is more stupid and currently does.

I could fix the rules by doing the = substitution as pre-process

precedes(O1,O2) :- precedes(Sk2,O2),temporallyProjectsOnto(O1,Sk2).

I may land up doing that to detect (effectively) duplicate rules. But still, it would be good to know if this is a known issue/expected behavior or bug.

Thanks

@sipi
Copy link
Contributor

sipi commented May 24, 2018

Hi Alan,
Although DLGP allows to express equality, we don't manage it in Graal, neither in the body nor in the head.
So, equality atoms are treated like others. They will be true iff there are in the store.

We will update the Graal documentation to be explicit with this behavior.

Thanks

@alanruttenberg
Copy link
Author

Ok. You might consider throwing an unsupported feature exception in the parser if equality is used - it's an easy thing to miss, even if documented, and using = as a regular predicate isn't typical behavior.

Thanks!

@sipi
Copy link
Contributor

sipi commented May 25, 2018

We can't just throw an exception in the parser because we want to let users the possibility to handle them. However, I agree with you, it's an easy thing to miss even if documented.

I take note of your comment.

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

No branches or pull requests

2 participants