mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
test/formal: Get rid of wildcard imports
This commit is contained in:
parent
fc0fe4f022
commit
4ed86edbc4
@ -1,5 +1,6 @@
|
||||
from opcodes import BYTE
|
||||
from rule import Rule
|
||||
from opcodes import *
|
||||
from z3 import BitVec
|
||||
|
||||
"""
|
||||
byte(A, X) -> 0
|
||||
|
@ -1,5 +1,6 @@
|
||||
from opcodes import BYTE
|
||||
from rule import Rule
|
||||
from opcodes import *
|
||||
from z3 import BitVec, BitVecVal, Concat, Extract
|
||||
|
||||
"""
|
||||
Checks that the byte opcode (implemented using shift) is equivalent to a
|
||||
|
@ -1,6 +1,7 @@
|
||||
from opcodes import AND, ISZERO, SGT, SLT, SUB
|
||||
from rule import Rule
|
||||
from opcodes import *
|
||||
from util import *
|
||||
from util import BVSignedMax, BVSignedMin, BVSignedUpCast
|
||||
from z3 import BitVec, BVAddNoOverflow, BVAddNoUnderflow, Not
|
||||
|
||||
"""
|
||||
Overflow checked signed integer addition.
|
||||
|
@ -1,6 +1,7 @@
|
||||
from opcodes import AND, EQ, SUB
|
||||
from rule import Rule
|
||||
from opcodes import *
|
||||
from util import *
|
||||
from util import BVSignedMin, BVSignedUpCast
|
||||
from z3 import BitVec, BVSDivNoOverflow, Not
|
||||
|
||||
"""
|
||||
Overflow checked signed integer division.
|
||||
|
@ -1,6 +1,7 @@
|
||||
from opcodes import AND, DIV, GT, SDIV, SGT, SLT
|
||||
from rule import Rule
|
||||
from opcodes import *
|
||||
from util import *
|
||||
from util import BVSignedMax, BVSignedMin, BVSignedUpCast
|
||||
from z3 import BVMulNoOverflow, BVMulNoUnderflow, BitVec, Not, Or
|
||||
|
||||
"""
|
||||
Overflow checked signed integer multiplication.
|
||||
|
@ -1,6 +1,7 @@
|
||||
from opcodes import AND, ADD, ISZERO, SLT, SGT
|
||||
from rule import Rule
|
||||
from opcodes import *
|
||||
from util import *
|
||||
from util import BVSignedMax, BVSignedMin, BVSignedUpCast
|
||||
from z3 import BitVec, BVSubNoOverflow, BVSubNoUnderflow, Not
|
||||
|
||||
"""
|
||||
Overflow checked signed integer subtraction.
|
||||
|
@ -1,6 +1,7 @@
|
||||
from opcodes import GT, SUB
|
||||
from rule import Rule
|
||||
from opcodes import *
|
||||
from util import *
|
||||
from util import BVUnsignedMax, BVUnsignedUpCast
|
||||
from z3 import BitVec, BVAddNoOverflow, Not
|
||||
|
||||
"""
|
||||
Overflow checked unsigned integer addition.
|
||||
|
@ -1,6 +1,7 @@
|
||||
from opcodes import AND, ISZERO, GT, DIV
|
||||
from rule import Rule
|
||||
from opcodes import *
|
||||
from util import *
|
||||
from util import BVUnsignedUpCast, BVUnsignedMax
|
||||
from z3 import BitVec, Not, BVMulNoOverflow
|
||||
|
||||
"""
|
||||
Overflow checked unsigned integer multiplication.
|
||||
|
@ -1,6 +1,7 @@
|
||||
from opcodes import LT
|
||||
from rule import Rule
|
||||
from opcodes import *
|
||||
from util import *
|
||||
from util import BVUnsignedMax, BVUnsignedUpCast
|
||||
from z3 import BVSubNoUnderflow, BitVec, Not
|
||||
|
||||
"""
|
||||
Overflow checked unsigned integer subtraction.
|
||||
|
@ -1,5 +1,6 @@
|
||||
from opcodes import BYTE, SHL
|
||||
from rule import Rule
|
||||
from opcodes import *
|
||||
from z3 import BitVec, ULE
|
||||
|
||||
"""
|
||||
byte(A, shl(B, X))
|
||||
|
@ -1,5 +1,6 @@
|
||||
from opcodes import BYTE, DIV, SHR
|
||||
from rule import Rule
|
||||
from opcodes import *
|
||||
from z3 import BitVec, UGE, ULE, ULT
|
||||
|
||||
"""
|
||||
byte(A, shr(B, X))
|
||||
|
@ -1,5 +1,6 @@
|
||||
from opcodes import BYTE, SHR, DIV
|
||||
from rule import Rule
|
||||
from opcodes import *
|
||||
from z3 import BitVec, ULT
|
||||
|
||||
"""
|
||||
byte(A, shr(B, X))
|
||||
|
@ -1,5 +1,6 @@
|
||||
from opcodes import DIV, SHL, SHR
|
||||
from rule import Rule
|
||||
from opcodes import *
|
||||
from z3 import BitVec
|
||||
|
||||
"""
|
||||
Rule:
|
||||
|
@ -1,5 +1,6 @@
|
||||
from opcodes import SHL, MUL
|
||||
from rule import Rule
|
||||
from opcodes import *
|
||||
from z3 import BitVec
|
||||
|
||||
"""
|
||||
Rule:
|
||||
|
@ -1,5 +1,6 @@
|
||||
from opcodes import AND, SHL, SHR
|
||||
from rule import Rule
|
||||
from opcodes import *
|
||||
from z3 import BitVec, BitVecVal, If, Int2BV, IntVal, UGT, ULT
|
||||
|
||||
"""
|
||||
Rule:
|
||||
|
@ -1,5 +1,6 @@
|
||||
from opcodes import AND, SHL, SHR
|
||||
from rule import Rule
|
||||
from opcodes import *
|
||||
from z3 import BitVec, BitVecVal, If, Int2BV, IntVal, UGT, ULT
|
||||
|
||||
"""
|
||||
Rule:
|
||||
|
@ -1,5 +1,6 @@
|
||||
from opcodes import EQ, ISZERO, SUB
|
||||
from rule import Rule
|
||||
from opcodes import *
|
||||
from z3 import BitVec
|
||||
|
||||
"""
|
||||
Rule:
|
||||
|
@ -1,6 +1,7 @@
|
||||
from opcodes import AND, ISZERO, MOD, SUB
|
||||
from rule import Rule
|
||||
from opcodes import *
|
||||
from util import *
|
||||
from util import BVUnsignedMax
|
||||
from z3 import BitVec, BitVecVal, If
|
||||
|
||||
"""
|
||||
Checking conversion of exp(-1, X) to sub(isZero(and(X, 1)), and(X, 1))
|
||||
|
@ -1,6 +1,6 @@
|
||||
from opcodes import SHL
|
||||
from rule import Rule
|
||||
from opcodes import *
|
||||
from util import *
|
||||
from z3 import BitVec, If
|
||||
|
||||
"""
|
||||
Checking conversion of exp(2, X) to shl(X, 1)
|
||||
|
@ -1,5 +1,6 @@
|
||||
from opcodes import AND, SHL
|
||||
from rule import Rule
|
||||
from opcodes import *
|
||||
from z3 import BitVec, BitVecVal, ULT
|
||||
|
||||
"""
|
||||
Rule:
|
||||
|
@ -1,5 +1,6 @@
|
||||
from opcodes import AND, SHR
|
||||
from rule import Rule
|
||||
from opcodes import *
|
||||
from z3 import BitVec, BitVecVal, ULT
|
||||
|
||||
"""
|
||||
Rule:
|
||||
|
@ -1,5 +1,7 @@
|
||||
from opcodes import AND, OR
|
||||
from rule import Rule
|
||||
from opcodes import *
|
||||
from z3 import BitVec
|
||||
|
||||
|
||||
"""
|
||||
Rule:
|
||||
|
@ -1,4 +1,4 @@
|
||||
from z3 import *
|
||||
from z3 import BitVecVal, BV2Int, If, LShR, UDiv, ULT, UGT, URem
|
||||
|
||||
def ADD(x, y):
|
||||
return x + y
|
||||
|
@ -1,5 +1,6 @@
|
||||
from opcodes import AND
|
||||
from rule import Rule
|
||||
from opcodes import *
|
||||
from z3 import BitVec, BitVecVal
|
||||
|
||||
"""
|
||||
Rule:
|
||||
|
@ -1,5 +1,6 @@
|
||||
from opcodes import OR
|
||||
from rule import Rule
|
||||
from opcodes import *
|
||||
from z3 import BitVec, BitVecVal
|
||||
|
||||
"""
|
||||
Rule:
|
||||
|
@ -1,5 +1,6 @@
|
||||
from opcodes import DIV, MUL, SHL, SHR
|
||||
from rule import Rule
|
||||
from opcodes import *
|
||||
from z3 import BitVec
|
||||
|
||||
"""
|
||||
Rule:
|
||||
|
@ -1,6 +1,6 @@
|
||||
import sys
|
||||
|
||||
from z3 import *
|
||||
from z3 import sat, Solver, unknown, unsat
|
||||
|
||||
class Rule:
|
||||
def __init__(self):
|
||||
|
@ -1,5 +1,6 @@
|
||||
from opcodes import SHL
|
||||
from rule import Rule
|
||||
from opcodes import *
|
||||
from z3 import BitVec, BV2Int, Int2BV, IntVal
|
||||
|
||||
"""
|
||||
Shift left workaround that Solidity implements
|
||||
|
@ -1,5 +1,6 @@
|
||||
from opcodes import SIGNEXTEND
|
||||
from rule import Rule
|
||||
from opcodes import *
|
||||
from z3 import BitVec, BitVecVal, If, UGE, ULT
|
||||
|
||||
"""
|
||||
Rule:
|
||||
|
@ -1,5 +1,6 @@
|
||||
from opcodes import SIGNEXTEND, AND
|
||||
from rule import Rule
|
||||
from opcodes import *
|
||||
from z3 import BitVec, BitVecVal, ULT
|
||||
|
||||
"""
|
||||
Rule:
|
||||
|
@ -1,5 +1,6 @@
|
||||
from opcodes import SIGNEXTEND
|
||||
from rule import Rule
|
||||
from opcodes import *
|
||||
from z3 import BitVec, BitVecVal, Extract, SignExt, UGT
|
||||
|
||||
"""
|
||||
Checking the implementation of SIGNEXTEND using Z3's native SignExt and Extract
|
||||
|
@ -1,5 +1,6 @@
|
||||
from opcodes import SHL, SIGNEXTEND
|
||||
from rule import Rule
|
||||
from opcodes import *
|
||||
from z3 import BitVec, LShR, ULE
|
||||
|
||||
"""
|
||||
Rule:
|
||||
|
@ -1,5 +1,6 @@
|
||||
from opcodes import SIGNEXTEND, SAR, SHR
|
||||
from rule import Rule
|
||||
from opcodes import *
|
||||
from z3 import BitVec, BitVecVal, ULE
|
||||
|
||||
"""
|
||||
Rule:
|
||||
|
@ -1,5 +1,6 @@
|
||||
from opcodes import NOT, SUB
|
||||
from rule import Rule
|
||||
from opcodes import *
|
||||
from z3 import BitVec, BitVecVal
|
||||
|
||||
"""
|
||||
Rule:
|
||||
|
@ -1,5 +1,6 @@
|
||||
from opcodes import ADD, SUB
|
||||
from rule import Rule
|
||||
from opcodes import *
|
||||
from z3 import BitVec
|
||||
|
||||
"""
|
||||
Rules:
|
||||
|
@ -1,4 +1,4 @@
|
||||
from z3 import *
|
||||
from z3 import BitVecVal, Concat, If
|
||||
|
||||
def BVUnsignedUpCast(x, n_bits):
|
||||
assert x.size() <= n_bits
|
||||
|
Loading…
Reference in New Issue
Block a user