Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
345 commits
Select commit Hold shift + click to select a range
a56175f
Fix for inferHoleTest
keyboardDrummer Apr 20, 2026
7e99c08
Update test
keyboardDrummer Apr 21, 2026
6f18b0d
Add axioms field to Procedure, populate in ContractPass, use in trans…
keyboardDrummer-bot Apr 21, 2026
7dbd727
Merge remote-tracking branch 'fork/add-opaque-keyword' into disallow-…
keyboardDrummer Apr 21, 2026
862d882
Undo expect file changes
keyboardDrummer Apr 21, 2026
107afed
Update comment
keyboardDrummer Apr 21, 2026
b531ee5
Add wildcard modifies clause support (`modifies *`)
keyboardDrummer-bot Apr 21, 2026
e3fe027
Update test
keyboardDrummer Apr 21, 2026
1e29835
Merge branch 'disallow-transparent-statement-bodies' into issue-924-c…
keyboardDrummer Apr 21, 2026
ec064f6
Test fixes
keyboardDrummer Apr 21, 2026
95489a0
Fix contract pass creating assertions with default source range
keyboardDrummer-bot Apr 21, 2026
872517f
Fix duplicate diagnostic
keyboardDrummer Apr 21, 2026
83bd0fd
Fix missing sources in ContractPass
keyboardDrummer Apr 21, 2026
385f18e
Fix unused variable warning in translateLaurelToCore
keyboardDrummer-bot Apr 21, 2026
41f25f1
Merge branch 'issue-924-contract-and-proof-pass' of github.com:strata…
keyboardDrummer Apr 21, 2026
f56e6cd
Skip Java codegen test gracefully when dependencies are missing
keyboardDrummer-bot Apr 21, 2026
8a2ca4c
Revert "Skip Java codegen test gracefully when dependencies are missing"
keyboardDrummer Apr 21, 2026
b9fe8b0
Rename FunctionsAndProofsProgram to UnorderedCoreWithLaurelTypes, imp…
keyboardDrummer-bot Apr 21, 2026
f9f90d8
Fix TransparencyPass: keep original-named function copies alongside $…
keyboardDrummer-bot Apr 21, 2026
27cab80
Rewrite calls to $asFunction only for non-external procedures
keyboardDrummer-bot Apr 21, 2026
d59c622
Fix SARIF test failures in EliminateMultipleOutputs pass
keyboardDrummer-bot Apr 21, 2026
9fa3a32
Fix type translation and test regressions
keyboardDrummer-bot Apr 21, 2026
4ef0284
Fix errorVoid type not registered and metadata dbg_trace leak
keyboardDrummer-bot Apr 21, 2026
5ab884e
Move Python spec assertions to Laurel preconditions field
keyboardDrummer-bot Apr 21, 2026
336811e
Trigger CI rebuild (clean cache)
keyboardDrummer-bot Apr 21, 2026
2da0f74
Merge branch 'main' into add-opaque-keyword
tautschnig Apr 22, 2026
89c6836
Add opaque keyword to StatisticsTest Laurel snippets
keyboardDrummer-bot Apr 22, 2026
cf00cb0
Make type of Assign more specific
keyboardDrummer-bot Apr 22, 2026
67e75cd
Remove multiAssign grammar rule that causes parsing ambiguity
keyboardDrummer-bot Apr 22, 2026
89e1d37
Replace LocalVariable with Variable.Declare
keyboardDrummer-bot Apr 22, 2026
27f11e4
Add multi-target assignment syntax and test for multiple returns
keyboardDrummer-bot Apr 22, 2026
76a487b
Use 'assign' keyword prefix for multi-target assignments
keyboardDrummer-bot Apr 23, 2026
4a0d5cc
Address review feedback: error on invalid assign targets, restore hea…
keyboardDrummer-bot Apr 23, 2026
f7784c1
Add heap parameterization for multi-target assign calls
keyboardDrummer-bot Apr 23, 2026
dfd8c58
Add tests for repeated assign target and field assigns from heap-modi…
keyboardDrummer-bot Apr 23, 2026
151f955
Address review: use bug-obvious name in stmtExprToVar fallback, remov…
keyboardDrummer-bot Apr 23, 2026
578d40c
Fix lint warnings in HeapParameterization termination proofs
keyboardDrummer-bot Apr 23, 2026
cf43d15
Update golden files for assertion numbering changes
keyboardDrummer-bot Apr 23, 2026
596dd6e
Enable local variables in functions
keyboardDrummer-bot Apr 23, 2026
b87f0cf
start of refactoring
keyboardDrummer Apr 23, 2026
348fa33
Fix bugs
keyboardDrummer Apr 23, 2026
98fe891
Simplify LaurelToCore assign translation
keyboardDrummer Apr 23, 2026
9aa12e0
Resolve sorrys in HeapParameterization proof
keyboardDrummer-bot Apr 23, 2026
2a3da0e
Merge main into issue-21-assign-variable-type
keyboardDrummer-bot Apr 23, 2026
8f8264d
Merge branch 'issue-21-assign-variable-type' into issue-924-contract-…
keyboardDrummer-bot Apr 23, 2026
c96d37f
Merge branch 'enable-local-variables-in-functions' into issue-924-con…
keyboardDrummer-bot Apr 23, 2026
ad07e73
Fix build errors after merge: update AST usage and grammar
keyboardDrummer-bot Apr 23, 2026
df6ccdc
Disallow transparent statement bodies (rebased on main)
keyboardDrummer-bot Apr 23, 2026
c4878eb
Merge remote-tracking branch 'origin/disallow-transparent-statement-b…
keyboardDrummer-bot Apr 23, 2026
674fcfa
Fix HeapParameterization and LaurelToCoreTranslator for new Variable-…
keyboardDrummer-bot Apr 23, 2026
2212161
Add missing 'opaque' keyword to Any_len_pos procedure
keyboardDrummer-bot Apr 23, 2026
66bc82b
Fix pre-existing test failures in DictNoneTest and AnalyzeLaurelTest
keyboardDrummer-bot Apr 23, 2026
7f8ad0e
Fix CI: skip Java TestGen test 12 gracefully when javac or jar is mis…
keyboardDrummer-bot Apr 23, 2026
0feec54
Add Resolution check for assign target count, remove LaurelToCore pad…
keyboardDrummer-bot Apr 23, 2026
6f1a531
Revert "Fix Python->Laurel: Havoc callee or Heap after unmodeled Inst…
keyboardDrummer Apr 23, 2026
c253ba7
Merge branch 'issue-21-assign-variable-type' of github.com:keyboardDr…
keyboardDrummer Apr 23, 2026
fea039a
Fixes
keyboardDrummer Apr 23, 2026
2b0b010
Resolve merge conflicts in PythonToLaurel and fix test expectations
keyboardDrummer-bot Apr 23, 2026
a5303ef
Fix CI failures: contract pass, grammar roundtrip, and test updates
keyboardDrummer-bot Apr 23, 2026
d31c0df
:Revert "Fix pre-existing test failures in DictNoneTest and AnalyzeLa…
keyboardDrummer Apr 23, 2026
dfc8fdf
Revert "Fix CI: skip Java TestGen test 12 gracefully when javac or ja…
keyboardDrummer Apr 23, 2026
70717c3
Merge branch 'issue-21-assign-variable-type' of github.com:keyboardDr…
keyboardDrummer Apr 23, 2026
185f9da
Use Declare targets in Assign to eliminate extraDecls in HeapParamete…
keyboardDrummer-bot Apr 23, 2026
76d22d8
Fix merge issues with disallow-transparent-statement-bodies
keyboardDrummer-bot Apr 23, 2026
a38fd43
Fix pre-existing test failures in DictNoneTest and TestGen
keyboardDrummer-bot Apr 23, 2026
22d347b
Use Declare targets instead of extraDecls in HeapParameterization
keyboardDrummer-bot Apr 23, 2026
5c131f5
Fix DictNoneTest: handle expected error inside callback so test passe…
keyboardDrummer-bot Apr 23, 2026
779b2af
Add `modifies *` wildcard support to Laurel
keyboardDrummer-bot Apr 23, 2026
93af49b
Retry CI: all checks pass locally
keyboardDrummer-bot Apr 23, 2026
69316fd
Fix contract pass: use pure postcondition functions with output param…
keyboardDrummer-bot Apr 23, 2026
9475765
Fix pyAnalyze expected output for test_class_methods and test_class_w…
keyboardDrummer-bot Apr 23, 2026
36c7d7e
Fix doc build: add persist-credentials: false to checkout step
keyboardDrummer-bot Apr 23, 2026
b7debab
Fix implicit heap args in contract pass and eliminateMultipleOutputs
keyboardDrummer-bot Apr 23, 2026
3df9e8a
Merge branch 'main' into issue-21-assign-variable-type
keyboardDrummer Apr 23, 2026
4c2c951
Fix DictNoneTest and improve pipeline resolution error check
keyboardDrummer-bot Apr 23, 2026
d55020c
Address review comments
keyboardDrummer-bot Apr 23, 2026
29a460c
Merge branch 'main' into add-modifies-wildcard
shigoel Apr 23, 2026
f04db23
Fix heap parameter handling in HeapParameterization, ContractPass, an…
keyboardDrummer-bot Apr 23, 2026
33159ee
Fix DictNoneTest Test 6: len() rejection is an error, not a diagnostic
tautschnig Apr 23, 2026
b410bb7
Maintain all modifies clauses in concrete grammar translation
keyboardDrummer-bot Apr 23, 2026
6e6563a
Merge branch 'main' into issue-21-assign-variable-type and revert Dic…
keyboardDrummer-bot Apr 24, 2026
7fe1d09
Do not eleminate multipleOutputs
keyboardDrummer Apr 24, 2026
59d79fd
Merge strata-org/Strata#1034 (generalize multi-target assign)
keyboardDrummer-bot Apr 24, 2026
2ea8e82
Fix ContractPass: use .Quantifier .Forall instead of removed .Forall …
keyboardDrummer-bot Apr 24, 2026
202a3f9
Merge branch 'issue-924-contract-and-proof-pass' of github.com:keyboa…
keyboardDrummer Apr 24, 2026
4fa2eee
Apply suggestion from @Copilot
keyboardDrummer Apr 24, 2026
f32139d
Merge remote-tracking branch 'origin/tautschnig/DictNoneTest' into is…
keyboardDrummer Apr 24, 2026
873d9ad
Revert PR 978: https://github.com/strata-org/Strata/pull/978 (#1029)
keyboardDrummer Apr 23, 2026
50050a5
Add test for modifies * on transparent body (no ensures)
keyboardDrummer-bot Apr 24, 2026
143c09e
Merge branch 'main' into add-opaque-keyword
robin-aws Apr 24, 2026
c5ca718
Fix
keyboardDrummer Apr 27, 2026
e836f9d
Add test combining modifies c and modifies *
keyboardDrummer-bot Apr 27, 2026
a5b17b0
Merge remote-tracking branch 'origin/main' into issue-21-assign-varia…
keyboardDrummer Apr 27, 2026
a638b8c
Merge branch 'main' into add-modifies-wildcard
thanhnguyen-aws Apr 27, 2026
70f1012
Merge branch 'main' into add-modifies-wildcard
keyboardDrummer-bot Apr 28, 2026
9584b73
Merge upstream/main into issue-21-assign-variable-type, resolve confl…
keyboardDrummer-bot Apr 28, 2026
9be587d
Fix modifies wildcard tests for opaque keyword grammar
keyboardDrummer-bot Apr 28, 2026
f3e9511
Fix issues
keyboardDrummer Apr 28, 2026
3243df4
Merge branch 'add-modifies-wildcard' of github.com:strata-org/Strata …
keyboardDrummer Apr 28, 2026
e53d5e0
Remove temp files
keyboardDrummer Apr 28, 2026
6c549bd
Fix conflicts
keyboardDrummer Apr 28, 2026
d14b93e
Remove obsolete test
keyboardDrummer Apr 28, 2026
0b90c56
Fix test
keyboardDrummer Apr 28, 2026
36ece7d
Fix T22_MultipleReturns: add missing 'opaque' keyword
keyboardDrummer-bot Apr 28, 2026
6c5dcdb
Extract StmtExprMd.isWildcard predicate to eliminate duplication
keyboardDrummer-bot Apr 28, 2026
71a4357
Merge branch 'main' into add-modifies-wildcard
tautschnig Apr 28, 2026
9f96122
Add more resolution checks
keyboardDrummer Apr 28, 2026
afff624
Add Laurel tests for resolution kind-mismatch errors
keyboardDrummer-bot Apr 28, 2026
77b18a8
Merge upstream/main into issue-21-assign-variable-type, resolve confl…
keyboardDrummer-bot Apr 28, 2026
bcfccb6
Merge branch 'main' into moreResolutionChecks
olivier-aws Apr 29, 2026
fc6c280
Merge remote-tracking branch 'origin/moreResolutionChecks' into issue…
keyboardDrummer Apr 29, 2026
ea85952
Do not generate core on pass diagnostics
keyboardDrummer Apr 29, 2026
198034b
Merge commit 'fe4578675012~1' into disallow-transparent-statement-bodies
keyboardDrummer Apr 29, 2026
c318dea
Merge remote-tracking branch 'fork/add-opaque-keyword' into disallow-…
keyboardDrummer Apr 29, 2026
6e057c9
Merge commit 'fe4578675012' into disallow-transparent-statement-bodies
keyboardDrummer Apr 29, 2026
b0ea928
Merge branch 'main' into add-modifies-wildcard
keyboardDrummer-bot Apr 29, 2026
e5d9752
Merge remote-tracking branch 'origin/main' into disallow-transparent-…
keyboardDrummer Apr 29, 2026
2c94491
Fix test
keyboardDrummer Apr 29, 2026
feaa876
Fix: don't skip core translation when pass diagnostics exist
keyboardDrummer-bot Apr 29, 2026
83c490b
Fixes
keyboardDrummer Apr 29, 2026
6a1d196
Remove gitignore addition
keyboardDrummer Apr 29, 2026
4fb9d74
Revert "Fix: don't skip core translation when pass diagnostics exist"
keyboardDrummer Apr 29, 2026
87c87f3
Fix test
keyboardDrummer Apr 29, 2026
d9404aa
update tests
keyboardDrummer Apr 29, 2026
2b9f2b0
Update tests
keyboardDrummer Apr 29, 2026
b68b31a
Merge remote-tracking branch 'origin/add-modifies-wildcard' into disa…
keyboardDrummer Apr 29, 2026
5602edc
Merge commit 'eee972e813d16~1' into disallow-transparent-statement-bo…
keyboardDrummer Apr 29, 2026
63ed7df
Merge commit 'eee972e813d16' into disallow-transparent-statement-bodies
keyboardDrummer Apr 29, 2026
71a600a
Update test
keyboardDrummer Apr 29, 2026
6efab79
Fix tests
keyboardDrummer Apr 29, 2026
51661e0
Update test
keyboardDrummer Apr 29, 2026
28cae40
Fix tests
keyboardDrummer Apr 29, 2026
a1730d7
Merge remote-tracking branch 'origin/main' into issue-21-assign-varia…
keyboardDrummer Apr 29, 2026
541d596
Fixes
keyboardDrummer Apr 29, 2026
5914743
Improve modified diagnostic
keyboardDrummer Apr 29, 2026
ad76318
Fixes
keyboardDrummer Apr 29, 2026
fb859b8
Undo small change
keyboardDrummer Apr 29, 2026
664ab31
Update expect files
keyboardDrummer Apr 29, 2026
6694822
Undo fix to call to main, since it triggers a latent bug
keyboardDrummer Apr 29, 2026
178425c
Update tests
keyboardDrummer Apr 30, 2026
fe02be1
Merge branch 'main' into disallow-transparent-statement-bodies
keyboardDrummer Apr 30, 2026
6043f2f
Improve source location creation in InferHoleType
keyboardDrummer Apr 30, 2026
8a97cd7
More improvements to source locations
keyboardDrummer Apr 30, 2026
5cb4822
More debugging improvements
keyboardDrummer Apr 30, 2026
f22f29c
Fix bug in resolution
keyboardDrummer Apr 30, 2026
107b72a
Add compilation bug check
keyboardDrummer Apr 30, 2026
f1f783f
update commment
keyboardDrummer Apr 30, 2026
99630d7
Fix test
keyboardDrummer Apr 29, 2026
b0c1bdd
Merge branch 'disallow-transparent-statement-bodies' of github.com:st…
keyboardDrummer Apr 30, 2026
64daf7c
Merge branch 'main' into disallow-transparent-statement-bodies
keyboardDrummer Apr 30, 2026
373e6c4
Tweak in infer hole types
keyboardDrummer Apr 30, 2026
7493074
Merge branch 'disallow-transparent-statement-bodies' of github.com:st…
keyboardDrummer Apr 30, 2026
8834318
Remove unused code
keyboardDrummer Apr 30, 2026
02a895b
Add missing defineNameCheckDup
keyboardDrummer Apr 30, 2026
dbc9da8
Fixes
keyboardDrummer Apr 30, 2026
a42c339
Fixes
keyboardDrummer Apr 30, 2026
c091620
Refactoring
keyboardDrummer Apr 30, 2026
75c037c
Merge branch 'disallow-transparent-statement-bodies' of github.com:ke…
keyboardDrummer Apr 30, 2026
ee0e39b
Fix merge mistake
keyboardDrummer Apr 30, 2026
fd2988e
Revert "Fix test"
keyboardDrummer Apr 30, 2026
5fb8577
Merge branch 'main' into disallow-transparent-statement-bodies
keyboardDrummer Apr 30, 2026
da915bf
Merge issue-21-assign-variable-type into disallow-transparent-stateme…
keyboardDrummer-bot May 1, 2026
942ff8d
Merge origin/main into merge-1076-1077, resolve conflicts
keyboardDrummer-bot May 1, 2026
63c492c
Fix merge conflicts between PR #1076 and PR #1077
keyboardDrummer-bot May 1, 2026
a549f5f
Merge branch 'merge-1076-1077' into issue-924-contract-and-proof-pass
keyboardDrummer-bot May 1, 2026
7a30a9b
Update golden files for test_class_methods and test_class_with_methods
keyboardDrummer-bot May 1, 2026
836e8d1
Add opaque keyword to CBMC Laurel test files
keyboardDrummer-bot May 1, 2026
e8a39f5
Fix build errors from merge: update code for AstNode/Identifier field…
keyboardDrummer-bot May 1, 2026
abe3a68
Updates
keyboardDrummer May 1, 2026
4faec9a
Undo bad changes related to options
keyboardDrummer May 1, 2026
d0ee36d
Fix
keyboardDrummer May 1, 2026
36382ce
Bring back let-expression inlining pass
keyboardDrummer May 1, 2026
4369522
Test fixes
keyboardDrummer May 1, 2026
1a3e5be
Merge main into issue-21-assign-variable-type, resolve conflicts
keyboardDrummer-bot May 1, 2026
dbae896
Debug improvements
keyboardDrummer May 1, 2026
8ae0e3c
Fix
keyboardDrummer May 1, 2026
57708dc
Fixes
keyboardDrummer May 1, 2026
3fdd851
Remove special casing for assert and assume in liftImperativeExpressions
keyboardDrummer May 1, 2026
8f18a32
Generalize liftImperativeExpressions
keyboardDrummer May 1, 2026
0744a01
Address review feedback: naming, comments, error handling
keyboardDrummer-bot May 1, 2026
23846a4
Fix lint: add nopanic:ok suppression to stmtExprToVar
keyboardDrummer-bot May 1, 2026
3745ced
Address MikaelMayer review: fix InstanceCall bug, deduplicate call tr…
keyboardDrummer-bot May 1, 2026
0f9d668
Revert "Fix test"
keyboardDrummer May 1, 2026
07cb9f7
Recurse into Field target in collectExpr Assign case
keyboardDrummer-bot May 1, 2026
18b74e1
Merge branch 'issue-21-assign-variable-type' of github.com:strata-org…
keyboardDrummer May 1, 2026
5a85348
Add comment to early return
keyboardDrummer May 1, 2026
e672786
Merge branch 'main' into issue-21-assign-variable-type
keyboardDrummer May 1, 2026
63f1719
Remove Variable formatters from Laurel.lean
keyboardDrummer-bot May 1, 2026
29f181a
Fix doc comment inside do block causing build failure
keyboardDrummer-bot May 1, 2026
38e441e
Address review feedback: merge conflicts, inferArgsTyped arity check,…
keyboardDrummer-bot May 1, 2026
be7bb41
Reapply "Fix test"
keyboardDrummer May 1, 2026
3485da0
Merge branch 'main' into issue-21-assign-variable-type
keyboardDrummer May 1, 2026
3800ad0
Revert: restore servicelib_Storage_ label filter in AnalyzeLaurelTest
keyboardDrummer-bot May 1, 2026
4592a65
Refactor: avoid stmtExprToVar where Variable can be captured directly
keyboardDrummer-bot May 1, 2026
d6151eb
Review comment
keyboardDrummer May 2, 2026
a2503e6
Improvements related to free postconditions and the unordered part of…
keyboardDrummer May 3, 2026
698682e
T8_Postconditions passes now
keyboardDrummer May 3, 2026
346ff37
Replace fragile line-number reference in comment with case-name refer…
keyboardDrummer-bot May 4, 2026
964b2d6
update messages
keyboardDrummer May 4, 2026
fe42aba
Simplify a proof
keyboardDrummer May 4, 2026
7d53b9f
Refactoring
keyboardDrummer May 4, 2026
601512d
More comments
keyboardDrummer May 4, 2026
28eb58e
Merge remote-tracking branch 'fork/merge-1076-1077' into issue-21-ass…
keyboardDrummer May 4, 2026
224e1b7
Merge remote-tracking branch 'origin/disallow-transparent-statement-b…
keyboardDrummer May 4, 2026
5244d5e
Merge commit 'd95396fc61245' into issue-21-assign-variable-type
keyboardDrummer May 4, 2026
db66551
Check for multi-target function call
keyboardDrummer May 4, 2026
ec66975
Merge remote-tracking branch 'origin/disallow-transparent-statement-b…
keyboardDrummer May 4, 2026
828e362
Tweaks
keyboardDrummer May 4, 2026
aeb1f22
Add commit explaining the use of !
keyboardDrummer May 4, 2026
4e04832
Fix merge mistakes
keyboardDrummer May 4, 2026
6226226
Remove bareVar usages
keyboardDrummer May 4, 2026
39af273
Refactoring
keyboardDrummer May 4, 2026
a26fe05
Improve printing of Laurel blocks so newlines are inserted
keyboardDrummer May 4, 2026
3ce6673
Merge remote-tracking branch 'origin/issue-21-assign-variable-type' i…
keyboardDrummer May 4, 2026
2a27857
Improve testing code
keyboardDrummer May 4, 2026
74df61f
Update StrataTest/Languages/Laurel/Examples/Fundamentals/T20_Transpar…
keyboardDrummer May 4, 2026
a088f83
Fixes
keyboardDrummer May 4, 2026
7b9ba21
Some experiments with the lift pass
keyboardDrummer May 5, 2026
e9a84fb
Fixes, but this needs the heapParam fix as well
keyboardDrummer May 8, 2026
73e4d75
Remove EliminateReturnStatements and ContractPass from pipeline
keyboardDrummer-bot May 8, 2026
310c100
Fix transparency pass: preserve functional procedures and clear prec…
keyboardDrummer-bot May 8, 2026
48ea2ac
Fix lifting pass: prepend declarations from blocks to outer scope
keyboardDrummer-bot May 8, 2026
c30a6f0
Update pyAnalyze expected outputs for transparency pass postconditions
keyboardDrummer-bot May 8, 2026
ea15164
Skip strata-benchmarks job on fork repositories
keyboardDrummer-bot May 8, 2026
7380f7c
Merge remote-tracking branch 'fork/main' into transparency-pass-only
keyboardDrummer May 14, 2026
4fec595
Merge branch 'heapParamScopeBug' into transparency-pass-only
keyboardDrummer May 14, 2026
bd66145
Merge branch 'transparencyPassBase' into transparency-pass-only
keyboardDrummer May 14, 2026
a766aa9
Fixes
keyboardDrummer May 14, 2026
9b4f76e
Undo T19 changes
keyboardDrummer May 14, 2026
cc622ad
Remove noise
keyboardDrummer May 14, 2026
54eba1f
Fixes to T3 tests
keyboardDrummer May 14, 2026
7dcb0bf
Fixes
keyboardDrummer May 15, 2026
12a983d
Undo unused changes
keyboardDrummer May 15, 2026
16bf744
Add more source locations
keyboardDrummer May 15, 2026
e297a19
Fixes
keyboardDrummer May 15, 2026
54ebc79
Fix build issues
keyboardDrummer May 18, 2026
322032e
Cleanup
keyboardDrummer May 18, 2026
0f3025b
Merge branch 'formatting-and-debugging-improvements' into transparenc…
keyboardDrummer May 18, 2026
a5cddef
Reduce diff
keyboardDrummer May 18, 2026
a275d8c
Reduce diff
keyboardDrummer May 18, 2026
5a33f12
Reduce diff
keyboardDrummer May 18, 2026
2fc4188
Refactoring
keyboardDrummer May 18, 2026
1befbb6
update test
keyboardDrummer May 18, 2026
01b5699
Fix oops
keyboardDrummer May 18, 2026
bd900c0
Remove unused pass
keyboardDrummer May 18, 2026
5fa0ad9
Fix transparency pass
keyboardDrummer May 18, 2026
a944007
Fix for valued returns
keyboardDrummer May 18, 2026
a3b56b0
Fix
keyboardDrummer May 18, 2026
b9d474e
Fix bug
keyboardDrummer May 18, 2026
3a89e5a
Updates
keyboardDrummer May 18, 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
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ jobs:

