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

Test if this is a typo in prelude #3412

Merged
merged 4 commits into from
Jan 26, 2023
Merged

Conversation

MikaelMayer
Copy link
Member

@MikaelMayer MikaelMayer commented Jan 26, 2023

This PR fixes #3411
Seems like one of Boogie's axiom was wrong, but it was unnoticed because another application axiom was ignoring the wrong argument.
I added the test case of the issue.

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

MikaelMayer and others added 3 commits January 26, 2023 10:27
This PR is an attempt at detecting if an axiom was wrongly instantiated. If all the CI test pass, then it's likely a typo fix and I'll follow up with a test to ensure #3411 is fixed
@MikaelMayer MikaelMayer marked this pull request as ready for review January 26, 2023 17:20
@MikaelMayer MikaelMayer self-assigned this Jan 26, 2023
Copy link
Collaborator

@RustanLeino RustanLeino left a comment

Choose a reason for hiding this comment

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

Great sleuthing! Thanks for fixing this bug! (I'm surprised anything at all could have worked with the bug.)

@MikaelMayer MikaelMayer merged commit 5bd9203 into master Jan 26, 2023
@MikaelMayer MikaelMayer deleted the fix-3411-higher-order-problem branch January 26, 2023 18:58
@MikaelMayer
Copy link
Member Author

The reason why it was working before was because of this axiom

axiom (forall t0: Ty, 
    t1: Ty, 
    heap: Heap, 
    h: [Heap,Box]Box, 
    r: [Heap,Box]bool, 
    rd: [Heap,Box]Set Box, 
    bx0: Box :: 
  { Apply1(t0, t1, heap, Handle1(h, r, rd), bx0) } 
  Apply1(t0, t1, heap, Handle1(h, r, rd), bx0) == h[heap, bx0]);

As you can see, t1 is not used in this beta reduction.

atomb pushed a commit to atomb/dafny that referenced this pull request Feb 1, 2023
This PR fixes dafny-lang#3411 
Seems like one of Boogie's axiom was wrong, but it was unnoticed because
another application axiom was ignoring the wrong argument.
I added the test case of the issue.

<small>By submitting this pull request, I confirm that my contribution
is made under the terms of the [MIT
license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).</small>
@stefan-aws stefan-aws mentioned this pull request Feb 1, 2023
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

Successfully merging this pull request may close these issues.

Higher-order functions problem
2 participants