-
Notifications
You must be signed in to change notification settings - Fork 73
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
Filter reflexive subset relations eagerly #177
base: master
Are you sure you want to change the base?
Filter reflexive subset relations eagerly #177
Conversation
&live_to_dying_regions_o2pq, | ||
&dying_can_reach_live, | ||
|&(_origin2, _point1, point2), &origin1, &origin3| ((origin1, point2), origin3), | ||
|&(_origin2, _point1, point2), &origin1, &origin3| { | ||
(origin1 != origin3).then(|| ((origin1, point2), origin3)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally not a big fan of bool::then
, but I don't mind if you and the others like it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I quite like it. If you and/or Niko find it too obtuse, we can change it of course.
This is how I envisioned we would do this in the end, so this looks good to me once we publish a datafrog release including rust-lang/datafrog#37. Do you remember if such predicates are accepted by Soufflé btw ? So that we can potentially extract datalog rules from our comments/book and easily run them with it (which is one of the reason they are (intended to be) written with upper-cased variables for example, and not the rust-like naming that they used to have). Doesn't matter much if it doesn't support it, maybe we just add the symmetry-removing predicate as a comment rather than part of the rule, or not. |
Souffle supports inequality as a predicate, along with many others, so that shouldn't be an issue. I like that it makes the rules correspond directly to the |
...instead of removing them at the start of each iteration.
ac7f36d
to
a6dbde6
Compare
I don't know the context here, but FYI, Soufflé has no requirements on the case of variables, you can even use the same identifier for the type and the attribute: i.e. |
Force pushed with |
Depends on rust-lang/datafrog#37.
Filter reflexive
subset
relations before they are added to therecent
tuples list.