Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
d0d3e11
test: Add reproduction for list.append() hole not mutating receiver
ssomayyajula Apr 22, 2026
ddea3df
fix: Havoc value-typed locals referenced in unmodeled calls
ssomayyajula Apr 22, 2026
70e93e7
Merge github/main into fix-python-laurel-hole-mutate-receiver
ssomayyajula Apr 22, 2026
ee15f2d
fix: Havoc local arguments in unmodeled calls
ssomayyajula Apr 22, 2026
d0b1a17
fix: Use unknown method in argument havoc test
ssomayyajula Apr 22, 2026
b4853a3
fix: Regenerate expected output in default (deductive) mode
ssomayyajula Apr 22, 2026
3a73276
Merge github/main: resolve expected output conflict
ssomayyajula Apr 22, 2026
c329108
Merge branch 'main' into fix-python-laurel-hole-mutate-receiver
thanhnguyen-aws Apr 23, 2026
13b307c
fix: Only havoc Any-typed arguments in unmodeled calls
ssomayyajula Apr 27, 2026
c7f8429
Merge github/main into fix-python-laurel-hole-mutate-receiver
ssomayyajula Apr 28, 2026
c037d3c
docs: Document that composite heap havoc is out of scope
ssomayyajula Apr 28, 2026
9a4658c
Merge remote-tracking branch 'github/main' into fix-python-laurel-hol…
ssomayyajula Apr 28, 2026
9104a80
Merge branch 'fix-python-laurel-hole-mutate-receiver' of github.com:s…
ssomayyajula Apr 28, 2026
538f7ef
fix: Update havoc test to use truthiness checks in bugFinding mode
ssomayyajula Apr 28, 2026
7953cb4
fix: Restore assertion-based havoc test
ssomayyajula Apr 28, 2026
6558ed9
fix: Move havoc from Expr handler to translateCall
ssomayyajula Apr 28, 2026
f54deb7
fix: Correct test assertion messages to match actual behavior
ssomayyajula Apr 28, 2026
09cf4be
fix: Add expected_interpret file for test_havoc_callee_after_hole_call
keyboardDrummer-bot Apr 29, 2026
5ab9f5a
fix: Handle Hole in statement position in LaurelToCoreTranslator
keyboardDrummer-bot Apr 29, 2026
9d7402e
Add Strata internal benchmarks Github Action (#1070)
aqjune-aws Apr 28, 2026
a546083
PySpec pipeline: fix type mismatches, add type assertions, and clean …
joehendrix Apr 28, 2026
94e6ba8
fix: Remove argHavoc from unmodeled calls to fix CI
keyboardDrummer-bot Apr 29, 2026
ef008fe
Merge branch 'main' into fix-python-laurel-hole-mutate-receiver
keyboardDrummer-bot Apr 29, 2026
a6ed10d
fix: Restore argument havoc for unmodeled calls
keyboardDrummer-bot Apr 29, 2026
88f4e65
fix: Handle Hole RHS in Assign as havoc in LaurelToCoreTranslator
keyboardDrummer-bot Apr 29, 2026
69b1df4
Merge branch 'main' into fix-python-laurel-hole-mutate-receiver
thanhnguyen-aws Apr 29, 2026
dd488eb
Merge branch 'main' into fix-python-laurel-hole-mutate-receiver
olivier-aws Apr 29, 2026
17b0e82
Merge branch 'main' into fix-python-laurel-hole-mutate-receiver
robin-aws Apr 29, 2026
07d3556
Fix regression when unmodelled function in a loop iterator
olivier-aws Apr 30, 2026
65a0fdb
restore expected files
olivier-aws Apr 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion Strata/Languages/Python/PythonToLaurel.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1138,7 +1138,17 @@ private def mkHavocStmtsForUnmodeledCall (ctx : TranslationContext)
| _ => false)
let heapHavoc := if !involveHeap then [] else
[mkStmtExprMdWithLoc (StmtExpr.Assign [freeVar "$heap"] (mkStmtExprMd (.Hole false none))) md]
[mkStmtExprMd $ .Block (holeExceptHavoc ++ calleeHavoc ++ heapHavoc) none]
-- Havoc local arguments: the unmodeled call may have side effects on
-- its arguments (e.g., iterating over an iterable argument).
let argHavoc := inputExprs.flatMap fun inputExpr =>
if let .Name _ n _ := inputExpr then
match ctx.variableTypes.find? (λ v => Prod.fst v == n.val) with
| some (varName, ty) =>
if isCompositeType ctx ty then []
else [mkStmtExprMdWithLoc (StmtExpr.Assign [freeVar varName] (mkStmtExprMd (.Hole false none))) md]
Comment thread
tautschnig marked this conversation as resolved.
Outdated
| _ => []
else []
[mkStmtExprMd $ .Block (holeExceptHavoc ++ calleeHavoc ++ argHavoc ++ heapHavoc) none]
else []

partial def translateAssign (ctx : TranslationContext)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ test_havoc_callee_after_hole_call.py(17, 0): ❓ unknown - expected unknown beca
test_havoc_callee_after_hole_call.py(21, 0): ✅ pass - expected pass nothing should be havocked
test_havoc_callee_after_hole_call.py(23, 0): ✅ pass - callElimAssert_requires_5
test_havoc_callee_after_hole_call.py(26, 0): ❓ unknown - expected unknown because heap should be havocked
DETAIL: 2 passed, 0 failed, 4 inconclusive
test_havoc_callee_after_hole_call.py(31, 0): ❓ unknown - expected unknown because argument locals should be havocked
DETAIL: 2 passed, 0 failed, 5 inconclusive
RESULT: Inconclusive
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,8 @@ def __init__(self, n: int):
a.val = 1
some_unmodeled_call_6(a)
assert a.val == 1, "expected unknown because heap should be havocked"

xs2: list[int] = [1, 2]
ys: list[int] = []
xs2.unknown_method_that_may_modify_arguments(ys)
assert ys == [], "expected unknown because argument locals should be havocked"
Loading