Skip to content

fix(symbolic): prove memory-backed arrays - #16747

Draft
figtracer wants to merge 5 commits into
masterfrom
fig/symbolic-model-borrowed-keys
Draft

fix(symbolic): prove memory-backed arrays#16747
figtracer wants to merge 5 commits into
masterfrom
fig/symbolic-model-borrowed-keys

Conversation

@figtracer

@figtracer figtracer commented Sep 9, 2026

Copy link
Copy Markdown
Member

Preserves correlated symbolic memory offsets through full-word array assertions. The fallback is limited to no-reason uint256[], int256[], and bytes32[] equality assertions, proves that every feasible CALL size contains the decoded arrays, and accepts the same non-strict ABI tail layouts as the ordinary decoder. This lets symbolic execution finish properties whose array values are assembled through dynamic memory offsets without changing concrete fuzzing.

Results

OpenZeppelin Contracts bbf3600d master PR
Arrays.slice property incomplete at 0 paths / 50 queries / 42 SMT queries safe at 2 paths / 17 queries / 13 SMT queries
solver time 766 ms mean 484 ms mean
wall time 0.79 s mean, exits at query cap 2.12 s mean, completes the proof

A deliberately corrupted variant produces args=[[0], 0, 0], and the persisted artifact reproduces the same assertion failure under concrete replay. The longer candidate wall time is not presented as a speedup: master stops early without proving the property. AI assistance was used for implementation, review, and benchmark analysis.

The model evaluator only lives for the expression roots it evaluates, so its scratch maps can borrow hash-consed nodes instead of cloning handles. This removes reference-count churn without changing evaluation or cache lifetime.

On Solady v0.1.26, the focused symbolic suite was neutral at 211.1 ms on master and 211.6 ms on this change. A repeated model-heavy FLS check was also neutral at 243.0 ms and 242.6 ms over 25 runs.
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

✅ Changelog found

The deterministic check will validate the changed entry.

@figtracer figtracer changed the title perf(symbolic): borrow model cache keys [ignore] Sep 9, 2026
Borrowing evaluator cache keys only avoided reference-counted handle churn and produced neutral results on both ordinary Solady and the model-heavy control. Restore the simpler existing representation before retargeting this draft toward measured symbolic-memory work.
@figtracer figtracer changed the title [ignore] [ignore] symbolic memory history experiment Sep 9, 2026
Preserve correlated symbolic memory offsets through full-word array assertions and retain conservative bounds needed to prune disjoint writes. This turns an OpenZeppelin Arrays.slice property from incomplete at 50 queries into Safe in 17 while a corrupted variant still produces and concretely replays a counterexample.
@figtracer figtracer changed the title [ignore] symbolic memory history experiment fix(symbolic): prove memory-backed arrays Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant