Skip to content
Open
Show file tree
Hide file tree
Changes from 180 commits
Commits
Show all changes
275 commits
Select commit Hold shift + click to select a range
8b431c8
proofs: pin native hard error rollback
claude Apr 22, 2026
14103b9
proofs: pin native return dispatch lowering
claude Apr 22, 2026
4d5013f
proofs: pin native explicit storage slots
claude Apr 22, 2026
41ad1ff
proofs: pin native revert rollback
claude Apr 22, 2026
38cc57b
proofs: pin native IR slot forwarding
claude Apr 22, 2026
c6cf8f0
proofs: pin native transaction environment
claude Apr 22, 2026
3a36713
proofs: name native bridge invariants
claude Apr 22, 2026
0633d53
chore: auto-refresh derived artifacts
github-actions[bot] Apr 22, 2026
1b303a7
proofs: name native projection outcomes
claude Apr 22, 2026
ed9ce9f
chore: auto-refresh derived artifacts
github-actions[bot] Apr 22, 2026
a91031c
proofs: name native initial state invariants
claude Apr 22, 2026
f00b839
chore: auto-refresh derived artifacts
github-actions[bot] Apr 22, 2026
01738dd
proofs: name native storage seeding invariant
claude Apr 22, 2026
4569161
chore: auto-refresh derived artifacts
github-actions[bot] Apr 22, 2026
ebae796
proofs: name native execution pipeline invariant
claude Apr 22, 2026
8d70342
chore: auto-refresh derived artifacts
github-actions[bot] Apr 22, 2026
ac1e113
proofs: name native IR execution pipeline invariant
claude Apr 22, 2026
8b5128e
chore: auto-refresh derived artifacts
github-actions[bot] Apr 22, 2026
3247230
proofs: name native account installation invariant
claude Apr 22, 2026
527fd06
chore: auto-refresh derived artifacts
github-actions[bot] Apr 22, 2026
d36804d
proofs: name native environment defaults invariant
claude Apr 22, 2026
4d44138
chore: auto-refresh derived artifacts
github-actions[bot] Apr 22, 2026
661f8e7
proofs: name native calldata size invariant
claude Apr 22, 2026
7e34efb
chore: auto-refresh derived artifacts
github-actions[bot] Apr 22, 2026
f779f37
proofs: name native halt projection invariants
claude Apr 22, 2026
ae5bb73
chore: auto-refresh derived artifacts
github-actions[bot] Apr 22, 2026
116f924
proofs: name native event projection invariants
claude Apr 22, 2026
79677ed
chore: auto-refresh derived artifacts
github-actions[bot] Apr 22, 2026
6b268a7
proofs: name omitted native storage invariant
claude Apr 22, 2026
f5d763e
proofs: name native finalMappings invariant
claude Apr 22, 2026
120e053
proofs: name native final storage invariants
claude Apr 22, 2026
b5e39b9
proofs: name native result observable invariants
claude Apr 22, 2026
08601d4
proofs: name missing native account storage invariant
claude Apr 22, 2026
cba4038
proofs: name native missing slot result invariants
claude Apr 22, 2026
193e6d6
proofs: name native final mapping invariants
claude Apr 22, 2026
e76a912
proofs: name native non-word return fallback
claude Apr 22, 2026
7f41306
proofs: name native call lowering invariants
claude Apr 22, 2026
e132814
proofs: name native environment bridge fields
claude Apr 22, 2026
71fe730
scripts: recognize partial defs in proof length check
claude Apr 22, 2026
985d7d5
scripts: test partial defs terminate proof spans
claude Apr 22, 2026
f10f5fd
ci: include native harness in evmyullean probe
claude Apr 22, 2026
92092ed
proofs: compare native env smoke with oracle
claude Apr 22, 2026
cb41fda
ci: guard native transition doc status
claude Apr 22, 2026
2799bb3
ci: guard native observable slot caveat
claude Apr 22, 2026
373790b
ci: guard native observable slot api
claude Apr 22, 2026
20e7b90
contracts: close evmyullean transition blockers
claude Apr 22, 2026
f85598c
contracts: harden overload and env accessors
claude Apr 22, 2026
30d108d
contracts: add migration parity surfaces
claude Apr 22, 2026
e01b323
contracts: remove legacy internal call surface
claude Apr 22, 2026
ef46e5b
contracts: fix overload review regressions
claude Apr 22, 2026
647f2f3
contracts: memoize tuple array element index
claude Apr 22, 2026
a9ec28c
contracts: fail closed on ambiguous overload lookup
claude Apr 22, 2026
c06ab65
compiler: recurse trust surface through array element words
claude Apr 22, 2026
ea21ba6
compiler: reject internal external name collisions
claude Apr 22, 2026
909125f
proofs: cover native selector bytes and new source cases
claude Apr 22, 2026
0724aad
contracts: close tuple array element review gaps
claude Apr 22, 2026
04e2186
proofs: add native dispatch oracle
claude Apr 22, 2026
2094769
contracts: harden overload generated names
claude Apr 22, 2026
57ccf1f
proofs: cover memory return native oracle
claude Apr 22, 2026
aae4b46
compiler: document selector-keyed overload dispatch
claude Apr 22, 2026
1b32fd5
proofs: cover native calldata argument oracle
claude Apr 22, 2026
cd0ea42
evmyullean: lower native dispatch lazily
claude Apr 22, 2026
82b7a89
proofs: cover native mapping oracle shapes
claude Apr 22, 2026
d3305cb
evmyullean: scope lazy native dispatch
claude Apr 22, 2026
8ff72e6
proofs: cover native packed mapping oracle
claude Apr 22, 2026
a823227
evmyullean: thread native switch ids
claude Apr 22, 2026
2f1f16a
macro: accept qualified blobbasefee
claude Apr 22, 2026
dba993a
evmyullean: guard native switch fallthrough
claude Apr 22, 2026
bdaa1a9
ci: guard native theorem transition target
claude Apr 22, 2026
6ffd034
ci: pin unbridged native env boundary
claude Apr 22, 2026
d595759
evmyullean: remove dead native stmt wrapper
claude Apr 22, 2026
e484cb8
compilation: split array element helper gates
claude Apr 22, 2026
2e40dd4
macro: reject ABI-erased newtype overloads
claude Apr 22, 2026
f6d9c68
proofs: expose native runtime preservation seam
claude Apr 22, 2026
06eed0e
evmyullean: validate native environment reads
claude Apr 22, 2026
1155569
evmyullean: freshen native switch temps
claude Apr 22, 2026
f1b975a
evmyullean: reserve function switch temps
claude Apr 22, 2026
1b366a0
proofs: align native bridge observables
claude Apr 22, 2026
7d96db1
evmyullean: validate native env on selected path
claude Apr 22, 2026
b1a4551
compiler: restrict plain arrayElement to word arrays
claude Apr 22, 2026
f037645
compiler: share array element usage traversal
claude Apr 22, 2026
9511f9d
proofs: add native bridge intro theorem
claude Apr 22, 2026
f6cee4b
proofs: expose lowered native dispatcher bridge
claude Apr 23, 2026
96e5f23
compiler: preserve shadowed context accessors
claude Apr 23, 2026
2c5e3bc
compiler: include package roots for module imports
claude Apr 23, 2026
08db836
compiler: simplify array element usage detection
claude Apr 23, 2026
9b34373
tests: cover context accessor shadow smoke
claude Apr 23, 2026
ceb10ec
proofs: expose native runtime lowering equations
claude Apr 23, 2026
ac78d5a
evmyullean: normalize native dispatch selector
claude Apr 23, 2026
5e3e487
macro: track tuple array return temp
claude Apr 23, 2026
36a92a9
evmyullean: expose statement native lowering equations
claude Apr 23, 2026
fbf26e9
macro: resolve declared context-name shadows
claude Apr 23, 2026
febf07f
proofs: expose native dispatcher block bridge
claude Apr 23, 2026
edd96ef
proofs: target lowered dispatcher block
claude Apr 23, 2026
728b822
proofs: expose raw native dispatcher exec
claude Apr 23, 2026
80d6396
proofs: narrow native dispatcher agreement
claude Apr 23, 2026
98b8ed7
compiler: allow namespaced internal helper names
claude Apr 23, 2026
9c340b9
proofs: expose native selector evaluation
claude Apr 23, 2026
8cbd225
compiler: lower storage words in typed ir
claude Apr 23, 2026
33aa242
proofs: expose native selector recomposition
claude Apr 23, 2026
31d0c27
proofs: reduce native selector byte decoding
claude Apr 23, 2026
f101a02
semantics: execute setStorageWord in source model
claude Apr 23, 2026
e7ea5ea
proofs: reduce native selector read bridge
claude Apr 23, 2026
7ece6e6
proofs: prove native selector evaluation
claude Apr 23, 2026
f93cb23
runtime: mirror packed address word writes
claude Apr 23, 2026
b5f384e
proofs: expose native switch guard execution
claude Apr 23, 2026
0b853a8
semantics: mirror raw storage word writes
claude Apr 23, 2026
ade837d
compiler: scan nested array helper usage
claude Apr 23, 2026
f478d28
proofs: expose native switch selected case
claude Apr 23, 2026
6763a5b
compiler: scope duplicate signatures to dispatch
claude Apr 23, 2026
7ca5e75
proofs: skip matched native switch cases
claude Apr 23, 2026
d1562ac
runtime: ignore user functions in native builtin scan
claude Apr 23, 2026
97d7abe
compiler: clarify array element word offsets
claude Apr 23, 2026
e67f6b0
proofs: package marked native switch case
claude Apr 23, 2026
0d6e127
ci: register packed address macro smoke
claude Apr 23, 2026
12e4432
ci: sync evmyullean fork audit pin
claude Apr 23, 2026
fdba4d3
proofs: package native switch prefix
claude Apr 23, 2026
79024ee
compiler: wrap storage word slots
claude Apr 23, 2026
be21bb8
proofs: package native switch freshness
claude Apr 23, 2026
9580577
proofs: package native switch default guard
claude Apr 23, 2026
bc262bb
proofs: package native switch case miss
claude Apr 23, 2026
194ef58
proofs: generalize native switch guard fuel
claude Apr 23, 2026
6355ddc
proofs: prove native switch case chains
claude Apr 23, 2026
9856714
proofs: package native switch defaults
claude Apr 23, 2026
19edb78
macro: erase ADTs in ABI overload keys
claude Apr 23, 2026
07b3ac0
proofs: bridge native switch selector lookup
claude Apr 23, 2026
c61a0a8
checks: address native transition review findings
claude Apr 23, 2026
11b2cae
proofs: factor native switch body preservation
claude Apr 23, 2026
ef96d23
typed-ir: reject ambiguous signature lookup
claude Apr 23, 2026
e947d8b
proofs: compose native switch defaults
claude Apr 23, 2026
234807f
proofs: preserve native switch case lookup
claude Apr 23, 2026
a30d023
proofs: parameterize native switch prefix
claude Apr 23, 2026
0e8efb2
proofs: expose native switch block parts
claude Apr 23, 2026
4698356
proofs: bridge raw native switch blocks
claude Apr 23, 2026
f363b2b
proofs: trim native switch proof guard
claude Apr 23, 2026
b1e3aa0
native: reject unbridged header builtins
claude Apr 23, 2026
070a5f8
proofs: package native assignment preservation
claude Apr 23, 2026
54c5e8d
proofs: stage native dispatcher bridge work
claude Apr 24, 2026
9256d4d
chore: auto-refresh derived artifacts
github-actions[bot] Apr 24, 2026
32e0ffc
Fix native transition review issues
Th0rgal Apr 24, 2026
75f6619
Materialize native storage reads
Th0rgal Apr 24, 2026
e17ca84
proofs: expose native SimpleStorage theorem skeleton
Th0rgal Apr 24, 2026
cfcec5c
proofs: reduce native SimpleStorage proof target
Th0rgal Apr 24, 2026
41cfc31
proofs: add native primitive execution helpers
Th0rgal Apr 24, 2026
39ae307
proofs: keep native dispatcher seam explicit
Th0rgal Apr 24, 2026
4f58dad
fix: mirror setStorageWord alias slots
Th0rgal Apr 24, 2026
b28b535
fix: simplify setStorageWord alias lowering
Th0rgal Apr 24, 2026
4b4fdc2
fix: mirror setStorageWord source alias semantics
Th0rgal Apr 25, 2026
0a15da6
Prove native calldata offset4 byte projection
Th0rgal Apr 25, 2026
f782ccc
Prove native calldataload offset4 argument decode
Th0rgal Apr 25, 2026
d2fe734
Prove native sload observable slot lemma
Th0rgal Apr 25, 2026
eef2311
Prove native SSTORE initial-state step lemma
Th0rgal Apr 25, 2026
c62fc97
Prove native mstore return sequence halt
Th0rgal Apr 25, 2026
339109c
Prove native selector miss revert default
Th0rgal Apr 25, 2026
b462beb
Prove native return buffer is one word
Th0rgal Apr 25, 2026
da6d07c
Prove native return exact byte buffer helper
Th0rgal Apr 25, 2026
0f848fe
Prove UInt256 return byte size for native mstore return
Th0rgal Apr 25, 2026
393c723
Prove native mstore return word projection
Th0rgal Apr 25, 2026
81b7d34
Prove native mstore return projectResult value
Th0rgal Apr 25, 2026
a071ef5
Prove native calldataload4 argument primitive
Th0rgal Apr 25, 2026
019a943
Prove native calldataload then sstore store core
Th0rgal Apr 25, 2026
7a4dc3e
Prove native sload return getter primitive
Th0rgal Apr 25, 2026
a8eb853
Project native store core success result
Th0rgal Apr 25, 2026
00e7e9f
Project native store slot zero write
Th0rgal Apr 25, 2026
ef5e9a3
Prove lowered native selector miss revert path
Th0rgal Apr 25, 2026
7ea2f61
Project native selector miss revert result
Th0rgal Apr 25, 2026
dbf03ae
Isolate native store zero projection erase premise
Th0rgal Apr 25, 2026
6f9f015
Peel callDispatcher wrapper from SimpleStorage native bridge
Th0rgal Apr 25, 2026
cdb1618
Peel dispatcher block wrapper from SimpleStorage native bridge
Th0rgal Apr 25, 2026
f746328
Specialize SimpleStorage native bridge to positive fuel
Th0rgal Apr 25, 2026
ab64ba9
Add positive native dispatcher exec intro lemmas
Th0rgal Apr 25, 2026
ee34b3e
Prove empty-observable native zero store projection
Th0rgal Apr 25, 2026
d40b6df
Prove native setter stop projection
Th0rgal Apr 25, 2026
e0dabfa
Prove native setter stop storage projection
Th0rgal Apr 25, 2026
2a7fc8d
Prove omitted-slot native getter return
Th0rgal Apr 25, 2026
6bead1d
Prove materialized native getter return
Th0rgal Apr 25, 2026
2119dad
Prove native sstore word-slot projection
Th0rgal Apr 25, 2026
30e4433
Prove native sstore zero word-slot projection
Th0rgal Apr 25, 2026
e52883c
Prove SimpleStorage native selector-miss tag range
Th0rgal Apr 25, 2026
2b78778
Prove SimpleStorage native selector-hit lookup
Th0rgal Apr 25, 2026
e049253
Prove native selector primitive decode
Th0rgal Apr 25, 2026
f4b6978
Prove native setter execution with dispatcher store
Th0rgal Apr 25, 2026
064721c
Prove native getter execution with dispatcher store
Th0rgal Apr 25, 2026
89cb058
Prove native setter with-store projections
Th0rgal Apr 25, 2026
2c3a67d
Prove native sstore with-store projections
Th0rgal Apr 25, 2026
f5423c5
Prove SimpleStorage revert projection equality
Th0rgal Apr 25, 2026
f26ba08
Prove exact native mstore return projection
Th0rgal Apr 25, 2026
1b1f4c7
Prove exact native getter projection with dispatcher store
Th0rgal Apr 25, 2026
f5caeb2
Prove exact native setter projection with dispatcher store
Th0rgal Apr 25, 2026
86a22cd
Prove exact native sstore projection with dispatcher store
Th0rgal Apr 25, 2026
7a92f76
Prove ofIR native calldata setter projection
Th0rgal Apr 25, 2026
d727875
Prove SimpleStorage native switch hit projections
Th0rgal Apr 25, 2026
4fdffb5
Prove tx-selector native default revert projection
Th0rgal Apr 25, 2026
9afb1ea
Prove SimpleStorage native selector miss from disequalities
Th0rgal Apr 25, 2026
e018662
Prove native dispatcher block call-frame reduction
Th0rgal Apr 25, 2026
21acb3b
Specialize SimpleStorage native selector miss body
Th0rgal Apr 25, 2026
dd7cc51
Specialize SimpleStorage native selector hit bodies
Th0rgal Apr 25, 2026
ec5df50
Package native dispatcher projected-result bridge intros
Th0rgal Apr 25, 2026
4c3d506
Shrink SimpleStorage native bridge to concrete dispatcher fuel
Th0rgal Apr 25, 2026
15833a4
Expose SimpleStorage native dispatcher lowering shape
Th0rgal Apr 25, 2026
aafdb3b
Peel SimpleStorage native dispatcher singleton-block wrapper
Th0rgal Apr 25, 2026
aa6b0b2
Peel SimpleStorage native dispatcher exec to inner-block exec
Th0rgal Apr 25, 2026
5ea3c62
Peel SimpleStorage native dispatcher inner-block head to lowered Let
Th0rgal Apr 25, 2026
4660052
Peel SimpleStorage native dispatcher inner-block second stmt to lower…
Th0rgal Apr 25, 2026
b5e90c2
Peel SimpleStorage native dispatcher inner-block to full 3-stmt shape
Th0rgal Apr 25, 2026
aad8666
Expose SimpleStorage native dispatcher exec at concrete let/if/if 3-s…
Th0rgal Apr 25, 2026
6341fee
Pin SimpleStorage native dispatcher let/if/if witnesses as named defs
Th0rgal Apr 25, 2026
4eea75b
Pin SimpleStorage native dispatcher let RHS to concrete iszero(lt(cal…
Th0rgal Apr 25, 2026
98af006
Pin SimpleStorage native dispatcher if1/if2 conditions to concrete Yu…
Th0rgal Apr 25, 2026
97ffc64
Pin SimpleStorage native dispatcher if1Body to [nativeRevertZeroZeroS…
Th0rgal Apr 25, 2026
3675d29
Prove closed-form selector-miss revert exec for SimpleStorage if1Body
Th0rgal Apr 25, 2026
011825b
Prove eval lemma for SimpleStorage dispatcher let RHS iszero(lt(cdsiz…
Th0rgal Apr 25, 2026
44aa253
Specialize selector eval lemma to initialState giving concrete value 1
Th0rgal Apr 25, 2026
e6d841b
Prove exec lemma for SimpleStorage dispatcher let __has_selector := i…
Th0rgal Apr 25, 2026
b99bb43
Prove If1 selector-miss skip lemma when __has_selector = 1
Th0rgal Apr 25, 2026
800975f
Compose Let + If1-skip chain peel for SimpleStorage native dispatcher
Th0rgal Apr 26, 2026
615acf8
Extend SimpleStorage native dispatcher peel through If2-take
Th0rgal Apr 26, 2026
3720a5a
Pin if2Body as concrete singleton lowerNativeSwitchBlock
Th0rgal Apr 26, 2026
78dbe23
Compose dispatcher inner-block exec to lowerNativeSwitchBlock exec
Th0rgal Apr 26, 2026
6b08d9d
Lift inner-block lowerNativeSwitchBlock peel to contractDispatcherExe…
Th0rgal Apr 26, 2026
05e83ed
Add store-parametric exec_let_lowerExprNative_selectorExpr_initialSta…
Th0rgal Apr 26, 2026
12d245d
Add store-parametric exec_nativeSwitchPrefix_selector_initialState_st…
Th0rgal Apr 26, 2026
1e09802
Add store-parametric exec_lowerNativeSwitchBlock_storePrefix_tail_err…
Th0rgal Apr 26, 2026
ad8ce5a
Add store-parametric exec_lowerNativeSwitchBlock_selector_find_none_w…
Th0rgal Apr 26, 2026
8f136ed
Pin lowered switch default body to nativeRevertZeroZeroStmt up the di…
Th0rgal Apr 26, 2026
0ed27af
Add bridge-level selector-miss reduction endpoint and fix forward ref…
Th0rgal Apr 26, 2026
d367082
Add tag/length-preservation and source-lowered companions for switch …
Th0rgal Apr 26, 2026
a2a9431
Add source-lowered companion exposing buildSwitch source-cases lowering
Th0rgal Apr 26, 2026
26e9c7f
Thread sourceLowered form through if2Body decomposition
Th0rgal Apr 26, 2026
948c0a1
Thread sourceLowered form through dispatcher exec endpoints
Th0rgal Apr 26, 2026
f77e5ff
Add closed-form selector-miss bridge endpoint for SimpleStorage nativ…
Th0rgal Apr 26, 2026
2361010
Add shape lemma forcing lowered SimpleStorage source cases to two-ele…
Th0rgal Apr 26, 2026
21e254c
Add store-parametric selector-hit error endpoint for lowered switch b…
Th0rgal Apr 26, 2026
c882e57
Add SimpleStorage store-prefix store-hit selector endpoint
Th0rgal Apr 26, 2026
d0f21fb
Add bridge-shape selector-hit endpoint on post-`__has_selector := 1` …
Th0rgal Apr 26, 2026
ec04d0b
Add bridge-level store-hit dispatcher endpoint via reduction
Th0rgal Apr 26, 2026
1c5f4fa
Add closed-form storeHit_error endpoint composing via_reduction with …
Th0rgal Apr 26, 2026
aeea462
Add closed-form retrieveHit_error endpoint completing the three-case …
Th0rgal Apr 26, 2026
d6a01b6
Add concrete lowered case bodies for SimpleStorage source switch
Th0rgal Apr 26, 2026
83d365f
Shrink hit-case dispatcher hBody premise to fixed concrete body
Th0rgal Apr 26, 2026
73f001a
Strip leading Block [] no-op from concrete hit-case body exec obligat…
Th0rgal Apr 26, 2026
b9f5522
Add native callvalue eval lemmas (step/primCall + lowered Yul form)
Th0rgal Apr 26, 2026
6adcaf8
Strip leading callvalue() revert guard from hit-case body-exec obliga…
Th0rgal Apr 26, 2026
c7eda97
Strip leading lt(calldatasize,4) revert guard from retrieve hit-case …
Th0rgal Apr 26, 2026
9257817
Add eval-side sload(lit) seam for retrieve hit-case body inner expres…
Th0rgal Apr 26, 2026
c44e279
Add exec-side native seam for mstore(lit, sload(lit)) statement
Th0rgal Apr 26, 2026
4c653cc
Close retrieve hit-case tail3 with closed-form exec
Th0rgal Apr 26, 2026
1c8cef9
Split SimpleStorage native dispatcher bridge into 3 per-case sub-bridges
Th0rgal Apr 26, 2026
a1c3545
Flag setStorageWord with nonzero wordOffset as untrackable
Th0rgal Apr 26, 2026
96a176d
Make overloaded function ident suffix injective
Th0rgal Apr 26, 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
15 changes: 11 additions & 4 deletions .github/workflows/evmyullean-fork-conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ name: EVMYulLean fork conformance
# Weekly probe that the pinned lfglabs-dev/EVMYulLean fork still
# satisfies Verity's bridge assumptions: the fork audit and adapter
# report artifacts are in sync, adapter correctness still builds,
# all universal bridge lemmas still build, the public EndToEnd
# EVMYulLean target still builds, and all 123 concrete `native_decide`
# bridge-equivalence tests still pass.
# all universal bridge lemmas still build, the native transition harness still
# builds, emitted dispatcher native/reference oracle coverage still passes, the
# public EndToEnd EVMYulLean target still builds, and all 123 concrete
# `native_decide` bridge-equivalence tests still pass.
#
# Burn-in: the probe step is captured with `continue-on-error: true`
# during the two-week window starting 2026-04-20 (see issue #1722 plan
Expand Down Expand Up @@ -36,6 +37,9 @@ on:
- 'Compiler/Proofs/YulGeneration/Backends/EvmYulLeanBodyClosure.lean'
- 'Compiler/Proofs/YulGeneration/Backends/EvmYulLeanBridgeLemmas.lean'
- 'Compiler/Proofs/YulGeneration/Backends/EvmYulLeanBridgeTest.lean'
- 'Compiler/Proofs/YulGeneration/Backends/EvmYulLeanNativeHarness.lean'
- 'Compiler/Proofs/YulGeneration/Backends/EvmYulLeanNativeDispatchOracleTest.lean'
- 'Compiler/Proofs/YulGeneration/Backends/EvmYulLeanNativeSmokeTest.lean'
- 'Compiler/Proofs/YulGeneration/Backends/EvmYulLeanRetarget.lean'
- 'Compiler/Proofs/YulGeneration/Backends/EvmYulLeanSignedArithSpec.lean'
- 'Compiler/Proofs/YulGeneration/Backends/EvmYulLeanSourceExprClosure.lean'
Expand All @@ -58,6 +62,9 @@ on:
- 'Compiler/Proofs/YulGeneration/Backends/EvmYulLeanBodyClosure.lean'
- 'Compiler/Proofs/YulGeneration/Backends/EvmYulLeanBridgeLemmas.lean'
- 'Compiler/Proofs/YulGeneration/Backends/EvmYulLeanBridgeTest.lean'
- 'Compiler/Proofs/YulGeneration/Backends/EvmYulLeanNativeHarness.lean'
- 'Compiler/Proofs/YulGeneration/Backends/EvmYulLeanNativeDispatchOracleTest.lean'
- 'Compiler/Proofs/YulGeneration/Backends/EvmYulLeanNativeSmokeTest.lean'
- 'Compiler/Proofs/YulGeneration/Backends/EvmYulLeanRetarget.lean'
- 'Compiler/Proofs/YulGeneration/Backends/EvmYulLeanSignedArithSpec.lean'
- 'Compiler/Proofs/YulGeneration/Backends/EvmYulLeanSourceExprClosure.lean'
Expand Down Expand Up @@ -160,7 +167,7 @@ jobs:
"make test-evmyullean-fork",
"```",
"",
"This guard checks the pinned EVMYulLean fork audit, checks the adapter report, rebuilds adapter correctness and the public EndToEnd target, and runs the concrete bridge-equivalence tests."
"This guard checks the pinned EVMYulLean fork audit, checks the adapter report, rebuilds adapter correctness, the native transition harness, and the public EndToEnd target, and runs the concrete bridge-equivalence tests."
];
const body = bodyLines.join("\n");

Expand Down
5 changes: 3 additions & 2 deletions AXIOMS.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,9 @@ the EVM.
**Soundness controls**:
- `make check` validates the fork-audit artifact against `lake-manifest.json`.
- `make test-evmyullean-fork` rechecks the fork audit, checks the adapter
report, rebuilds adapter correctness and the public EndToEnd EVMYulLean
target, and runs the concrete `native_decide` bridge-equivalence tests.
report, rebuilds adapter correctness, the native transition harness, the
public EndToEnd EVMYulLean target, and the concrete `native_decide`
bridge-equivalence tests.
- `.github/workflows/evmyullean-fork-conformance.yml` runs the conformance probe
weekly; after the burn-in ending 2026-05-04, scheduled/manual failures fail
the workflow and open or update a GitHub issue for drift triage.
Expand Down
4 changes: 4 additions & 0 deletions Compiler/CompilationModel/AbiHelpers.lean
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ def eventSignature (eventDef : EventDef) : String :=
def errorSignature (errorDef : ErrorDef) : String :=
s!"{errorDef.name}(" ++ String.intercalate "," (errorDef.params.map paramTypeToSolidityString) ++ ")"

def functionSignature (fn : FunctionSpec) : String :=
let params := fn.params.map (fun p => paramTypeToSolidityString p.ty)
s!"{fn.name}(" ++ String.intercalate "," params ++ ")"
Comment thread
Th0rgal marked this conversation as resolved.

def storageArrayElemTypeToParamType : StorageArrayElemType → ParamType
| .uint256 => .uint256
| .address => .address
Expand Down
23 changes: 23 additions & 0 deletions Compiler/CompilationModel/Compile.lean
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,29 @@ def compileStmt (fields : List Field) (events : List EventDef := [])
compileSetStorage fields dynamicSource field value
| Stmt.setStorageAddr field value =>
compileSetStorage fields dynamicSource field value true
| Stmt.setStorageWord field wordOffset value =>
match findFieldWithResolvedSlot fields field with
| some (f, slot) => do
let valueExpr ← compileExpr fields dynamicSource value
let slotExpr (baseSlot : Nat) :=
if wordOffset == 0 then YulExpr.lit baseSlot
else YulExpr.call "add" [YulExpr.lit baseSlot, YulExpr.lit wordOffset]
match f.aliasSlots with
| [] =>
pure [YulStmt.expr (YulExpr.call "sstore" [slotExpr slot, valueExpr])]
| _ =>
pure [
YulStmt.block (
[YulStmt.let_ "__compat_value" valueExpr] ++
(slot :: f.aliasSlots).map (fun writeSlot =>
YulStmt.expr (YulExpr.call "sstore" [
slotExpr writeSlot,
YulExpr.ident "__compat_value"
]))
)
]
| none =>
throw s!"Compilation error: unknown storage field '{field}' in setStorageWord"
| Stmt.storageArrayPush field value =>
compileStorageArrayPush fields dynamicSource field value
| Stmt.storageArrayPop field =>
Expand Down
38 changes: 30 additions & 8 deletions Compiler/CompilationModel/Dispatch.lean
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,20 @@ private def validateCompileInputsBeforeFieldWriteConflict
for ext in spec.externals do
let _ ← externalFunctionReturns ext
validateInteropExternalSpec ext
match firstDuplicateName (spec.functions.map (·.name)) with
match firstDuplicateName ((spec.functions.filter (fun fn => !fn.isInternal)).map functionSignature) with
| some dup =>
throw s!"Compilation error: duplicate function name '{dup}' in {spec.name}"
throw s!"Compilation error: duplicate function signature '{dup}' in {spec.name}"
Comment thread
Th0rgal marked this conversation as resolved.
Comment thread
cursor[bot] marked this conversation as resolved.
| none =>
pure ()
match firstDuplicateName ((spec.functions.filter (·.isInternal)).map (·.name)) with
| some dup =>
throw s!"Compilation error: duplicate internal function name '{dup}' in {spec.name}; internal function Yul definitions are keyed by name"
Comment thread
cursor[bot] marked this conversation as resolved.
| none =>
Comment thread
Th0rgal marked this conversation as resolved.
pure ()
let externalFunctionNames := (spec.functions.filter (fun fn => !fn.isInternal)).map (·.name)
match (spec.functions.filter (·.isInternal)).find? (fun fn => externalFunctionNames.contains fn.name) with
| some fn =>
throw s!"Compilation error: internal function name '{fn.name}' collides with an external function name in {spec.name}; internal function Yul definitions are keyed by name"
| none =>
pure ()
match firstDuplicateName (spec.errors.map (·.name)) with
Expand Down Expand Up @@ -352,11 +363,13 @@ def validateCompileInputs (spec : CompilationModel) (selectors : List Nat) : Exc
| none =>
pure ()
let mappingHelpersRequired := usesMapping fields
let arrayHelpersRequired := contractUsesArrayElement spec
let arrayHelpersRequired := contractUsesPlainArrayElement spec
let arrayElementWordHelpersRequired := contractUsesArrayElementWord spec
let storageArrayHelpersRequired := contractUsesStorageArrayElement spec
let dynamicBytesEqHelpersRequired := contractUsesDynamicBytesEq spec
match firstReservedExternalCollision
spec mappingHelpersRequired arrayHelpersRequired storageArrayHelpersRequired dynamicBytesEqHelpersRequired with
spec mappingHelpersRequired arrayHelpersRequired arrayElementWordHelpersRequired
storageArrayHelpersRequired dynamicBytesEqHelpersRequired with
| some name =>
if name.startsWith internalFunctionPrefix then
throw s!"Compilation error: external declaration '{name}' uses reserved prefix '{internalFunctionPrefix}' ({issue756Ref})."
Expand All @@ -380,7 +393,8 @@ def compileValidatedCore (spec : CompilationModel) (selectors : List Nat) : Exce
let externalFns := spec.functions.filter (fun fn => !fn.isInternal && !isInteropEntrypointName fn.name)
let internalFns := spec.functions.filter (·.isInternal)
let mappingHelpersRequired := usesMapping fields
let arrayHelpersRequired := contractUsesArrayElement spec
let arrayHelpersRequired := contractUsesPlainArrayElement spec
let arrayElementWordHelpersRequired := contractUsesArrayElementWord spec
let storageArrayHelpersRequired := contractUsesStorageArrayElement spec
let dynamicBytesEqHelpersRequired := contractUsesDynamicBytesEq spec
let fallbackSpec ← pickUniqueFunctionByName "fallback" spec.functions
Expand All @@ -389,10 +403,18 @@ def compileValidatedCore (spec : CompilationModel) (selectors : List Nat) : Exce
compileFunctionSpec fields spec.events spec.errors spec.adtTypes sel fnSpec
let internalFuncDefs ← internalFns.mapM (compileInternalFunction fields spec.events spec.errors spec.adtTypes)
let arrayElementHelpers :=
if arrayHelpersRequired then
[checkedArrayElementCalldataHelper, checkedArrayElementMemoryHelper]
(if arrayHelpersRequired then
[ checkedArrayElementCalldataHelper
, checkedArrayElementMemoryHelper
]
else
[]
[]) ++
(if arrayElementWordHelpersRequired then
[ checkedArrayElementWordCalldataHelper
, checkedArrayElementWordMemoryHelper
]
Comment thread
cursor[bot] marked this conversation as resolved.
else
[])
let storageArrayElementHelpers :=
if storageArrayHelpersRequired then
[checkedStorageArrayElementHelper]
Expand Down
33 changes: 33 additions & 0 deletions Compiler/CompilationModel/DynamicData.lean
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ def checkedArrayElementCalldataHelperName : String :=
def checkedArrayElementMemoryHelperName : String :=
"__verity_array_element_memory_checked"

def checkedArrayElementWordCalldataHelperName : String :=
"__verity_array_element_word_calldata_checked"

def checkedArrayElementWordMemoryHelperName : String :=
"__verity_array_element_word_memory_checked"

def checkedStorageArrayElementHelperName : String :=
"__verity_storage_array_element_checked"

Expand Down Expand Up @@ -50,6 +56,33 @@ def checkedArrayElementCalldataHelper : YulStmt :=
def checkedArrayElementMemoryHelper : YulStmt :=
checkedArrayElementHelper checkedArrayElementMemoryHelperName "mload"

private def checkedArrayElementWordHelper (helperName loadOp : String) : YulStmt :=
let elementWordIndex :=
YulExpr.call "add" [
YulExpr.call "mul" [YulExpr.ident "index", YulExpr.ident "element_words"],
YulExpr.ident "word_offset"
]
let byteOffset := YulExpr.call "mul" [elementWordIndex, YulExpr.lit 32]
YulStmt.funcDef helperName ["data_offset", "length", "index", "element_words", "word_offset"] ["word"] [
YulStmt.if_ (YulExpr.call "iszero" [
YulExpr.call "lt" [YulExpr.ident "index", YulExpr.ident "length"]
]) [
YulStmt.expr (YulExpr.call "revert" [YulExpr.lit 0, YulExpr.lit 0])
],
YulStmt.assign "word" (YulExpr.call loadOp [
YulExpr.call "add" [
YulExpr.ident "data_offset",
byteOffset
]
])
]

def checkedArrayElementWordCalldataHelper : YulStmt :=
checkedArrayElementWordHelper checkedArrayElementWordCalldataHelperName "calldataload"

def checkedArrayElementWordMemoryHelper : YulStmt :=
checkedArrayElementWordHelper checkedArrayElementWordMemoryHelperName "mload"

def checkedStorageArrayElementHelper : YulStmt :=
YulStmt.funcDef checkedStorageArrayElementHelperName ["slot", "index"] ["word"] [
YulStmt.let_ "__array_len" (YulExpr.call "sload" [YulExpr.ident "slot"]),
Expand Down
17 changes: 17 additions & 0 deletions Compiler/CompilationModel/ExpressionCompile.lean
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,23 @@ def compileExpr (fields : List Field)
YulExpr.ident s!"{name}_length",
indexExpr
])
| Expr.arrayElementWord name index elementWords wordOffset => do
if elementWords == 0 then
throw s!"Compilation error: Expr.arrayElementWord '{name}' requires elementWords > 0"
else if wordOffset >= elementWords then
throw s!"Compilation error: Expr.arrayElementWord '{name}' wordOffset {wordOffset} is outside element width {elementWords}"
else
let indexExpr ← compileExpr fields dynamicSource index
let helperName := match dynamicSource with
| .calldata => checkedArrayElementWordCalldataHelperName
| .memory => checkedArrayElementWordMemoryHelperName
pure (YulExpr.call helperName [
YulExpr.ident s!"{name}_data_offset",
YulExpr.ident s!"{name}_length",
indexExpr,
YulExpr.lit elementWords,
YulExpr.lit wordOffset
])
| Expr.storageArrayLength field =>
match findFieldWithResolvedSlot fields field with
| some (f, slot) =>
Expand Down
9 changes: 6 additions & 3 deletions Compiler/CompilationModel/LogicalPurity.lean
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ partial def exprContainsCallLike (expr : Expr) : Bool :=
| Expr.structMember2 _ key1 key2 _ =>
exprContainsCallLike key1 || exprContainsCallLike key2
| Expr.storageArrayElement _ index
| Expr.arrayElement _ index =>
| Expr.arrayElement _ index
| Expr.arrayElementWord _ index _ _ =>
exprContainsCallLike index
| Expr.dynamicBytesEq _ _ =>
false
Expand Down Expand Up @@ -110,7 +111,8 @@ def exprContainsUnsafeLogicalCallLike (expr : Expr) : Bool :=
| Expr.mapping2 _ key1 key2 | Expr.mapping2Word _ key1 key2 _
| Expr.structMember2 _ key1 key2 _ =>
exprContainsUnsafeLogicalCallLike key1 || exprContainsUnsafeLogicalCallLike key2
| Expr.storageArrayElement _ index | Expr.arrayElement _ index | Expr.returndataOptionalBoolAt index =>
| Expr.storageArrayElement _ index | Expr.arrayElement _ index
| Expr.arrayElementWord _ index _ _ | Expr.returndataOptionalBoolAt index =>
exprContainsUnsafeLogicalCallLike index
| Expr.dynamicBytesEq _ _ =>
false
Expand Down Expand Up @@ -152,7 +154,8 @@ termination_by es => sizeOf es
decreasing_by all_goals simp_wf; all_goals omega

def stmtContainsUnsafeLogicalCallLike : Stmt → Bool
| Stmt.letVar _ value | Stmt.assignVar _ value | Stmt.setStorage _ value | Stmt.setStorageAddr _ value |
| Stmt.letVar _ value | Stmt.assignVar _ value | Stmt.setStorage _ value | Stmt.setStorageAddr _ value
| Stmt.setStorageWord _ _ value |
Stmt.storageArrayPush _ value |
Stmt.return value | Stmt.require value _ =>
exprContainsUnsafeLogicalCallLike value
Expand Down
11 changes: 9 additions & 2 deletions Compiler/CompilationModel/ParamLoading.lean
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ def isScalarParamType : ParamType → Bool
| ParamType.uint256 | ParamType.int256 | ParamType.uint8 | ParamType.address | ParamType.bool | ParamType.bytes32 => true
| _ => false

private def dynamicArrayElementStrideWords (elemTy : ParamType) : Nat :=
if isDynamicParamType elemTy then
1
else
max 1 (paramHeadSize elemTy / 32)

private def genDynamicParamLoads
(loadWord : YulExpr → YulExpr) (sizeExpr : YulExpr) (headSize : Nat)
(baseOffset : Nat) (name : String) (ty : ParamType) (headOffset : Nat) :
Expand Down Expand Up @@ -56,10 +62,11 @@ private def genDynamicParamLoads
]) [
YulStmt.expr (YulExpr.call "revert" [YulExpr.lit 0, YulExpr.lit 0])
]]
| ParamType.array _ =>
| ParamType.array elemTy =>
let elemWords := dynamicArrayElementStrideWords elemTy
[YulStmt.if_ (YulExpr.call "gt" [
YulExpr.ident s!"{name}_length",
YulExpr.call "div" [YulExpr.ident tailRemainingName, YulExpr.lit 32]
YulExpr.call "div" [YulExpr.ident tailRemainingName, YulExpr.lit (32 * elemWords)]
Comment thread
Th0rgal marked this conversation as resolved.
]) [
YulStmt.expr (YulExpr.call "revert" [YulExpr.lit 0, YulExpr.lit 0])
]]
Expand Down
23 changes: 22 additions & 1 deletion Compiler/CompilationModel/ScopeValidation.lean
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,26 @@ def validateScopedExprIdentifiers
| none =>
throw s!"Compilation error: {context} references unknown parameter '{name}' in Expr.arrayElement"
validateScopedExprIdentifiers context params paramScope dynamicParams localScope constructorArgCount index
| Expr.arrayElementWord name index elementWords wordOffset => do
if elementWords == 0 then
throw s!"Compilation error: {context} Expr.arrayElementWord '{name}' requires elementWords > 0"
else if wordOffset >= elementWords then
throw s!"Compilation error: {context} Expr.arrayElementWord '{name}' wordOffset {wordOffset} is outside element width {elementWords}"
match findParamType params name with
| some ty@(ParamType.array elemTy) =>
if isDynamicParamType elemTy then
throw s!"Compilation error: {context} Expr.arrayElementWord '{name}' requires an array parameter with static ABI-word elements, got {repr ty}"
else
let expectedWords := paramHeadSize elemTy / 32
if elementWords == expectedWords then
pure ()
else
throw s!"Compilation error: {context} Expr.arrayElementWord '{name}' element width {elementWords} does not match ABI width {expectedWords} for {repr ty}"
| some ty =>
throw s!"Compilation error: {context} Expr.arrayElementWord '{name}' requires array parameter, got {repr ty}"
| none =>
throw s!"Compilation error: {context} references unknown parameter '{name}' in Expr.arrayElementWord"
validateScopedExprIdentifiers context params paramScope dynamicParams localScope constructorArgCount index
Comment thread
Th0rgal marked this conversation as resolved.
| Expr.mapping _ key | Expr.mappingWord _ key _ | Expr.mappingPackedWord _ key _ _ | Expr.mappingUint _ key
| Expr.structMember _ key _ =>
validateScopedExprIdentifiers context params paramScope dynamicParams localScope constructorArgCount key
Expand Down Expand Up @@ -263,7 +283,8 @@ def validateScopedStmtIdentifiers
throw s!"Compilation error: {context} assigns to undeclared local variable '{name}'"
validateScopedExprIdentifiers context params paramScope dynamicParams localScope constructorArgCount value
pure localScope
| Stmt.setStorage _ value | Stmt.setStorageAddr _ value | Stmt.return value | Stmt.require value _ => do
| Stmt.setStorage _ value | Stmt.setStorageAddr _ value | Stmt.setStorageWord _ _ value
| Stmt.return value | Stmt.require value _ => do
validateScopedExprIdentifiers context params paramScope dynamicParams localScope constructorArgCount value
pure localScope
| Stmt.storageArrayPush _ value => do
Expand Down
Loading
Loading