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

feat: Verification coverage analysis for axioms #948

Merged
merged 7 commits into from
Oct 7, 2024

Conversation

fabiomadge
Copy link
Contributor

@fabiomadge fabiomadge commented Sep 17, 2024

This PR enables verification coverage analysis for axioms.

atomb
atomb previously approved these changes Oct 4, 2024
Copy link
Collaborator

@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.

This looks great! I'm glad it turned out to be this simple.

@keyboardDrummer
Copy link
Collaborator

Can you provide the Dafny code that uses this PR? Probably best to have working Dafny code before merging this, in particular because this PR does not add tests.

@atomb
Copy link
Collaborator

atomb commented Oct 7, 2024

Can you provide the Dafny code that uses this PR? Probably best to have working Dafny code before merging this, in particular because this PR does not add tests.

Since this PR is an extension of an existing feature, it updates the tests for that feature to include the newly-covered case rather than adding new tests.

It might still be worth having the Dafny side of this ready before merging.

@atomb atomb merged commit 475faa0 into boogie-org:master Oct 7, 2024
5 checks passed
axiomConjuncts.Add(translator.Translate(ax.Expr));
var expr = translator.Translate(ax.Expr);
var assumeId = QKeyValue.FindStringAttribute(ax.Attributes, "id");
if (assumeId != null && options.TrackVerificationCoverage)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there already code like this around somewhere else? If so can you prevent the duplication?

@@ -226,7 +226,15 @@ public override void AddAxiom(Axiom ax, string attributes)
//Contract.Requires(ax != null);
base.AddAxiom(ax, attributes);

axiomConjuncts.Add(translator.Translate(ax.Expr));
var expr = translator.Translate(ax.Expr);
var assumeId = QKeyValue.FindStringAttribute(ax.Attributes, "id");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Where does the magic constant "id" come from?

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.

3 participants