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

QL: remove consistency errors related to resolving multiple predicates from parameterized modules #10181

Merged
merged 2 commits into from Aug 29, 2022

Conversation

erik-krogh
Copy link
Contributor

@erik-krogh erik-krogh commented Aug 25, 2022

Predicate references in prameterized modules will resolve to multiple predicates, that's a feature (for now).
This fixes a FP in the consistency test related to that.

@erik-krogh erik-krogh marked this pull request as ready for review Aug 25, 2022
@erik-krogh erik-krogh requested a review from a team as a code owner Aug 25, 2022
kaeluka
kaeluka previously approved these changes Aug 26, 2022
Copy link
Contributor

@kaeluka kaeluka left a comment

I've tried to understand this PR and my interpretation is that you're seeing consistency errors due to this line:

msg = "PredConsistency::multipleResolvePredicateExpr"

If that interpretation is correct and you've read my other comment, merge away.

resolvePredicateExpr(pe, p)
resolvePredicateExpr(pe, p) and
// parameterized modules are expected to resolve to multiple.
not exists(Predicate sig | not exists(sig.getBody()) and resolvePredicateExpr(pe, sig))
Copy link
Contributor

@kaeluka kaeluka Aug 26, 2022

Choose a reason for hiding this comment

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

not exists(sig.getBody) is the way you're checking that the predicate is part of a parameterized module interface? If so, I think that would well deserve a named predicate or a named class. A name would make this line easier to read, and it would also make it less likely that others in the future have to re-invent/re-discover this logic.

Copy link
Contributor

@kaeluka kaeluka left a comment

LGTM!

@erik-krogh erik-krogh merged commit 68bf9f3 into github:main Aug 29, 2022
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants