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

Conditions involving more than one variable #151

Open
jariji opened this issue Mar 31, 2023 · 2 comments
Open

Conditions involving more than one variable #151

jariji opened this issue Mar 31, 2023 · 2 comments

Comments

@jariji
Copy link

jariji commented Mar 31, 2023

Is there a way I can put conditions on the relationship between variables?

@rule x y (x < y) x - y --> 0
@kylebd99
Copy link
Contributor

kylebd99 commented Jun 7, 2023

Not sure if this is still helpful, but I think that this is a good use case for the where predicate. It allows you to insert a general boolean function of the arguments. For example, this rule would look like:

@rule x y   x - y --> 0  where (x < y)

However, you will want to be careful about types and making sure that all of the arguments work in your boolean function, e.g. sometimes the arguments will be EClasses.

@gkronber
Copy link
Collaborator

gkronber commented Oct 4, 2024

Related to #246

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

3 participants