Skip to content

Use entire goal in proof strategy #1936

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

Merged

Conversation

ana-pantilie
Copy link
Contributor

Fixes #1918


Reviewer checklist
  • Test coverage: stack test --coverage
  • Public API documentation: stack haddock

@ana-pantilie ana-pantilie marked this pull request as ready for review July 1, 2020 12:24
@ana-pantilie ana-pantilie requested a review from ttuegel July 1, 2020 14:15
:: InternalVariable variable
=> RHS variable
-> Pattern variable
rhsToPattern RHS { existentials, right, ensures } =
Copy link
Contributor

Choose a reason for hiding this comment

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

This transformation is not valid, it takes

\exists(X, \and(right, ensures))

and turns it into

\and(\exists(X, right), \exists(X, ensures))

The correct thing to do is construct a Pattern using right and ensures, convert that into a TermLike, and call mkExistsN on that TermLike.

Copy link
Contributor Author

@ana-pantilie ana-pantilie Jul 2, 2020

Choose a reason for hiding this comment

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

Yes, you're right, the second doesn't imply the first, so they're not equivalent. Thanks!

I noticed that there already is a rhsToTerm which only does some trivial simplification in the case the ensures is \top. Pattern.toTermLike also does this for \bottom. Changing rhsToTerm to use Pattern.fromTermLike made some unit tests fail. Is there any reason we don't use this there? In any case, I just implemented rhsToPattern without using rhsToTerm.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the reason is only that, in some cases, we expect the \and structure of the Pattern to be preserved. Does that answer your question?

@ana-pantilie ana-pantilie requested a review from ttuegel July 3, 2020 11:35
:: InternalVariable variable
=> RHS variable
-> Pattern variable
rhsToPattern RHS { existentials, right, ensures } =
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the reason is only that, in some cases, we expect the \and structure of the Pattern to be preserved. Does that answer your question?

@rv-jenkins rv-jenkins merged commit 3888160 into runtimeverification:master Jul 8, 2020
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.

Proof strategy assumes claim is immutable
3 participants