STP文件分析
(2010-09-04 14:43:39)
标签:
stpbitblazeit |
分类: BitBlaze |
word-level 函数:
Concatenation @
t1@t2@...@tm
Extraction [i:j]
x[31:26]
left shift <<
0bin0011
<< 3 = 0bin0011000
right shift >>
x[24:17]
>> 5, another example: 0bin1000
>> 3 = 0bin0001
sign extension BVSX(bv,n)
BVSX(0bin100, 5) =
0bin11100
Array READ [index]
x_arr[t1]
Array WRITE WITH
x_arr WITH [index] :=
value
* For extraction terms, say
t[i:j], n > i >= j >=
0, where n is the length of t.
* For Left shift terms, t
<< k is equal to k 0's appended to t.
The length of t << k is n+k.
* for Right shift terms, say
t >> k, the term is equal to the
bitvector obtained by k 0's followed by t[n-1:k]. The length of t
>> k is n.
bitwise函数:
Bitwise AND
&
t1
& t2 & ... &
tm
Bitwise OR |
t1 | t2 | t3 | ... | tm
Bitwise NOT
~
~t1
Bitwise XOR
BVXOR
BVXOR(t1,t2)
Bitwise NAND
BVNAND
BVNAND(t1,t2)
Bitwise NOR
BVNOR
BVNOR(t1,t2)
Bitwise XNOR
BVXNOR
BVXNOR(t1,t2)
It is required that all the arguments of bitwise functions have the same length
运算函数
Add
BVPLUS :
BVPLUS(n,t1,t2,...,tm)
Mult
BVMULT : BVMULT(n,t1,t2)
Subtract
BVSUB : BVSUB(n,t1,t2)
Unary Minus
BVUMINUS : BVUMINUS(t1)
Div
BVDIV : BVDIV(n,t1,t2), where
t1 is the dividend and t2 is the divisor
Signed Div
SBVDIV : SBVDIV(n,t1,t2), where
t1 is the dividend and t2 is the divisor
Modulo
BVMOD : BVMOD(n,t1,t2), where
t1 is the dividend and t2 is the divisor
Signed Modulo
SBVMOD : SBVMOD(n,t1,t2), where
t1 is the dividend and t2 is the divisor
* the number of output bits
has to specified (except unary minus).
* Inputs t1,t2 ...,tm must be
of the same length
* BVUMINUS(t) is a short-hand
for BVPLUS(n,~t,0bin1), where n is the length of t.
* Bitvector subtraction
(BVSUB(n,t1,t2)) is a short-hand for
BVPLUS(n,t1,BVUMINUS(t2))
STP的断言 Predicates
Equality
Concatenation @
Extraction [i:j]
left shift <<
right shift >>
sign extension BVSX(bv,n)
Array READ [index]
Array WRITE WITH
bitwise函数:
Bitwise AND
Bitwise OR |
Bitwise NOT
Bitwise XOR
Bitwise NAND
Bitwise NOR
Bitwise XNOR
It is required that all the arguments of bitwise functions have the same length
运算函数
Add
Mult
Subtract
Unary Minus
Div
Signed Div
Modulo
Signed Modulo
STP的断言 Predicates
Equality