Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4ed86ed

Browse files
committed
test/formal: Get rid of wildcard imports
1 parent fc0fe4f commit 4ed86ed

36 files changed

+78
-45
lines changed

test/formal/byte_big.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
from opcodes import BYTE
12
from rule import Rule
2-
from opcodes import *
3+
from z3 import BitVec
34

45
"""
56
byte(A, X) -> 0

test/formal/byte_equivalence.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
from opcodes import BYTE
12
from rule import Rule
2-
from opcodes import *
3+
from z3 import BitVec, BitVecVal, Concat, Extract
34

45
"""
56
Checks that the byte opcode (implemented using shift) is equivalent to a

test/formal/checked_int_add.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
from opcodes import AND, ISZERO, SGT, SLT, SUB
12
from rule import Rule
2-
from opcodes import *
3-
from util import *
3+
from util import BVSignedMax, BVSignedMin, BVSignedUpCast
4+
from z3 import BitVec, BVAddNoOverflow, BVAddNoUnderflow, Not
45

56
"""
67
Overflow checked signed integer addition.

test/formal/checked_int_div.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
from opcodes import AND, EQ, SUB
12
from rule import Rule
2-
from opcodes import *
3-
from util import *
3+
from util import BVSignedMin, BVSignedUpCast
4+
from z3 import BitVec, BVSDivNoOverflow, Not
45

56
"""
67
Overflow checked signed integer division.

test/formal/checked_int_mul_16.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
from opcodes import AND, DIV, GT, SDIV, SGT, SLT
12
from rule import Rule
2-
from opcodes import *
3-
from util import *
3+
from util import BVSignedMax, BVSignedMin, BVSignedUpCast
4+
from z3 import BVMulNoOverflow, BVMulNoUnderflow, BitVec, Not, Or
45

56
"""
67
Overflow checked signed integer multiplication.

test/formal/checked_int_sub.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
from opcodes import AND, ADD, ISZERO, SLT, SGT
12
from rule import Rule
2-
from opcodes import *
3-
from util import *
3+
from util import BVSignedMax, BVSignedMin, BVSignedUpCast
4+
from z3 import BitVec, BVSubNoOverflow, BVSubNoUnderflow, Not
45

56
"""
67
Overflow checked signed integer subtraction.

test/formal/checked_uint_add.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
from opcodes import GT, SUB
12
from rule import Rule
2-
from opcodes import *
3-
from util import *
3+
from util import BVUnsignedMax, BVUnsignedUpCast
4+
from z3 import BitVec, BVAddNoOverflow, Not
45

56
"""
67
Overflow checked unsigned integer addition.

test/formal/checked_uint_mul_16.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
from opcodes import AND, ISZERO, GT, DIV
12
from rule import Rule
2-
from opcodes import *
3-
from util import *
3+
from util import BVUnsignedUpCast, BVUnsignedMax
4+
from z3 import BitVec, Not, BVMulNoOverflow
45

56
"""
67
Overflow checked unsigned integer multiplication.

test/formal/checked_uint_sub.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
from opcodes import LT
12
from rule import Rule
2-
from opcodes import *
3-
from util import *
3+
from util import BVUnsignedMax, BVUnsignedUpCast
4+
from z3 import BVSubNoUnderflow, BitVec, Not
45

56
"""
67
Overflow checked unsigned integer subtraction.

test/formal/combine_byte_shl.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
from opcodes import BYTE, SHL
12
from rule import Rule
2-
from opcodes import *
3+
from z3 import BitVec, ULE
34

45
"""
56
byte(A, shl(B, X))

0 commit comments

Comments
 (0)