This module contains the definition of the BitVec
fragment that bv_decide
internally operates
on as BVLogicalExpr
. The preprocessing steps of bv_decide
reduce all supported BitVec
operations to the ones provided in this file. For verification purposes BVLogicalExpr.Sat
and
BVLogicalExpr.Unsat
are provided.
The variable definition used by the bitblaster.
Equations
Equations
- Std.Tactic.BVDecide.instReprBVBit = { reprPrec := Std.Tactic.BVDecide.reprBVBit✝ }
Equations
- Std.Tactic.BVDecide.instInhabitedBVBit = { default := { var := 0, w := 1, idx := 0 } }
All supported binary operations on BVExpr
.
Equations
Equations
- Std.Tactic.BVDecide.BVBinOp.and.toString = "&&"
- Std.Tactic.BVDecide.BVBinOp.or.toString = "||"
- Std.Tactic.BVDecide.BVBinOp.xor.toString = "^"
- Std.Tactic.BVDecide.BVBinOp.add.toString = "+"
- Std.Tactic.BVDecide.BVBinOp.mul.toString = "*"
- Std.Tactic.BVDecide.BVBinOp.udiv.toString = "/ᵤ"
- Std.Tactic.BVDecide.BVBinOp.umod.toString = "%ᵤ"
Equations
The semantics for BVBinOp
.
Equations
- Std.Tactic.BVDecide.BVBinOp.and.eval = fun (x1 x2 : BitVec w) => x1 &&& x2
- Std.Tactic.BVDecide.BVBinOp.or.eval = fun (x1 x2 : BitVec w) => x1 ||| x2
- Std.Tactic.BVDecide.BVBinOp.xor.eval = fun (x1 x2 : BitVec w) => x1 ^^^ x2
- Std.Tactic.BVDecide.BVBinOp.add.eval = fun (x1 x2 : BitVec w) => x1 + x2
- Std.Tactic.BVDecide.BVBinOp.mul.eval = fun (x1 x2 : BitVec w) => x1 * x2
- Std.Tactic.BVDecide.BVBinOp.udiv.eval = fun (x1 x2 : BitVec w) => x1 / x2
- Std.Tactic.BVDecide.BVBinOp.umod.eval = fun (x1 x2 : BitVec w) => x1 % x2
All supported unary operators on BVExpr
.
Equations
Equations
- Std.Tactic.BVDecide.BVUnOp.not.toString = "~"
- (Std.Tactic.BVDecide.BVUnOp.rotateLeft a).toString = toString "rotL " ++ toString a ++ toString ""
- (Std.Tactic.BVDecide.BVUnOp.rotateRight a).toString = toString "rotR " ++ toString a ++ toString ""
- (Std.Tactic.BVDecide.BVUnOp.arithShiftRightConst a).toString = toString ">>a " ++ toString a ++ toString ""
Equations
The semantics for BVUnOp
.
Equations
- Std.Tactic.BVDecide.BVUnOp.not.eval = fun (x : BitVec w) => ~~~x
- (Std.Tactic.BVDecide.BVUnOp.rotateLeft a).eval = fun (x : BitVec w) => x.rotateLeft a
- (Std.Tactic.BVDecide.BVUnOp.rotateRight a).eval = fun (x : BitVec w) => x.rotateRight a
- (Std.Tactic.BVDecide.BVUnOp.arithShiftRightConst a).eval = fun (x : BitVec w) => x.sshiftRight a
Equations
- One or more equations did not get rendered due to their size.
- Std.Tactic.BVDecide.BVExpr.hashCode x✝ (Std.Tactic.BVDecide.BVExpr.var idx) = mixHash 5 (mixHash (hash x✝) (hash idx))
- Std.Tactic.BVDecide.BVExpr.hashCode x✝ (Std.Tactic.BVDecide.BVExpr.const val) = mixHash 7 (mixHash (hash x✝) (hash val))
- Std.Tactic.BVDecide.BVExpr.hashCode x✝ (Std.Tactic.BVDecide.BVExpr.extract start x✝ expr) = mixHash 11 (mixHash (hash start) (mixHash (hash x✝) (Std.Tactic.BVDecide.BVExpr.hashCode w_1 expr)))
- Std.Tactic.BVDecide.BVExpr.hashCode x✝ (Std.Tactic.BVDecide.BVExpr.un op operand) = mixHash 17 (mixHash (hash x✝) (mixHash (hash op) (Std.Tactic.BVDecide.BVExpr.hashCode x✝ operand)))
- Std.Tactic.BVDecide.BVExpr.hashCode x✝ (Std.Tactic.BVDecide.BVExpr.replicate n expr h) = mixHash 23 (mixHash (hash x✝) (mixHash (hash n) (Std.Tactic.BVDecide.BVExpr.hashCode w_1 expr)))
All supported expressions involving BitVec
and operations on them.
- var
{w : Nat}
(idx : Nat)
: BVExpr w
A
BitVec
variable, referred to through an index. - const
{w : Nat}
(val : BitVec w)
: BVExpr w
A constant
BitVec
value. - extract
{w : Nat}
(start len : Nat)
(expr : BVExpr w)
: BVExpr len
Extract a slice from a
BitVec
. - bin
{w : Nat}
(lhs : BVExpr w)
(op : BVBinOp)
(rhs : BVExpr w)
: BVExpr w
A binary operation on two
BVExpr
. - un
{w : Nat}
(op : BVUnOp)
(operand : BVExpr w)
: BVExpr w
A unary operation on two
BVExpr
. - append
{l r w : Nat}
(lhs : BVExpr l)
(rhs : BVExpr r)
(h : w = l + r)
: BVExpr w
Concatenate two bitvectors.
- replicate
{w w' : Nat}
(n : Nat)
(expr : BVExpr w)
(h : w' = w * n)
: BVExpr w'
Concatenate a bitvector with itself
n
times. - shiftLeft
{m n : Nat}
(lhs : BVExpr m)
(rhs : BVExpr n)
: BVExpr m
shift left by another BitVec expression. For constant shifts there exists a
BVUnop
. - shiftRight
{m n : Nat}
(lhs : BVExpr m)
(rhs : BVExpr n)
: BVExpr m
shift right by another BitVec expression. For constant shifts there exists a
BVUnop
. - arithShiftRight
{m n : Nat}
(lhs : BVExpr m)
(rhs : BVExpr n)
: BVExpr m
shift right arithmetically by another BitVec expression. For constant shifts there exists a
BVUnop
.
Equations
- Std.Tactic.BVDecide.BVExpr.instHashable = { hash := fun (expr : Std.Tactic.BVDecide.BVExpr w) => Std.Tactic.BVDecide.BVExpr.hashCode w expr }
Equations
- One or more equations did not get rendered due to their size.
- (Std.Tactic.BVDecide.BVExpr.var ridx).decEq (lhs.bin op rhs) = withPtrEqDecEq (Std.Tactic.BVDecide.BVExpr.var ridx) (lhs.bin op rhs) fun (x : Unit) => isFalse ⋯
- (Std.Tactic.BVDecide.BVExpr.var ridx).decEq (lhs.append rhs h) = withPtrEqDecEq (Std.Tactic.BVDecide.BVExpr.var ridx) (lhs.append rhs h) fun (x : Unit) => isFalse ⋯
- (Std.Tactic.BVDecide.BVExpr.var ridx).decEq (lhs.shiftLeft rhs) = withPtrEqDecEq (Std.Tactic.BVDecide.BVExpr.var ridx) (lhs.shiftLeft rhs) fun (x : Unit) => isFalse ⋯
- (Std.Tactic.BVDecide.BVExpr.var ridx).decEq (lhs.shiftRight rhs) = withPtrEqDecEq (Std.Tactic.BVDecide.BVExpr.var ridx) (lhs.shiftRight rhs) fun (x : Unit) => isFalse ⋯
- (Std.Tactic.BVDecide.BVExpr.var ridx).decEq (lhs.arithShiftRight rhs) = withPtrEqDecEq (Std.Tactic.BVDecide.BVExpr.var ridx) (lhs.arithShiftRight rhs) fun (x : Unit) => isFalse ⋯
- (Std.Tactic.BVDecide.BVExpr.const val).decEq (lhs.bin op rhs) = withPtrEqDecEq (Std.Tactic.BVDecide.BVExpr.const val) (lhs.bin op rhs) fun (x : Unit) => isFalse ⋯
- (Std.Tactic.BVDecide.BVExpr.const val).decEq (lhs.append rhs h) = withPtrEqDecEq (Std.Tactic.BVDecide.BVExpr.const val) (lhs.append rhs h) fun (x : Unit) => isFalse ⋯
- (Std.Tactic.BVDecide.BVExpr.const val).decEq (lhs.shiftLeft rhs) = withPtrEqDecEq (Std.Tactic.BVDecide.BVExpr.const val) (lhs.shiftLeft rhs) fun (x : Unit) => isFalse ⋯
- (Std.Tactic.BVDecide.BVExpr.const val).decEq (lhs.shiftRight rhs) = withPtrEqDecEq (Std.Tactic.BVDecide.BVExpr.const val) (lhs.shiftRight rhs) fun (x : Unit) => isFalse ⋯
- (Std.Tactic.BVDecide.BVExpr.const val).decEq (lhs.arithShiftRight rhs) = withPtrEqDecEq (Std.Tactic.BVDecide.BVExpr.const val) (lhs.arithShiftRight rhs) fun (x : Unit) => isFalse ⋯
- (Std.Tactic.BVDecide.BVExpr.extract start w expr).decEq (lhs.bin op rhs) = withPtrEqDecEq (Std.Tactic.BVDecide.BVExpr.extract start w expr) (lhs.bin op rhs) fun (x : Unit) => isFalse ⋯
- (Std.Tactic.BVDecide.BVExpr.extract start w expr).decEq (lhs.append rhs h) = withPtrEqDecEq (Std.Tactic.BVDecide.BVExpr.extract start w expr) (lhs.append rhs h) fun (x : Unit) => isFalse ⋯
- (Std.Tactic.BVDecide.BVExpr.extract start w expr).decEq (lhs.shiftLeft rhs) = withPtrEqDecEq (Std.Tactic.BVDecide.BVExpr.extract start w expr) (lhs.shiftLeft rhs) fun (x : Unit) => isFalse ⋯
- (Std.Tactic.BVDecide.BVExpr.extract start w expr).decEq (lhs.shiftRight rhs) = withPtrEqDecEq (Std.Tactic.BVDecide.BVExpr.extract start w expr) (lhs.shiftRight rhs) fun (x : Unit) => isFalse ⋯
- (lhs.bin op rhs).decEq (Std.Tactic.BVDecide.BVExpr.const val) = withPtrEqDecEq (lhs.bin op rhs) (Std.Tactic.BVDecide.BVExpr.const val) fun (x : Unit) => isFalse ⋯
- (lhs.bin op rhs).decEq (Std.Tactic.BVDecide.BVExpr.var idx) = withPtrEqDecEq (lhs.bin op rhs) (Std.Tactic.BVDecide.BVExpr.var idx) fun (x : Unit) => isFalse ⋯
- (lhs.bin op rhs).decEq (Std.Tactic.BVDecide.BVExpr.extract start w expr) = withPtrEqDecEq (lhs.bin op rhs) (Std.Tactic.BVDecide.BVExpr.extract start w expr) fun (x : Unit) => isFalse ⋯
- (lhs.bin op rhs).decEq (Std.Tactic.BVDecide.BVExpr.un op_1 operand) = withPtrEqDecEq (lhs.bin op rhs) (Std.Tactic.BVDecide.BVExpr.un op_1 operand) fun (x : Unit) => isFalse ⋯
- (lhs.bin op rhs).decEq (lhs_1.append rhs_1 h) = withPtrEqDecEq (lhs.bin op rhs) (lhs_1.append rhs_1 h) fun (x : Unit) => isFalse ⋯
- (lhs.bin op rhs).decEq (Std.Tactic.BVDecide.BVExpr.replicate n expr h) = withPtrEqDecEq (lhs.bin op rhs) (Std.Tactic.BVDecide.BVExpr.replicate n expr h) fun (x : Unit) => isFalse ⋯
- (lhs.bin op rhs).decEq (lhs_1.shiftLeft rhs_1) = withPtrEqDecEq (lhs.bin op rhs) (lhs_1.shiftLeft rhs_1) fun (x : Unit) => isFalse ⋯
- (lhs.bin op rhs).decEq (lhs_1.shiftRight rhs_1) = withPtrEqDecEq (lhs.bin op rhs) (lhs_1.shiftRight rhs_1) fun (x : Unit) => isFalse ⋯
- (lhs.bin op rhs).decEq (lhs_1.arithShiftRight rhs_1) = withPtrEqDecEq (lhs.bin op rhs) (lhs_1.arithShiftRight rhs_1) fun (x : Unit) => isFalse ⋯
- (Std.Tactic.BVDecide.BVExpr.un op operand).decEq (lhs.bin op_1 rhs) = withPtrEqDecEq (Std.Tactic.BVDecide.BVExpr.un op operand) (lhs.bin op_1 rhs) fun (x : Unit) => isFalse ⋯
- (Std.Tactic.BVDecide.BVExpr.un op operand).decEq (lhs.append rhs h) = withPtrEqDecEq (Std.Tactic.BVDecide.BVExpr.un op operand) (lhs.append rhs h) fun (x : Unit) => isFalse ⋯
- (Std.Tactic.BVDecide.BVExpr.un op operand).decEq (lhs.shiftLeft rhs) = withPtrEqDecEq (Std.Tactic.BVDecide.BVExpr.un op operand) (lhs.shiftLeft rhs) fun (x : Unit) => isFalse ⋯
- (Std.Tactic.BVDecide.BVExpr.un op operand).decEq (lhs.shiftRight rhs) = withPtrEqDecEq (Std.Tactic.BVDecide.BVExpr.un op operand) (lhs.shiftRight rhs) fun (x : Unit) => isFalse ⋯
- (Std.Tactic.BVDecide.BVExpr.un op operand).decEq (lhs.arithShiftRight rhs) = withPtrEqDecEq (Std.Tactic.BVDecide.BVExpr.un op operand) (lhs.arithShiftRight rhs) fun (x : Unit) => isFalse ⋯
- (lhs.append rhs h).decEq (Std.Tactic.BVDecide.BVExpr.const val) = withPtrEqDecEq (lhs.append rhs h) (Std.Tactic.BVDecide.BVExpr.const val) fun (x : Unit) => isFalse ⋯
- (lhs.append rhs h).decEq (Std.Tactic.BVDecide.BVExpr.var idx) = withPtrEqDecEq (lhs.append rhs h) (Std.Tactic.BVDecide.BVExpr.var idx) fun (x : Unit) => isFalse ⋯
- (lhs.append rhs h).decEq (Std.Tactic.BVDecide.BVExpr.extract start w expr) = withPtrEqDecEq (lhs.append rhs h) (Std.Tactic.BVDecide.BVExpr.extract start w expr) fun (x : Unit) => isFalse ⋯
- (lhs.append rhs h).decEq (lhs_1.bin op rhs_1) = withPtrEqDecEq (lhs.append rhs h) (lhs_1.bin op rhs_1) fun (x : Unit) => isFalse ⋯
- (lhs.append rhs h).decEq (Std.Tactic.BVDecide.BVExpr.un op operand) = withPtrEqDecEq (lhs.append rhs h) (Std.Tactic.BVDecide.BVExpr.un op operand) fun (x : Unit) => isFalse ⋯
- (lhs.append rhs h).decEq (Std.Tactic.BVDecide.BVExpr.replicate n expr h_1) = withPtrEqDecEq (lhs.append rhs h) (Std.Tactic.BVDecide.BVExpr.replicate n expr h_1) fun (x : Unit) => isFalse ⋯
- (lhs.append rhs h).decEq (lhs_1.shiftLeft rhs_1) = withPtrEqDecEq (lhs.append rhs h) (lhs_1.shiftLeft rhs_1) fun (x : Unit) => isFalse ⋯
- (lhs.append rhs h).decEq (lhs_1.shiftRight rhs_1) = withPtrEqDecEq (lhs.append rhs h) (lhs_1.shiftRight rhs_1) fun (x : Unit) => isFalse ⋯
- (lhs.append rhs h).decEq (lhs_1.arithShiftRight rhs_1) = withPtrEqDecEq (lhs.append rhs h) (lhs_1.arithShiftRight rhs_1) fun (x : Unit) => isFalse ⋯
- (Std.Tactic.BVDecide.BVExpr.replicate n expr h).decEq (lhs.bin op rhs) = withPtrEqDecEq (Std.Tactic.BVDecide.BVExpr.replicate n expr h) (lhs.bin op rhs) fun (x : Unit) => isFalse ⋯
- (Std.Tactic.BVDecide.BVExpr.replicate n expr h).decEq (lhs.append rhs h_1) = withPtrEqDecEq (Std.Tactic.BVDecide.BVExpr.replicate n expr h) (lhs.append rhs h_1) fun (x : Unit) => isFalse ⋯
- (Std.Tactic.BVDecide.BVExpr.replicate n expr h).decEq (lhs.shiftLeft rhs) = withPtrEqDecEq (Std.Tactic.BVDecide.BVExpr.replicate n expr h) (lhs.shiftLeft rhs) fun (x : Unit) => isFalse ⋯
- (Std.Tactic.BVDecide.BVExpr.replicate n expr h).decEq (lhs.shiftRight rhs) = withPtrEqDecEq (Std.Tactic.BVDecide.BVExpr.replicate n expr h) (lhs.shiftRight rhs) fun (x : Unit) => isFalse ⋯
- (lhs.shiftLeft rhs).decEq (Std.Tactic.BVDecide.BVExpr.const val) = withPtrEqDecEq (lhs.shiftLeft rhs) (Std.Tactic.BVDecide.BVExpr.const val) fun (x : Unit) => isFalse ⋯
- (lhs.shiftLeft rhs).decEq (Std.Tactic.BVDecide.BVExpr.var idx) = withPtrEqDecEq (lhs.shiftLeft rhs) (Std.Tactic.BVDecide.BVExpr.var idx) fun (x : Unit) => isFalse ⋯
- (lhs.shiftLeft rhs).decEq (Std.Tactic.BVDecide.BVExpr.extract start w expr) = withPtrEqDecEq (lhs.shiftLeft rhs) (Std.Tactic.BVDecide.BVExpr.extract start w expr) fun (x : Unit) => isFalse ⋯
- (lhs.shiftLeft rhs).decEq (lhs_1.bin op rhs_1) = withPtrEqDecEq (lhs.shiftLeft rhs) (lhs_1.bin op rhs_1) fun (x : Unit) => isFalse ⋯
- (lhs.shiftLeft rhs).decEq (Std.Tactic.BVDecide.BVExpr.un op operand) = withPtrEqDecEq (lhs.shiftLeft rhs) (Std.Tactic.BVDecide.BVExpr.un op operand) fun (x : Unit) => isFalse ⋯
- (lhs.shiftLeft rhs).decEq (lhs_1.append rhs_1 h) = withPtrEqDecEq (lhs.shiftLeft rhs) (lhs_1.append rhs_1 h) fun (x : Unit) => isFalse ⋯
- (lhs.shiftLeft rhs).decEq (Std.Tactic.BVDecide.BVExpr.replicate n_1 expr h) = withPtrEqDecEq (lhs.shiftLeft rhs) (Std.Tactic.BVDecide.BVExpr.replicate n_1 expr h) fun (x : Unit) => isFalse ⋯
- (lhs.shiftLeft rhs).decEq (lhs_1.shiftRight rhs_1) = withPtrEqDecEq (lhs.shiftLeft rhs) (lhs_1.shiftRight rhs_1) fun (x : Unit) => isFalse ⋯
- (lhs.shiftLeft rhs).decEq (lhs_1.arithShiftRight rhs_1) = withPtrEqDecEq (lhs.shiftLeft rhs) (lhs_1.arithShiftRight rhs_1) fun (x : Unit) => isFalse ⋯
- (lhs.shiftRight rhs).decEq (Std.Tactic.BVDecide.BVExpr.const val) = withPtrEqDecEq (lhs.shiftRight rhs) (Std.Tactic.BVDecide.BVExpr.const val) fun (x : Unit) => isFalse ⋯
- (lhs.shiftRight rhs).decEq (Std.Tactic.BVDecide.BVExpr.var idx) = withPtrEqDecEq (lhs.shiftRight rhs) (Std.Tactic.BVDecide.BVExpr.var idx) fun (x : Unit) => isFalse ⋯
- (lhs.shiftRight rhs).decEq (Std.Tactic.BVDecide.BVExpr.extract start w expr) = withPtrEqDecEq (lhs.shiftRight rhs) (Std.Tactic.BVDecide.BVExpr.extract start w expr) fun (x : Unit) => isFalse ⋯
- (lhs.shiftRight rhs).decEq (lhs_1.bin op rhs_1) = withPtrEqDecEq (lhs.shiftRight rhs) (lhs_1.bin op rhs_1) fun (x : Unit) => isFalse ⋯
- (lhs.shiftRight rhs).decEq (Std.Tactic.BVDecide.BVExpr.un op operand) = withPtrEqDecEq (lhs.shiftRight rhs) (Std.Tactic.BVDecide.BVExpr.un op operand) fun (x : Unit) => isFalse ⋯
- (lhs.shiftRight rhs).decEq (lhs_1.append rhs_1 h) = withPtrEqDecEq (lhs.shiftRight rhs) (lhs_1.append rhs_1 h) fun (x : Unit) => isFalse ⋯
- (lhs.shiftRight rhs).decEq (Std.Tactic.BVDecide.BVExpr.replicate n_1 expr h) = withPtrEqDecEq (lhs.shiftRight rhs) (Std.Tactic.BVDecide.BVExpr.replicate n_1 expr h) fun (x : Unit) => isFalse ⋯
- (lhs.shiftRight rhs).decEq (lhs_1.shiftLeft rhs_1) = withPtrEqDecEq (lhs.shiftRight rhs) (lhs_1.shiftLeft rhs_1) fun (x : Unit) => isFalse ⋯
- (lhs.shiftRight rhs).decEq (lhs_1.arithShiftRight rhs_1) = withPtrEqDecEq (lhs.shiftRight rhs) (lhs_1.arithShiftRight rhs_1) fun (x : Unit) => isFalse ⋯
- (lhs.arithShiftRight rhs).decEq (Std.Tactic.BVDecide.BVExpr.const val) = withPtrEqDecEq (lhs.arithShiftRight rhs) (Std.Tactic.BVDecide.BVExpr.const val) fun (x : Unit) => isFalse ⋯
- (lhs.arithShiftRight rhs).decEq (Std.Tactic.BVDecide.BVExpr.var idx) = withPtrEqDecEq (lhs.arithShiftRight rhs) (Std.Tactic.BVDecide.BVExpr.var idx) fun (x : Unit) => isFalse ⋯
- (lhs.arithShiftRight rhs).decEq (lhs_1.bin op rhs_1) = withPtrEqDecEq (lhs.arithShiftRight rhs) (lhs_1.bin op rhs_1) fun (x : Unit) => isFalse ⋯
- (lhs.arithShiftRight rhs).decEq (Std.Tactic.BVDecide.BVExpr.un op operand) = withPtrEqDecEq (lhs.arithShiftRight rhs) (Std.Tactic.BVDecide.BVExpr.un op operand) fun (x : Unit) => isFalse ⋯
- (lhs.arithShiftRight rhs).decEq (lhs_1.append rhs_1 h) = withPtrEqDecEq (lhs.arithShiftRight rhs) (lhs_1.append rhs_1 h) fun (x : Unit) => isFalse ⋯
- (lhs.arithShiftRight rhs).decEq (lhs_1.shiftRight rhs_1) = withPtrEqDecEq (lhs.arithShiftRight rhs) (lhs_1.shiftRight rhs_1) fun (x : Unit) => isFalse ⋯
- (lhs.arithShiftRight rhs).decEq (lhs_1.shiftLeft rhs_1) = withPtrEqDecEq (lhs.arithShiftRight rhs) (lhs_1.shiftLeft rhs_1) fun (x : Unit) => isFalse ⋯
Equations
- (Std.Tactic.BVDecide.BVExpr.var idx).toString = toString "var" ++ toString idx ++ toString ""
- (Std.Tactic.BVDecide.BVExpr.const val).toString = toString val
- (Std.Tactic.BVDecide.BVExpr.extract start w expr).toString = toString "" ++ toString expr.toString ++ toString "[" ++ toString start ++ toString ", " ++ toString w ++ toString "]"
- (lhs.bin op rhs).toString = toString "(" ++ toString lhs.toString ++ toString " " ++ toString op.toString ++ toString " " ++ toString rhs.toString ++ toString ")"
- (Std.Tactic.BVDecide.BVExpr.un op operand).toString = toString "(" ++ toString op.toString ++ toString " " ++ toString operand.toString ++ toString ")"
- (lhs.append rhs h).toString = toString "(" ++ toString lhs.toString ++ toString " ++ " ++ toString rhs.toString ++ toString ")"
- (Std.Tactic.BVDecide.BVExpr.replicate n expr h).toString = toString "(replicate " ++ toString n ++ toString " " ++ toString expr.toString ++ toString ")"
- (lhs.shiftLeft rhs).toString = toString "(" ++ toString lhs.toString ++ toString " << " ++ toString rhs.toString ++ toString ")"
- (lhs.shiftRight rhs).toString = toString "(" ++ toString lhs.toString ++ toString " >> " ++ toString rhs.toString ++ toString ")"
- (lhs.arithShiftRight rhs).toString = toString "(" ++ toString lhs.toString ++ toString " >>a " ++ toString rhs.toString ++ toString ")"
Equations
The notion of variable assignments for BVExpr
.
Get the value of a BVExpr.var
from an Assignment
.
Equations
- assign.get idx = Lean.RArray.get assign idx
The semantics for BVExpr
.
Equations
- Std.Tactic.BVDecide.BVExpr.eval assign (Std.Tactic.BVDecide.BVExpr.var idx) = if h : (assign.get idx).w = w then h ▸ (assign.get idx).bv else BitVec.truncate w (assign.get idx).bv
- Std.Tactic.BVDecide.BVExpr.eval assign (Std.Tactic.BVDecide.BVExpr.const val) = val
- Std.Tactic.BVDecide.BVExpr.eval assign (Std.Tactic.BVDecide.BVExpr.extract start w expr) = BitVec.extractLsb' start w (Std.Tactic.BVDecide.BVExpr.eval assign expr)
- Std.Tactic.BVDecide.BVExpr.eval assign (lhs.bin op rhs) = op.eval (Std.Tactic.BVDecide.BVExpr.eval assign lhs) (Std.Tactic.BVDecide.BVExpr.eval assign rhs)
- Std.Tactic.BVDecide.BVExpr.eval assign (Std.Tactic.BVDecide.BVExpr.un op operand) = op.eval (Std.Tactic.BVDecide.BVExpr.eval assign operand)
- Std.Tactic.BVDecide.BVExpr.eval assign (lhs.append rhs h) = ⋯ ▸ (Std.Tactic.BVDecide.BVExpr.eval assign lhs ++ Std.Tactic.BVDecide.BVExpr.eval assign rhs)
- Std.Tactic.BVDecide.BVExpr.eval assign (Std.Tactic.BVDecide.BVExpr.replicate n expr h) = ⋯ ▸ BitVec.replicate n (Std.Tactic.BVDecide.BVExpr.eval assign expr)
- Std.Tactic.BVDecide.BVExpr.eval assign (lhs.shiftLeft rhs) = Std.Tactic.BVDecide.BVExpr.eval assign lhs <<< Std.Tactic.BVDecide.BVExpr.eval assign rhs
- Std.Tactic.BVDecide.BVExpr.eval assign (lhs.shiftRight rhs) = Std.Tactic.BVDecide.BVExpr.eval assign lhs >>> Std.Tactic.BVDecide.BVExpr.eval assign rhs
- Std.Tactic.BVDecide.BVExpr.eval assign (lhs.arithShiftRight rhs) = (Std.Tactic.BVDecide.BVExpr.eval assign lhs).sshiftRight' (Std.Tactic.BVDecide.BVExpr.eval assign rhs)
Supported binary predicates on BVExpr
.
Equations
The semantics for BVBinPred
.
Equations
- Std.Tactic.BVDecide.BVBinPred.eq.eval = fun (x1 x2 : BitVec w) => x1 == x2
- Std.Tactic.BVDecide.BVBinPred.ult.eval = BitVec.ult
Supported predicates on BVExpr
.
Equations
The semantics for BVPred
.
Equations
- Std.Tactic.BVDecide.BVPred.eval assign (Std.Tactic.BVDecide.BVPred.bin lhs op rhs) = op.eval (Std.Tactic.BVDecide.BVExpr.eval assign lhs) (Std.Tactic.BVDecide.BVExpr.eval assign rhs)
- Std.Tactic.BVDecide.BVPred.eval assign (Std.Tactic.BVDecide.BVPred.getLsbD expr idx) = (Std.Tactic.BVDecide.BVExpr.eval assign expr).getLsbD idx
Boolean substructure of problems involving predicates on BitVec as atoms.
The semantics of boolean problems involving BitVec predicates as atoms.
Equations
- Std.Tactic.BVDecide.BVLogicalExpr.eval assign expr = Std.Tactic.BVDecide.BoolExpr.eval (fun (x : Std.Tactic.BVDecide.BVPred) => Std.Tactic.BVDecide.BVPred.eval assign x) expr
Equations
- x.Sat assign = (Std.Tactic.BVDecide.BVLogicalExpr.eval assign x = true)