File tree Expand file tree Collapse file tree
StrataTest/Languages/Python/expected_laurel Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -98,12 +98,9 @@ def analyzeProc (proc : Procedure) : AnalysisResult :=
9898 let bodyResult := match proc.body with
9999 | .Transparent b => (collectExprMd b).run {} |>.2
100100 | .Opaque postconds impl modif =>
101- -- A non-empty modifies clause (excluding wildcard `*`) implies the procedure
102- -- reads and writes the heap; no need to inspect the body further in that case.
103- -- Wildcard modifies does not imply heap access — it only suppresses the frame condition.
104- let isWildcard (e : StmtExprMd) : Bool := match e.1 with | .All => true | _ => false
105- let concreteModifies := modif.filter (fun e => !isWildcard e)
106- if !concreteModifies.isEmpty then
101+ -- A non-empty modifies clause implies the procedure reads and writes the heap;
102+ -- no need to inspect the body further in that case.
103+ if !modif.isEmpty then
107104 { readsHeapDirectly := true, writesHeapDirectly := true, callees := [] }
108105 else
109106 let r1 := postconds.foldl (fun (acc : AnalysisResult) (pc : Condition) =>
Original file line number Diff line number Diff line change @@ -2455,11 +2455,7 @@ def PreludeInfo.ofLaurelProgram (prog : Laurel.Program) : PreludeInfo where
24552455 prog.staticProcedures.filterMap fun p =>
24562456 if p.body.isExternal || p.isFunctional then none else some p.name.text
24572457 inlinableProcedures :=
2458- prog.staticProcedures.foldl (init := {}) fun s p =>
2459- match p.body with
2460- | .Transparent _ => s.insert p.name.text
2461- | .Opaque _ (some _) _ => s.insert p.name.text
2462- | _ => if !p.preconditions.isEmpty then s.insert p.name.text else s
2458+ prog.staticProcedures.foldl (init := {}) fun s p => s.insert p.name.text
24632459
24642460/-- Merge two `PreludeInfo` values by concatenating each field. -/
24652461def PreludeInfo.merge (a b : PreludeInfo) : PreludeInfo where
Original file line number Diff line number Diff line change 1- test_class_decl.py(9, 4): ✅ pass - callElimAssert_requires_15
1+ test_class_decl.py(9, 4): ✅ pass - (CircularBuffer@__init__ requires) Type constraint of n
22DETAIL: 1 passed, 0 failed, 0 inconclusive
33RESULT: Analysis success
You can’t perform that action at this time.
0 commit comments