Skip to content

Upstream symbolic bytes lookup, List membership lemmas#2702

Merged
automergerpr-permission-manager[bot] merged 6 commits into
masterfrom
add-bytes-lookup-lemmas
Aug 1, 2025
Merged

Upstream symbolic bytes lookup, List membership lemmas#2702
automergerpr-permission-manager[bot] merged 6 commits into
masterfrom
add-bytes-lookup-lemmas

Conversation

@palinatolmach
Copy link
Copy Markdown
Contributor

@palinatolmach palinatolmach commented Feb 6, 2025

Closes #2476.

This PR adds lemmas for lookups in partially symbolic bytes arrays; specifically, in runtime bytecode of contracts that contain immutable variables that are initialized in a constructor with a symbolic value. It also adds List membership lemmas that facilitate checking if a performed call is allowed in Kontrol when the allowCalls cheatcode is used.

Once this PR is merged, the relevant lemmas should be removed from KONTROL-AUX-LEMMAS and https://github.com/runtimeverification/kontrol/blob/master/src/tests/integration/test-data/symbolic-bytes-lemmas.k.

@palinatolmach palinatolmach changed the title Add bytes lookup lemmas for symbolic immutables Upstream symbolic bytes lookup, List membership lemmas Jul 29, 2025
@palinatolmach palinatolmach marked this pull request as ready for review July 31, 2025 14:03
Comment thread kevm-pyk/src/kevm_pyk/kproj/evm-semantics/lemmas/bytes-simplification.k Outdated
Copy link
Copy Markdown
Contributor

@lucasmt lucasmt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm approving the PR, just have one comment above that I think needs to be addressed before it's merged

@palinatolmach
Copy link
Copy Markdown
Contributor Author

I opened a PR in Kontrol to test if upstreamed lemmas don't negatively affect the tests and are applied if I take out the same lemmas from Kontrol aux files. The tests are passing: runtimeverification/kontrol#1059 (there's a minor expected output diff in some end-to-end tests that don't seem relevant). I updated the bytes lookup lemma according to @lucasmt's suggestion too. @anvacaru I'd merge it tomorrow if it looks good to you too.

Copy link
Copy Markdown
Contributor

@anvacaru anvacaru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@automergerpr-permission-manager automergerpr-permission-manager Bot merged commit 0f07bcd into master Aug 1, 2025
12 checks passed
@automergerpr-permission-manager automergerpr-permission-manager Bot deleted the add-bytes-lookup-lemmas branch August 1, 2025 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upstream symbolic bytes lemmas for CSE

3 participants