Skip to content

Commit

Permalink
Use correct flag when checking if captureState assumptions need to be…
Browse files Browse the repository at this point in the history
… inserted (#835)

When discharging verification conditions, Boogie optionally inserts
`:captureState` assumptions into the AST. This improves error reporting
in case of a proof failure. Currently, these assumptions are only
inserted if the user wants to print the counterexample model to a file.
However, a counterexample model is sometimes used within Boogie without
being printed to a file, in which case the `:captureState` assumptions
should still be inserted. This PR changes the condition under which
Boogie adds `:captureState` assumptions to account for such scenarios.
  • Loading branch information
Dargones authored Jan 19, 2024
1 parent 2f8cbde commit 20abd87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/VCGeneration/ConditionGeneration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1146,7 +1146,7 @@ protected void TurnIntoPassiveCmd(TextWriter traceWriter, Cmd c, Block enclosing
}

Expr copy = Substituter.ApplyReplacingOldExprs(incarnationSubst, oldFrameSubst, pc.Expr);
if (Options.ModelViewFile != null && pc is AssumeCmd captureStateAssumeCmd)
if (Options.ExpectingModel && pc is AssumeCmd captureStateAssumeCmd)
{
string description = QKeyValue.FindStringAttribute(pc.Attributes, "captureState");
if (description != null)
Expand Down

0 comments on commit 20abd87

Please sign in to comment.