File tree Expand file tree Collapse file tree
StrataTest/Languages/Core/Tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,14 +54,11 @@ def eval (E : Env) : Except Strata.DiagnosticModel (List Env × Statistics) :=
5454
5555 | .proc proc _md =>
5656 let (E, procStats) := Procedure.eval declsE proc
57- -- Reset path conditions to the pre-procedure state: a procedure's
58- -- preconditions and in-scope assumptions must not leak into later
59- -- procedures. A structured `exit` out of a labeled block does not pop the
60- -- path-condition frames it accumulated (the exiting path bypasses
61- -- `Env.merge`), so without this reset those frames would be threaded into
62- -- the next procedure and verify its obligations against an inconsistent
63- -- context. Everything else (deferred obligations, fresh-name set) carries
64- -- forward unchanged. See strata-org/Strata#1390.
57+ -- Reset path conditions to the pre-procedure state so a procedure's
58+ -- assumptions don't leak into later ones: a structured `exit` bypasses
59+ -- `Env.merge` and leaves its frames unpopped, which would otherwise be
60+ -- threaded into the next procedure (strata-org/Strata#1390). Deferred
61+ -- obligations and fresh names carry forward.
6562 let E := { E with pathConditions := declsE.pathConditions }
6663 go rest E (stats.merge procStats)
6764
Original file line number Diff line number Diff line change @@ -11,17 +11,10 @@ import StrataDDM.Integration.Lean.HashCommands
1111/-
1212Regression test for strata-org/Strata#1390.
1313
14- `Program.eval` threads one `Env` through every procedure. A path that leaves a
15- labeled block via a structured `exit` does not get its path conditions popped
16- (the exiting path bypasses `Env.merge`), so a procedure's preconditions and
17- in-scope assumptions used to leak into the next procedure's verification
18- context. When the leaked set was contradictory, the next procedure proved false
19- obligations vacuously — a silent green pass.
20-
21- `first` has an unsatisfiable precondition (`n >= 1` and `n <= 0`) and a
22- non-final structured `exit`. `second` has no spec; its `assert false` must be
23- reported as failing, not silently accepted. Before the fix this reported
24- `✅ pass`.
14+ A structured `exit` bypasses `Env.merge`, so a procedure's path conditions used
15+ to leak into later procedures; a contradictory leaked set then proved their
16+ false obligations vacuously. `first` has an unsatisfiable precondition + a
17+ structured `exit`; `second`'s `assert false` must fail, not silently pass.
2518-/
2619
2720meta section
You can’t perform that action at this time.
0 commit comments