mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
20 lines
266 B
Python
20 lines
266 B
Python
from opcodes import BYTE
|
|
from rule import Rule
|
|
from z3 import BitVec
|
|
|
|
"""
|
|
byte(A, X) -> 0
|
|
given A >= WordSize / 8
|
|
"""
|
|
|
|
rule = Rule()
|
|
|
|
n_bits = 256
|
|
|
|
# Input vars
|
|
X = BitVec('X', n_bits)
|
|
A = BitVec('A', n_bits)
|
|
|
|
rule.require(A >= n_bits / 8)
|
|
rule.check(BYTE(A, X), 0)
|