strata-benchmarks:
name: Run internal benchmarks of Strata
if: github.repository == 'strata-org/Strata'
runs-on: ubuntu-latest
permissions:
id-token: write
Expand Down
5 changes: 1 addition & 4 deletions Examples/expected/HeapReasoning.core.expected
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ Successfully parsed.
HeapReasoning.core.st(98, 2) [modifiesFrameRef1]: ✅ pass
HeapReasoning.core.st(103, 2) [modifiesFrameRef1]: ✅ pass
HeapReasoning.core.st(108, 2) [modifiesFrameRef1]: ✅ pass
[Container_ctor_ensures_4]: ✅ pass
HeapReasoning.core.st(86, 2) [Container_ctor_ensures_7]: ✅ pass
HeapReasoning.core.st(87, 2) [Container_ctor_ensures_8]: ✅ pass
HeapReasoning.core.st(88, 2) [Container_ctor_ensures_9]: ✅ pass
Expand All @@ -12,7 +11,6 @@ HeapReasoning.core.st(169, 2) [modifiesFrameRef2]: ✅ pass
HeapReasoning.core.st(172, 2) [modifiesFrameRef1Next]: ✅ pass
HeapReasoning.core.st(177, 2) [modifiesFrameRef2Next]: ✅ pass
HeapReasoning.core.st(132, 2) [UpdateContainers_ensures_5]: ✅ pass
[UpdateContainers_ensures_6]: ✅ pass
HeapReasoning.core.st(150, 2) [UpdateContainers_ensures_14]: ✅ pass
HeapReasoning.core.st(151, 2) [UpdateContainers_ensures_15]: ✅ pass
HeapReasoning.core.st(152, 2) [UpdateContainers_ensures_16]: ✅ pass
Expand Down Expand Up @@ -51,5 +49,4 @@ HeapReasoning.core.st(238, 2) [c2Pineapple0]: ✅ pass
HeapReasoning.core.st(240, 2) [c1NextEqC2]: ✅ pass
HeapReasoning.core.st(241, 2) [c2NextEqC1]: ✅ pass
HeapReasoning.core.st(195, 2) [Main_ensures_1]: ✅ pass
[Main_ensures_2]: ✅ pass
All 53 goals passed.
All 50 goals passed.
4 changes: 2 additions & 2 deletions Strata/Languages/Core/ProcedureEval.lean
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,13 @@ def eval (E : Env) (p : Procedure) : Env × Statistics :=
match check.attr with
| .Free =>
-- NOTE: A free postcondition is not checked.
-- We simply change a free-postcondition to "true", but
-- We simply change a free-postcondition to "assume true", but
-- keep a record in the metadata field.
-- TODO: Perhaps introduce an "opaque" expression construct
-- that hides the expression from the evaluator, allowing us
-- to retain the postcondition body instead of replacing it
-- with "true".
(.assert label (.true ())
(.assume label (.true ())
((Imperative.MetaData.pushElem
#[]
(.label label)
Expand Down
11 changes: 8 additions & 3 deletions Strata/Languages/Laurel/CoreDefinitionsForLaurel.lean
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,21 @@ program Laurel;

datatype LaurelResolutionErrorPlaceholder {}
datatype Float64IsNotSupportedYet {}
datatype LaurelUnit { MkLaurelUnit() }

// The types for these Map functions are incorrect.
// We'll fix them when Laurel supports polymorphism
function select(map: int, key: int) : int
// And then we can remove the datatype Box as well
// And remove the hacky filter in HeapParameterization
datatype Box { MkBox() }

function select(map: int, key: int) : Box
external;

function update(map: int, key: int, value: int) : int
function update(map: int, key: int, value: int) : Box
external;

function const(value: int) : int
function const(value: int) : Box
external;

#end
Expand Down
135 changes: 78 additions & 57 deletions Strata/Languages/Laurel/CoreGroupingAndOrdering.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,17 @@
-/

module
public import Strata.Languages.Laurel.Laurel
public import Strata.Languages.Laurel.TransparencyPass
import Strata.DL.Lambda.LExpr
import Strata.DDM.Util.Graph.Tarjan
import Strata.Languages.Laurel.Grammar.AbstractToConcreteTreeTranslator

/-!
## Grouping and Ordering for Core Translation

Utilities for computing the grouping and topological ordering of Laurel
declarations before they are emitted as Strata Core declarations.

- `groupDatatypesByScc` — groups mutually recursive datatypes into SCC groups
using Tarjan's SCC algorithm.
- `computeSccDecls` — builds the procedure call graph, runs Tarjan's SCC
algorithm, and returns each SCC as a list of procedures paired with a flag
indicating whether the SCC is recursive. The result is in reverse topological
Expand Down Expand Up @@ -90,7 +89,7 @@ def collectStaticCallNames (expr : StmtExprMd) : List String :=
| .InstanceCall t _ args =>
collectStaticCallNames t ++ args.flatMap (fun a => collectStaticCallNames a)
| .Old v | .Fresh v | .Assume v => collectStaticCallNames v
| .Assert ⟨cond, _summary⟩ => collectStaticCallNames cond
| .Assert ⟨cond, _summary, _⟩ => collectStaticCallNames cond
| .ProveBy v p => collectStaticCallNames v ++ collectStaticCallNames p
| .ReferenceEquals l r => collectStaticCallNames l ++ collectStaticCallNames r
| .AsType t _ | .IsType t _ => collectStaticCallNames t
Expand All @@ -113,27 +112,24 @@ Build the procedure call graph, run Tarjan's SCC algorithm, and return each SCC
as a list of procedures paired with a flag indicating whether the SCC is recursive.
Results are in reverse topological order: dependencies before dependents.

Procedures with an `invokeOn` trigger are placed as early as possible — before
unrelated procedures without one — by stably partitioning them first before building
Procedures with `invokeOn` are placed as early as possible — before
unrelated procedures without them — by stably partitioning them first before building
the graph. Tarjan then naturally assigns them lower indices, causing them to appear
earlier in the output.

External procedures are excluded.
-/
public def computeSccDecls (program : Program) : List (List Procedure × Bool) :=
-- External procedures are completely ignored (not translated to Core).
public def computeSccDecls (program : UnorderedCoreWithLaurelTypes) : List (List Procedure × Bool) :=
-- Stable partition: procedures with invokeOn come first, preserving relative
-- order within each group. Tarjan then places them earlier in the topological output.
let allProcs := program.functions ++ program.coreProcedures
let (withInvokeOn, withoutInvokeOn) :=
(program.staticProcedures.filter (fun p => !p.body.isExternal))
|>.partition (fun p => p.invokeOn.isSome)
let nonExternal : List Procedure := withInvokeOn ++ withoutInvokeOn
allProcs.partition (fun p => p.invokeOn.isSome)
let orderedProcs : List Procedure := withInvokeOn ++ withoutInvokeOn

-- Build a call-graph over all non-external procedures.
-- Build a call-graph over all procedures.
-- An edge proc → callee means proc's body/contracts contain a StaticCall to callee.
let nonExternalArr : Array Procedure := nonExternal.toArray
let procsArr : Array Procedure := orderedProcs.toArray
let nameToIdx : Std.HashMap String Nat :=
nonExternalArr.foldl (fun (acc : Std.HashMap String Nat × Nat) proc =>
procsArr.foldl (fun (acc : Std.HashMap String Nat × Nat) proc =>
(acc.1.insert proc.name.text acc.2, acc.2 + 1)) ({}, 0) |>.1

-- Collect all callee names from a procedure's body and contracts.
Expand All @@ -149,9 +145,9 @@ public def computeSccDecls (program : Program) : List (List Procedure × Bool) :
(bodyExprs ++ contractExprs).flatMap collectStaticCallNames

-- Build the OutGraph for Tarjan.
let n := nonExternalArr.size
let n := procsArr.size
let graph : Strata.OutGraph n :=
nonExternalArr.foldl (fun (acc : Strata.OutGraph n × Nat) proc =>
procsArr.foldl (fun (acc : Strata.OutGraph n × Nat) proc =>
let callerIdx := acc.2
let g := acc.1
let callees := procCallees proc
Expand All @@ -167,7 +163,7 @@ public def computeSccDecls (program : Program) : List (List Procedure × Bool) :

sccs.toList.filterMap fun scc =>
let procs := scc.toList.filterMap fun idx =>
nonExternalArr[idx.val]?
procsArr[idx.val]?
if procs.isEmpty then none else
let isRecursive := procs.length > 1 ||
(match scc.toList.head? with
Expand All @@ -176,60 +172,85 @@ public def computeSccDecls (program : Program) : List (List Procedure × Bool) :
some (procs, isRecursive)

/--
A single declaration in an ordered Laurel program. Declarations are in
A single declaration in a CoreWithLaurelTypes program. Declarations are in
dependency order (dependencies before dependents).
-/
public inductive OrderedDecl where
/-- A group of functions (single non-recursive, or mutually recursive). -/
| procs (procs : List Procedure) (isRecursive : Bool)
/-- A group of functions (single non-recursive, or mutually recursive).
Invariant: `funcs.length > 1 → isRecursive = true`. -/
| funcs (funcs : List Procedure) (isRecursive : Bool)
/-- A single (non-functional) procedure. -/
| procedure (procedure : Procedure)
/-- A group of (possibly mutually recursive) datatypes. -/
| datatypes (dts : List DatatypeDefinition)
/-- A named constant. -/
| constant (c : Constant)

/--
A Laurel program whose declarations have been grouped and topologically ordered.
Produced by `orderProgram` from a `Program`.
A program whose declarations have been grouped and topologically ordered,
using Laurel types. Produced by `orderFunctionsAndProcedures` from a
`UnorderedCoreWithLaurelTypes`.
-/
public structure OrderedLaurel where
public structure CoreWithLaurelTypes where
decls : List OrderedDecl

/--
Group mutually recursive datatypes into SCC groups using Tarjan's SCC algorithm.
Returns groups in topological order (dependencies before dependents).
-/
public def groupDatatypesByScc (program : Program) : List (List DatatypeDefinition) :=
let laurelDatatypes := program.types.filterMap fun td => match td with
| .Datatype dt => some dt
| _ => none
let n := laurelDatatypes.length
if n == 0 then [] else
let nameToIdx : Std.HashMap String Nat :=
laurelDatatypes.foldlIdx (fun m i dt => m.insert dt.name.text i) {}
let edges : List (Nat × Nat) :=
laurelDatatypes.foldlIdx (fun acc i dt =>
(datatypeRefs dt).filterMap nameToIdx.get? |>.foldl (fun acc j => (j, i) :: acc) acc) []
let g := OutGraph.ofEdges! n edges
let dtsArr := laurelDatatypes.toArray
OutGraph.tarjan g |>.toList.filterMap fun comp =>
let members := comp.toList.filterMap fun idx => dtsArr[idx]?
if members.isEmpty then none else some members
open Std (Format ToFormat)

/--
Group procedures into SCC groups and wrap them as `OrderedDecl.procs`.
-/
public def groupProcsByScc (program : Program) : List OrderedDecl :=
(computeSccDecls program).map fun (procs, isRecursive) =>
OrderedDecl.procs procs isRecursive
public section

def formatOrderedDecl : OrderedDecl → Format
| .funcs funcs _ => Format.joinSep (funcs.map ToFormat.format) "\n\n"
| .procedure proc => ToFormat.format proc
| .datatypes dts => Format.joinSep (dts.map ToFormat.format) "\n\n"
| .constant c => ToFormat.format c

instance : ToFormat OrderedDecl where
format := formatOrderedDecl

def formatCoreWithLaurelTypes (p : CoreWithLaurelTypes) : Format :=
Format.joinSep (p.decls.map formatOrderedDecl) "\n\n"

instance : ToFormat CoreWithLaurelTypes where
format := formatCoreWithLaurelTypes

end -- public section

/--
Produce an `OrderedLaurel` from a `Program` by grouping and ordering
procedures via SCC, collecting datatypes, and constants.
Produce a `CoreWithLaurelTypes` from a `UnorderedCoreWithLaurelTypes` by
computing a combined ordering of functions and proofs using the call graph,
then collecting datatypes and constants.

Functions are grouped into SCCs (for mutual recursion). Proofs are emitted
as individual `procedure` decls. Both participate in the topological ordering
so that axioms are available to functions that need them.
-/
public def orderProgram (program : Program) : OrderedLaurel :=
let datatypeDecls := (groupDatatypesByScc program).map OrderedDecl.datatypes
public def orderFunctionsAndProcedures (program : UnorderedCoreWithLaurelTypes) : CoreWithLaurelTypes :=
let datatypeDecls := (groupDatatypesByScc' program).map OrderedDecl.datatypes
let constantDecls := program.constants.map OrderedDecl.constant
let procDecls := groupProcsByScc program
{ decls := datatypeDecls ++ constantDecls ++ procDecls }
let funcNames : Std.HashSet String :=
program.functions.foldl (fun s p => s.insert p.name.text) {}
let orderedDecls := (computeSccDecls program).flatMap fun (procs, isRecursive) =>
-- Split the SCC into functions and proofs
let (funcs, proofs) := procs.partition (fun p => funcNames.contains p.name.text)
let funcDecl := if funcs.isEmpty then [] else [OrderedDecl.funcs funcs isRecursive]
let proofDecls := proofs.map OrderedDecl.procedure
funcDecl ++ proofDecls
{ decls := datatypeDecls ++ constantDecls ++ orderedDecls }
where
/-- Group datatypes from a UnorderedCoreWithLaurelTypes by SCC. -/
groupDatatypesByScc' (program : UnorderedCoreWithLaurelTypes) : List (List DatatypeDefinition) :=
let laurelDatatypes := program.datatypes
let n := laurelDatatypes.length
if n == 0 then [] else
let nameToIdx : Std.HashMap String Nat :=
laurelDatatypes.foldlIdx (fun m i dt => m.insert dt.name.text i) {}
let edges : List (Nat × Nat) :=
laurelDatatypes.foldlIdx (fun acc i dt =>
(datatypeRefs dt).filterMap nameToIdx.get? |>.foldl (fun acc j => (j, i) :: acc) acc) []
let g := OutGraph.ofEdges! n edges
let dtsArr := laurelDatatypes.toArray
OutGraph.tarjan g |>.toList.filterMap fun comp =>
let members := comp.toList.filterMap fun idx => dtsArr[idx]?
if members.isEmpty then none else some members

end Strata.Laurel
12 changes: 7 additions & 5 deletions Strata/Languages/Laurel/DesugarShortCircuit.lean
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public section
private def bare (v : StmtExpr) : StmtExprMd := ⟨v, none⟩

/-- Local rewrite of a single short-circuit node. Recursion is handled by `mapStmtExpr`. -/
private def desugarShortCircuitNode (model : SemanticModel) (expr : StmtExprMd) : StmtExprMd :=
private def desugarShortCircuitNode (imperativeCallees : List String) (expr : StmtExprMd) : StmtExprMd :=
let source := expr.source
match expr.val with
| .PrimitiveOp op args =>
Expand All @@ -35,20 +35,22 @@ private def desugarShortCircuitNode (model : SemanticModel) (expr : StmtExprMd)
-- short-circuits converted to IfThenElse). The check still works because
-- `containsAssignmentOrImperativeCall` recurses into IfThenElse.
| .AndThen, [a, b] | .Implies, [a, b] =>
if containsAssignmentOrImperativeCall model b then
if containsAssignmentOrImperativeCall imperativeCallees b then
let elseVal := match op with | .AndThen => false | _ => true
⟨.IfThenElse a b (some (bare (.LiteralBool elseVal))), source⟩
else expr
| .OrElse, [a, b] =>
if containsAssignmentOrImperativeCall model b then
if containsAssignmentOrImperativeCall imperativeCallees b then
⟨.IfThenElse a (bare (.LiteralBool true)) (some b), source⟩
else expr
| _, _ => expr
| _ => expr

/-- Desugar short-circuit operators in a program. -/
def desugarShortCircuit (model : SemanticModel) (program : Program) : Program :=
mapProgram (mapStmtExpr (desugarShortCircuitNode model)) program
def desugarShortCircuit (_model : SemanticModel) (program : Program) : Program :=
let imperativeCallees := program.staticProcedures.filter (fun p => !p.isFunctional)
|>.map (fun p => p.name.text)
mapProgram (mapStmtExpr (desugarShortCircuitNode imperativeCallees)) program

end -- public section
end Strata.Laurel
11 changes: 7 additions & 4 deletions Strata/Languages/Laurel/EliminateValueReturns.lean
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
module

public import Strata.Languages.Laurel.MapStmtExpr
public import Strata.Languages.Laurel.TransparencyPass

/-!
# Eliminate Value Returns
Expand Down Expand Up @@ -79,13 +80,15 @@ def eliminateValueReturnsInProc (proc : Procedure) : Procedure × Array Diagnost

public section

/-- Transform a program by eliminating value returns in all imperative procedures. -/
def eliminateValueReturnsTransform (program : Program) : Program × Array DiagnosticModel :=
let (procs, diags) := program.staticProcedures.foldl (fun (ps, ds) proc =>
/-- Transform an `UnorderedCoreWithLaurelTypes` by eliminating value returns
in all core (non-functional) procedures. -/
def eliminateValueReturnsTransform (uc : UnorderedCoreWithLaurelTypes)
: UnorderedCoreWithLaurelTypes × Array DiagnosticModel :=
let (procs, diags) := uc.coreProcedures.foldl (fun (ps, ds) proc =>
let (proc', procDiags) := eliminateValueReturnsInProc proc
(proc' :: ps, ds ++ procDiags)
) ([], #[])
({ program with staticProcedures := procs.reverse }, diags)
({ uc with coreProcedures := procs.reverse }, diags)

end -- public section

Expand Down
2 changes: 1 addition & 1 deletion Strata/Languages/Laurel/Grammar/LaurelGrammar.lean
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module
-- Laurel dialect definition, loaded from LaurelGrammar.st
-- NOTE: Changes to LaurelGrammar.st are not automatically tracked by the build system.
-- Update this file (e.g. this comment) to trigger a recompile after modifying LaurelGrammar.st.
-- Last grammar change: block format uses indent(2) with leading spaces for vertical layout.
-- Last grammar change: multiAssign supports field access targets, added opaque keyword.
public import Strata.DDM.Integration.Lean
public meta import Strata.DDM.Integration.Lean

Expand Down
13 changes: 9 additions & 4 deletions Strata/Languages/Laurel/HeapParameterization.lean
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def collectExpr (expr : StmtExpr) : StateM AnalysisResult Unit := do
| .Assigned n => collectExprMd n
| .Old v => collectExprMd v
| .Fresh v => collectExprMd v
| .Assert ⟨c, _⟩ => collectExprMd c
| .Assert ⟨c, _, _⟩ => collectExprMd c
| .Assume c => collectExprMd c
| .ProveBy v p => collectExprMd v; collectExprMd p
| .ContractOf _ f => collectExprMd f
Expand Down Expand Up @@ -433,8 +433,8 @@ where
| .Assigned n => return ⟨ .Assigned (← recurse n), source ⟩
| .Old v => return ⟨ .Old (← recurse v), source ⟩
| .Fresh v => return ⟨ .Fresh (← recurse v), source ⟩
| .Assert ⟨condExpr, summary⟩ =>
return ⟨ .Assert { condition := ← recurse condExpr, summary }, source ⟩
| .Assert ⟨condExpr, summary, free⟩ =>
return ⟨ .Assert { condition := ← recurse condExpr, summary, free }, source ⟩
| .Assume c => return ⟨ .Assume (← recurse c), source ⟩
| .ProveBy v p => return ⟨ .ProveBy (← recurse v) (← recurse p), source ⟩
| .ContractOf ty f => return ⟨ .ContractOf ty (← recurse f), source ⟩
Expand Down Expand Up @@ -566,9 +566,14 @@ def heapParameterization (model: SemanticModel) (program : Program) : Program :=
-- Generate Box datatype from all constructors used during transformation
let boxDatatype : TypeDefinition :=
.Datatype { name := "Box", typeArgs := [], constructors := state2.usedBoxConstructors }
let types := fieldDatatype :: boxDatatype :: heapConstants.types ++
-- The filter is a hack to deal with another hack,
-- the box that was added in CoreDefinitionsForLaurel.lean
-- because Laurel does not support polymorphism yet
types'.filter (fun td => td.name.text != "Box")
{ program with
staticProcedures := heapConstants.staticProcedures ++ procs',
types := fieldDatatype :: boxDatatype :: heapConstants.types ++ types' }
types }

end Strata.Laurel

Expand Down
Loading
Loading