Add int simplification rules for bytes operations#156
Merged
Conversation
PUSH
tothtamas28
reviewed
Jul 10, 2025
…test specification with a new condition for register 2.
…ate ZKEVM-PUSH test specification to include length condition for OP1.
- Rename bytes2int-and-255 to bytes2int-and-255-noop for clarity - Rename bytes2int-or-under-255 to bytes2int-zero-prefix-or-to-concat for better description - Rename int-eq-bytes2int to int-eq-bytes-concat-split to clarify decomposition logic These descriptive names make the purpose of each rule clearer and improve code readability.
- Rename zkevm-push.k to bytes-int-simplification.k - Update module name from ZKEVM-PUSH to BYTES-INT-SIMPLIFICATION - Test file now accurately describes its function of testing byte-integer simplification rules
tothtamas28
approved these changes
Jul 10, 2025
| andBool | ||
| (X >>Int (lengthBytes(B0) *Int 8)) ==Int Bytes2Int(B1, LE, Unsigned) | ||
| [simplification, concrete(B0), preserves-definedness] | ||
| // without preserves-definedness, the rule is not applicable to B1 == substrBytes(B2, I, J) |
Contributor
There was a problem hiding this comment.
This is probably because shifting by a negative amount is undefined.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Simp rule 4 zkevm project's
PUSH