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

Add yet more ProofObligationDescription expressions #5467

Merged
merged 8 commits into from
May 20, 2024

Conversation

alex-chew
Copy link
Contributor

Description

Adds more ProofObligationDescription asserted expressions, viewable by the previously added --show-proof-obligation-expressions flag.

@alex-chew alex-chew requested a review from atomb May 20, 2024 21:58
Copy link
Member

@atomb atomb left a comment

Choose a reason for hiding this comment

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

Looks good!

@@ -81,7 +81,7 @@ public partial class BoogieGenerator {
// FREE PRECONDITIONS
if (kind == MethodTranslationKind.SpecWellformedness || kind == MethodTranslationKind.Implementation) { // the other cases have no need for a free precondition
// free requires mh == ModuleContextHeight && fh = FunctionContextHeight;
req.Add(Requires(iter.tok, true, etran.HeightContext(iter), null, null, null));
req.Add(Requires(iter.tok, true, null, etran.HeightContext(iter), null, null, null));
Copy link
Member

Choose a reason for hiding this comment

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

At first I was confused by the null parameter here and then realized that these are free requires clauses so they'll never be part of any proof obligation.

@@ -0,0 +1,6 @@
ensures-stronger.dfy(16,2): Error: the method must provide an equal or more detailed postcondition than in its parent trait
Asserted expression: P(res') ==> b' ==> Q(res')
Copy link
Member

Choose a reason for hiding this comment

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

This is a nice case where I think seeing the asserted expression is especially helpful.

@atomb atomb merged commit 33edb8b into master May 20, 2024
21 checks passed
@atomb atomb deleted the alexchew/podesc-expr-3 branch May 20, 2024 22:33
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.

None yet

2 participants