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

Prevent some post-probabilistic rule to be considered as probabilistic #593

Merged
merged 1 commit into from Jan 18, 2021

Conversation

tgy
Copy link
Collaborator

@tgy tgy commented Jan 18, 2021

Fix an error where a rule depending on a post-probabilistic rule was considered
to be probabilistic, which cannot happen as any rule depending on a
post-probabilistic rule must be deterministic and in the post-probabilistic
stratum.

@tgy tgy requested a review from demianw January 18, 2021 15:28
@@ -175,7 +175,7 @@ def _get_rule_idb_type(rule, grpd_symbs, wlq_symbs):
| grpd_symbs["post_probabilistic"]
).issuperset(dep_symbs):
idb_type = "post_probabilistic"
elif not grpd_symbs["probabilistic"].isdisjoint(dep_symbs):
elif not (grpd_symbs["probabilistic"] - wlq_symbs).isdisjoint(dep_symbs):
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a simple fix that excludes relations defined by within-language queries from the dependency check.

a rule is probabilistic here if it depends on another probabilistic rule that is NOT a WLQ

@tgy tgy added the bug Something isn't working label Jan 18, 2021
@demianw demianw merged commit bc2790f into master Jan 18, 2021
@tgy tgy deleted the stratification-fix branch January 29, 2021 08:57
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

Successfully merging this pull request may close these issues.

None yet

2 participants