Commit 0cf707a8 authored by Clément Fumex's avatar Clément Fumex

removing theory/bv and refactorisation of module/bitvec in module/bv

parent 0126a305
......@@ -66,11 +66,11 @@ end
(* bitvector modules, is not in smt-libv2.drv since cvc4 and z3 don't
have the same name for the function to_int *)
theory bitvec.BitVector64
theory bv.BV64
syntax type t "(_ BitVec 64)"
syntax function zero "#x00000000"
syntax function ones "#xFFFFFFFF"
syntax function zero "#x0000000000000000"
syntax function ones "#xFFFFFFFFFFFFFFFF"
syntax function bw_and "(bvand %1 %2)"
syntax function bw_or "(bvor %1 %2)"
syntax function bw_xor "(bvxor %1 %2)"
......@@ -83,27 +83,26 @@ theory bitvec.BitVector64
syntax function udiv "(bvudiv %1 %2)"
syntax function urem "(bvurem %1 %2)"
syntax function lsr "(bvlshr %1 %2)"
syntax function lsl "(bvshl %1 %2)"
syntax function asr "(bvashr %1 %2)"
syntax function lsr_bv "(bvlshr %1 %2)"
syntax function lsl_bv "(bvshl %1 %2)"
syntax function asr_bv "(bvashr %1 %2)"
syntax converter of_int "(_ bv%1 64)"
syntax function to_int "(bv2nat %1)"
remove prop to_int_of_int
remove prop to_int_extensionality
remove prop to_int_bounds
syntax function to_uint "(bv2nat %1)"
remove prop to_uint_of_int
remove prop to_uint_extensionality
remove prop to_uint_bounds
syntax predicate eq "(= %1 %2)"
remove prop Extensionality
remove prop to_int_add
remove prop to_int_sub
remove prop to_int_neg
remove prop to_int_mul
remove prop to_int_udiv
remove prop to_int_urem
remove prop to_int_lsr
remove prop to_int_lsl
remove prop to_uint_add
remove prop to_uint_sub
remove prop to_uint_neg
remove prop to_uint_mul
remove prop to_uint_udiv
remove prop to_uint_urem
remove prop to_uint_lsr
remove prop to_uint_lsl
remove prop nth_ext
remove prop Nth_zero
remove prop Nth_ones
remove prop Nth_bw_or
......@@ -112,6 +111,7 @@ theory bitvec.BitVector64
remove prop Nth_bw_not
remove prop Nth_rotate_left
remove prop Nth_rotate_right
remove prop Nth_bv_is_nth
remove prop Lsr_nth_low
remove prop Lsr_nth_high
remove prop Asr_nth_low
......@@ -123,15 +123,19 @@ theory bitvec.BitVector64
syntax predicate ule "(bvule %1 %2)"
syntax predicate ugt "(bvugt %1 %2)"
syntax predicate uge "(bvuge %1 %2)"
syntax predicate slt "(bvslt %1 %2)"
syntax predicate sle "(bvsle %1 %2)"
syntax predicate sgt "(bvsgt %1 %2)"
syntax predicate sge "(bvsge %1 %2)"
syntax function nth
syntax function nth_bv
"(not (= (bvand (bvlshr %1 %2) (_ bv1 64)) (_ bv0 64)))"
syntax function rotate_left "(bvor (bvshl %1 (bvurem %2 (_ bv64 64))) (bvlshr %1 (bvsub (_ bv64 64) (bvurem %2 (_ bv64 64)))))"
syntax function rotate_right "(bvor (bvlshr %1 (bvurem %2 (_ bv64 64))) (bvshl %1 (bvsub (_ bv64 64) (bvurem %2 (_ bv64 64)))))"
end
theory bitvec.BitVector32
theory bv.BV32
syntax type t "(_ BitVec 32)"
syntax function zero "#x00000000"
......@@ -148,27 +152,26 @@ theory bitvec.BitVector32
syntax function udiv "(bvudiv %1 %2)"
syntax function urem "(bvurem %1 %2)"
syntax function lsr "(bvlshr %1 %2)"
syntax function lsl "(bvshl %1 %2)"
syntax function asr "(bvashr %1 %2)"
syntax function lsr_bv "(bvlshr %1 %2)"
syntax function lsl_bv "(bvshl %1 %2)"
syntax function asr_bv "(bvashr %1 %2)"
syntax converter of_int "(_ bv%1 32)"
syntax function to_int "(bv2nat %1)"
remove prop to_int_of_int
remove prop to_int_extensionality
remove prop to_int_bounds
syntax function to_uint "(bv2nat %1)"
remove prop to_uint_of_int
remove prop to_uint_extensionality
remove prop to_uint_bounds
syntax predicate eq "(= %1 %2)"
remove prop Extensionality
remove prop to_int_add
remove prop to_int_sub
remove prop to_int_neg
remove prop to_int_mul
remove prop to_int_udiv
remove prop to_int_urem
remove prop to_int_lsr
remove prop to_int_lsl
remove prop to_uint_add
remove prop to_uint_sub
remove prop to_uint_neg
remove prop to_uint_mul
remove prop to_uint_udiv
remove prop to_uint_urem
remove prop to_uint_lsr
remove prop to_uint_lsl
remove prop nth_ext
remove prop Nth_zero
remove prop Nth_ones
remove prop Nth_bw_or
......@@ -177,6 +180,7 @@ theory bitvec.BitVector32
remove prop Nth_bw_not
remove prop Nth_rotate_left
remove prop Nth_rotate_right
remove prop Nth_bv_is_nth
remove prop Lsr_nth_low
remove prop Lsr_nth_high
remove prop Asr_nth_low
......@@ -188,15 +192,19 @@ theory bitvec.BitVector32
syntax predicate ule "(bvule %1 %2)"
syntax predicate ugt "(bvugt %1 %2)"
syntax predicate uge "(bvuge %1 %2)"
syntax predicate slt "(bvslt %1 %2)"
syntax predicate sle "(bvsle %1 %2)"
syntax predicate sgt "(bvsgt %1 %2)"
syntax predicate sge "(bvsge %1 %2)"
syntax function nth
syntax function nth_bv
"(not (= (bvand (bvlshr %1 %2) (_ bv1 32)) (_ bv0 32)))"
syntax function rotate_left "(bvor (bvshl %1 (bvurem %2 (_ bv32 32))) (bvlshr %1 (bvsub (_ bv32 32) (bvurem %2 (_ bv32 32)))))"
syntax function rotate_right "(bvor (bvlshr %1 (bvurem %2 (_ bv32 32))) (bvshl %1 (bvsub (_ bv32 32) (bvurem %2 (_ bv32 32)))))"
end
theory bitvec.BitVector16
theory bv.BV16
syntax type t "(_ BitVec 16)"
syntax function zero "#x0000"
......@@ -213,27 +221,26 @@ theory bitvec.BitVector16
syntax function udiv "(bvudiv %1 %2)"
syntax function urem "(bvurem %1 %2)"
syntax function lsr "(bvlshr %1 %2)"
syntax function lsl "(bvshl %1 %2)"
syntax function asr "(bvashr %1 %2)"
syntax function lsr_bv "(bvlshr %1 %2)"
syntax function lsl_bv "(bvshl %1 %2)"
syntax function asr_bv "(bvashr %1 %2)"
syntax converter of_int "(_ bv%1 16)"
syntax function to_int "(bv2nat %1)"
remove prop to_int_of_int
remove prop to_int_extensionality
remove prop to_int_bounds
syntax function to_uint "(bv2nat %1)"
remove prop to_uint_of_int
remove prop to_uint_extensionality
remove prop to_uint_bounds
syntax predicate eq "(= %1 %2)"
remove prop Extensionality
remove prop to_int_add
remove prop to_int_sub
remove prop to_int_neg
remove prop to_int_mul
remove prop to_int_udiv
remove prop to_int_urem
remove prop to_int_lsr
remove prop to_int_lsl
remove prop to_uint_add
remove prop to_uint_sub
remove prop to_uint_neg
remove prop to_uint_mul
remove prop to_uint_udiv
remove prop to_uint_urem
remove prop to_uint_lsr
remove prop to_uint_lsl
remove prop nth_ext
remove prop Nth_zero
remove prop Nth_ones
remove prop Nth_bw_or
......@@ -242,6 +249,7 @@ theory bitvec.BitVector16
remove prop Nth_bw_not
remove prop Nth_rotate_left
remove prop Nth_rotate_right
remove prop Nth_bv_is_nth
remove prop Lsr_nth_low
remove prop Lsr_nth_high
remove prop Asr_nth_low
......@@ -253,15 +261,19 @@ theory bitvec.BitVector16
syntax predicate ule "(bvule %1 %2)"
syntax predicate ugt "(bvugt %1 %2)"
syntax predicate uge "(bvuge %1 %2)"
syntax predicate slt "(bvslt %1 %2)"
syntax predicate sle "(bvsle %1 %2)"
syntax predicate sgt "(bvsgt %1 %2)"
syntax predicate sge "(bvsge %1 %2)"
syntax function nth
syntax function nth_bv
"(not (= (bvand (bvlshr %1 %2) (_ bv1 16)) (_ bv0 16)))"
syntax function rotate_left "(bvor (bvshl %1 (bvurem %2 (_ bv16 16))) (bvlshr %1 (bvsub (_ bv16 16) (bvurem %2 (_ bv16 16)))))"
syntax function rotate_right "(bvor (bvlshr %1 (bvurem %2 (_ bv16 16))) (bvshl %1 (bvsub (_ bv16 16) (bvurem %2 (_ bv16 16)))))"
end
theory bitvec.BitVector8
theory bv.BV8
syntax type t "(_ BitVec 8)"
syntax function zero "#x00"
......@@ -278,27 +290,26 @@ theory bitvec.BitVector8
syntax function udiv "(bvudiv %1 %2)"
syntax function urem "(bvurem %1 %2)"
syntax function lsr "(bvlshr %1 %2)"
syntax function lsl "(bvshl %1 %2)"
syntax function asr "(bvashr %1 %2)"
syntax function lsr_bv "(bvlshr %1 %2)"
syntax function lsl_bv "(bvshl %1 %2)"
syntax function asr_bv "(bvashr %1 %2)"
syntax converter of_int "(_ bv%1 8)"
syntax function to_int "(bv2nat %1)"
remove prop to_int_of_int
remove prop to_int_extensionality
remove prop to_int_bounds
syntax function to_uint "(bv2nat %1)"
remove prop to_uint_of_int
remove prop to_uint_extensionality
remove prop to_uint_bounds
syntax predicate eq "(= %1 %2)"
remove prop Extensionality
remove prop to_int_add
remove prop to_int_sub
remove prop to_int_neg
remove prop to_int_mul
remove prop to_int_udiv
remove prop to_int_urem
remove prop to_int_lsr
remove prop to_int_lsl
remove prop to_uint_add
remove prop to_uint_sub
remove prop to_uint_neg
remove prop to_uint_mul
remove prop to_uint_udiv
remove prop to_uint_urem
remove prop to_uint_lsr
remove prop to_uint_lsl
remove prop nth_ext
remove prop Nth_zero
remove prop Nth_ones
remove prop Nth_bw_or
......@@ -307,6 +318,7 @@ theory bitvec.BitVector8
remove prop Nth_bw_not
remove prop Nth_rotate_left
remove prop Nth_rotate_right
remove prop Nth_bv_is_nth
remove prop Lsr_nth_low
remove prop Lsr_nth_high
remove prop Asr_nth_low
......@@ -318,8 +330,12 @@ theory bitvec.BitVector8
syntax predicate ule "(bvule %1 %2)"
syntax predicate ugt "(bvugt %1 %2)"
syntax predicate uge "(bvuge %1 %2)"
syntax predicate slt "(bvslt %1 %2)"
syntax predicate sle "(bvsle %1 %2)"
syntax predicate sgt "(bvsgt %1 %2)"
syntax predicate sge "(bvsge %1 %2)"
syntax function nth
syntax function nth_bv
"(not (= (bvand (bvlshr %1 %2) (_ bv1 8)) (_ bv0 8)))"
syntax function rotate_left "(bvor (bvshl %1 (bvurem %2 (_ bv8 8))) (bvlshr %1 (bvsub (_ bv8 8) (bvurem %2 (_ bv8 8)))))"
......
......@@ -5,14 +5,14 @@
import "ocaml-gen.drv"
theory bv.BV32
(*theory bv.BV32
syntax type t "Int32.t"
syntax constant zero "0l"
syntax constant ones "-1l"
syntax function bw_and "(Int32.logand %1 %2)"
syntax predicate eq "(%1 = %2)"
(* TODO ... *)
end
end*)
module mach.int.Int32
syntax val of_int "Why3__BigInt.to_int32"
......
......@@ -82,8 +82,8 @@ module mach.int.Int63
syntax val (>=) "(>=)"
syntax val (>) "(>)"
syntax val to_bv "(fun x -> x)"
syntax val of_bv "(fun x -> x)"
(* syntax val to_bv "(fun x -> x)"
syntax val of_bv "(fun x -> x)"*)
end
module mach.int.Int64
......@@ -154,14 +154,14 @@ end
(** Bit vectors *)
theory bv.BV63
(*theory bv.BV63
syntax type t "int"
syntax constant zero "0"
syntax constant ones "-1"
syntax function bw_and "(%1 land %2)"
syntax predicate eq "(%1 = %2)"
(* TODO ... *)
end
end*)
(* TODO
bv.BV31 ?
......@@ -199,4 +199,3 @@ module mach.array.Array63
syntax val blit "Array.blit"
syntax val self_blit "Array.blit"
end
......@@ -2,248 +2,37 @@
prelude ";;; SMT-LIB2 driver: bit-vectors, common part"
theory bitvec.BVConverter_32_64
syntax function toBig "((_ zero_extend 32) %1)"
syntax function toSmall "((_ extract 31 0) %1)"
end
theory bitvec.BVConverter_16_64
syntax function toBig "((_ zero_extend 48) %1)"
syntax function toSmall "((_ extract 15 0) %1)"
end
theory bitvec.BVConverter_8_64
syntax function toBig "((_ zero_extend 56) %1)"
syntax function toSmall "((_ extract 7 0) %1)"
end
theory bitvec.BVConverter_16_32
syntax function toBig "((_ zero_extend 16) %1)"
syntax function toSmall "((_ extract 15 0) %1)"
end
theory bitvec.BVConverter_8_32
syntax function toBig "((_ zero_extend 24) %1)"
syntax function toSmall "((_ extract 7 0) %1)"
end
theory bitvec.BVConverter_8_16
syntax function toBig "((_ zero_extend 8) %1)"
syntax function toSmall "((_ extract 7 0) %1)"
end
theory bv.BV32
syntax type t "(_ BitVec 32)"
syntax function zero "#x00000000"
syntax function ones "#xFFFFFFFF"
syntax function bw_and "(bvand %1 %2)"
syntax function bw_or "(bvor %1 %2)"
syntax function bw_xor "(bvxor %1 %2)"
syntax function bw_not "(bvnot %1)"
syntax function add "(bvadd %1 %2)"
syntax function sub "(bvsub %1 %2)"
syntax function neg "(bvneg %1)"
syntax function mul "(bvmul %1 %2)"
syntax function udiv "(bvudiv %1 %2)"
syntax function urem "(bvurem %1 %2)"
syntax function sdiv "(bvsdiv %1 %2)"
syntax function srem "(bvsrem %1 %2)"
syntax function smod "(bvsmod %1 %2)"
syntax function rotate_left "((_ rotate_left 1) %1)"
syntax function rotate_right "((_ rotate_right 1) %1)"
syntax function lsr "(bvlshr %1 ((_ int2bv 32) %2))"
syntax function lsl "(bvshl %1 ((_ int2bv 32) %2))"
syntax function asr "(bvashr %1 ((_ int2bv 32) %2))"
syntax function lsr_bv "(bvlshr %1 %2)"
syntax function lsl_bv "(bvshl %1 %2)"
syntax function asr_bv "(bvashr %1 %2)"
syntax converter of_int_const "((_ int2bv 32) %1)"
syntax predicate eq "(= %1 %2)"
remove prop Extensionality
syntax predicate slt "(bvslt %1 %2)"
syntax predicate sle "(bvsle %1 %2)"
syntax predicate sgt "(bvsgt %1 %2)"
syntax predicate sge "(bvsge %1 %2)"
syntax predicate ult "(bvult %1 %2)"
syntax predicate ule "(bvule %1 %2)"
syntax predicate ugt "(bvugt %1 %2)"
syntax predicate uge "(bvuge %1 %2)"
end
theory bv.BV64
syntax type t "(_ BitVec 64)"
syntax function zero "#x0000000000000000"
syntax function ones "#xFFFFFFFFFFFFFFFF"
syntax function bw_and "(bvand %1 %2)"
syntax function bw_or "(bvor %1 %2)"
syntax function bw_xor "(bvxor %1 %2)"
syntax function bw_not "(bvnot %1)"
syntax function add "(bvadd %1 %2)"
syntax function sub "(bvsub %1 %2)"
syntax function neg "(bvneg %1)"
syntax function mul "(bvmul %1 %2)"
syntax function udiv "(bvudiv %1 %2)"
syntax function urem "(bvurem %1 %2)"
syntax function sdiv "(bvsdiv %1 %2)"
syntax function srem "(bvsrem %1 %2)"
syntax function smod "(bvsmod %1 %2)"
syntax function rotate_left "((_ rotate_left 1) %1)"
syntax function rotate_right "((_ rotate_right 1) %1)"
syntax function lsr "(bvlshr %1 ((_ int2bv 64) %2))"
syntax function lsl "(bvshl %1 ((_ int2bv 64) %2))"
syntax function asr "(bvashr %1 ((_ int2bv 64) %2))"
syntax function lsr_bv "(bvlshr %1 %2)"
syntax function lsl_bv "(bvshl %1 %2)"
syntax function asr_bv "(bvashr %1 %2)"
syntax converter of_int_const "((_ int2bv 64) %1)"
syntax predicate eq "(= %1 %2)"
syntax predicate slt "(bvslt %1 %2)"
syntax predicate sle "(bvsle %1 %2)"
syntax predicate sgt "(bvsgt %1 %2)"
syntax predicate sge "(bvsge %1 %2)"
syntax predicate ult "(bvult %1 %2)"
syntax predicate ule "(bvule %1 %2)"
syntax predicate ugt "(bvugt %1 %2)"
syntax predicate uge "(bvuge %1 %2)"
end
theory bv.BV16
syntax type t "(_ BitVec 16)"
syntax function zero "#x0000"
syntax function ones "#xFFFF"
syntax function bw_and "(bvand %1 %2)"
syntax function bw_or "(bvor %1 %2)"
syntax function bw_xor "(bvxor %1 %2)"
syntax function bw_not "(bvnot %1)"
syntax function add "(bvadd %1 %2)"
syntax function sub "(bvsub %1 %2)"
syntax function neg "(bvneg %1)"
syntax function mul "(bvmul %1 %2)"
syntax function udiv "(bvudiv %1 %2)"
syntax function urem "(bvurem %1 %2)"
syntax function sdiv "(bvsdiv %1 %2)"
syntax function srem "(bvsrem %1 %2)"
syntax function smod "(bvsmod %1 %2)"
syntax function rotate_left "((_ rotate_left 1) %1)"
syntax function rotate_right "((_ rotate_right 1) %1)"
syntax function lsr "(bvlshr %1 ((_ int2bv 16) %2))"
syntax function lsl "(bvshl %1 ((_ int2bv 16) %2))"
syntax function asr "(bvashr %1 ((_ int2bv 16) %2))"
syntax function lsr_bv "(bvlshr %1 %2)"
syntax function lsl_bv "(bvshl %1 %2)"
syntax function asr_bv "(bvashr %1 %2)"
syntax converter of_int_const "((_ int2bv 16) %1)"
syntax predicate eq "(= %1 %2)"
syntax predicate slt "(bvslt %1 %2)"
syntax predicate sle "(bvsle %1 %2)"
syntax predicate sgt "(bvsgt %1 %2)"
syntax predicate sge "(bvsge %1 %2)"
syntax predicate ult "(bvult %1 %2)"
syntax predicate ule "(bvule %1 %2)"
syntax predicate ugt "(bvugt %1 %2)"
syntax predicate uge "(bvuge %1 %2)"
end
theory bv.BV8
syntax type t "(_ BitVec 8)"
syntax function zero "#x00"
syntax function ones "#xFF"
syntax function bw_and "(bvand %1 %2)"
syntax function bw_or "(bvor %1 %2)"
syntax function bw_xor "(bvxor %1 %2)"
syntax function bw_not "(bvnot %1)"
syntax function add "(bvadd %1 %2)"
syntax function sub "(bvsub %1 %2)"
syntax function neg "(bvneg %1)"
syntax function mul "(bvmul %1 %2)"
syntax function udiv "(bvudiv %1 %2)"
syntax function urem "(bvurem %1 %2)"
syntax function sdiv "(bvsdiv %1 %2)"
syntax function srem "(bvsrem %1 %2)"
syntax function smod "(bvsmod %1 %2)"
syntax function rotate_left "((_ rotate_left 1) %1)"
syntax function rotate_right "((_ rotate_right 1) %1)"
syntax function lsr "(bvlshr %1 ((_ int2bv 8) %2))"
syntax function lsl "(bvshl %1 ((_ int2bv 8) %2))"
syntax function asr "(bvashr %1 ((_ int2bv 8) %2))"
syntax function lsr_bv "(bvlshr %1 %2)"
syntax function lsl_bv "(bvshl %1 %2)"
syntax function asr_bv "(bvashr %1 %2)"
syntax converter of_int_const "((_ int2bv 8) %1)"
syntax predicate eq "(= %1 %2)"
syntax predicate slt "(bvslt %1 %2)"
syntax predicate sle "(bvsle %1 %2)"
syntax predicate sgt "(bvsgt %1 %2)"
syntax predicate sge "(bvsge %1 %2)"
syntax predicate ult "(bvult %1 %2)"
syntax predicate ule "(bvule %1 %2)"
syntax predicate ugt "(bvugt %1 %2)"
syntax predicate uge "(bvuge %1 %2)"
end
theory bv.BVConverter_32_64
syntax function toBig "((_ zero_extend 32) %1)"
syntax function toSmall "((_ extract 31 0) %1)"
remove prop back_from_bigBV
end
theory bv.BVConverter_16_64
syntax function toBig "((_ zero_extend 48) %1)"
syntax function toSmall "((_ extract 15 0) %1)"
remove prop back_from_bigBV
end
theory bv.BVConverter_8_64
syntax function toBig "((_ zero_extend 56) %1)"
syntax function toSmall "((_ extract 7 0) %1)"
remove prop back_from_bigBV
end
theory bv.BVConverter_16_32
syntax function toBig "((_ zero_extend 16) %1)"
syntax function toSmall "((_ extract 15 0) %1)"
remove prop back_from_bigBV
end
theory bv.BVConverter_8_32
syntax function toBig "((_ zero_extend 24) %1)"
syntax function toSmall "((_ extract 7 0) %1)"
remove prop back_from_bigBV
end
theory bv.BVConverter_8_16
syntax function toBig "((_ zero_extend 8) %1)"
syntax function toSmall "((_ extract 7 0) %1)"
remove prop back_from_bigBV
end
theory bitvec.Pow2int
theory bv.Pow2int
remove prop Power_0
remove prop Power_s
......
......@@ -66,12 +66,12 @@ end
(* bitvector modules, is not in smt-libv2.drv since cvc4 and z3 don't
have the same name for the function to_int *)
theory bitvec.BitVector64
have the same name for the function to_uint *)
theory bv.BV64
syntax type t "(_ BitVec 64)"
syntax function zero "#x00000000"
syntax function ones "#xFFFFFFFF"
syntax function zero "#x0000000000000000"
syntax function ones "#xFFFFFFFFFFFFFFFF"
syntax function bw_and "(bvand %1 %2)"
syntax function bw_or "(bvor %1 %2)"
syntax function bw_xor "(bvxor %1 %2)"
......@@ -84,27 +84,28 @@ theory bitvec.BitVector64
syntax function udiv "(bvudiv %1 %2)"
syntax function urem "(bvurem %1 %2)"
syntax function lsr "(bvlshr %1 %2)"
syntax function lsl "(bvshl %1 %2)"
syntax function asr "(bvashr %1 %2)"
syntax function lsr_bv "(bvlshr %1 %2)"
syntax function lsl_bv "(bvshl %1 %2)"
syntax function asr_bv "(bvashr %1 %2)"
syntax converter of_int "((_ int2bv 64) %1)"
syntax function to_int "(bv2int %1)"
remove prop to_int_of_int
remove prop to_int_extensionality
remove prop to_int_bounds
syntax function to_uint "(bv2int %1)"
remove prop to_uint_of_int
remove prop to_uint_extensionality
remove prop to_uint_bounds
syntax function to_int "(ite (not (= (bvand %1 #x80000000) zero))
(bv2int %1) (- (not %1) (- (1))))"
syntax predicate eq "(= %1 %2)"
remove prop Extensionality
remove prop to_int_add
remove prop to_int_sub
remove prop to_int_neg
remove prop to_int_mul
remove prop to_int_udiv
remove prop to_int_urem
remove prop to_int_lsr
remove prop to_int_lsl
remove prop to_uint_add
remove prop to_uint_sub
remove prop to_uint_neg
remove prop to_uint_mul
remove prop to_uint_udiv
remove prop to_uint_urem
remove prop to_uint_lsr
remove prop to_uint_lsl
remove prop nth_ext
remove prop Nth_zero
remove prop Nth_ones
remove prop Nth_bw_or
......@@ -113,6 +114,7 @@ theory bitvec.BitVector64
remove prop Nth_bw_not
remove prop Nth_rotate_left
remove prop Nth_rotate_right
remove prop Nth_bv_is_nth
remove prop Lsr_nth_low
remove prop Lsr_nth_high
remove prop Asr_nth_low
......@@ -124,15 +126,19 @@ theory bitvec.BitVector64
syntax predicate ule "(bvule %1 %2)"
syntax predicate ugt "(bvugt %1 %2)"
syntax predicate uge "(bvuge %1 %2)"
syntax predicate slt "(bvslt %1 %2)"
syntax predicate sle "(bvsle %1 %2)"
syntax predicate sgt "(bvsgt %1 %2)"
syntax predicate sge "(bvsge %1 %2)"
syntax function nth
syntax function nth_bv
"(not (= (bvand (bvlshr %1 %2) (_ bv1 64)) (_ bv0 64)))"
syntax function rotate_left "(bvor (bvshl %1 (bvurem %2 (_ bv64 64))) (bvlshr %1 (bvsub (_ bv64 64) (bvurem %2 (_ bv64 64)))))"
syntax function rotate_right "(bvor (bvlshr %1 (bvurem %2 (_ bv64 64))) (bvshl %1 (bvsub (_ bv64 64) (bvurem %2 (_ bv64 64)))))"
end
theory bitvec.BitVector32
theory bv.BV32
syntax type t "(_ BitVec 32)"
syntax function zero "#x00000000"
......@@ -149,27 +155,26 @@ theory bitvec.BitVector32
syntax function udiv "(bvudiv %1 %2)"
syntax function urem "(bvurem %1 %2)"
syntax function lsr "(bvlshr %1 %2)"
syntax function lsl "(bvshl %1 %2)"
syntax function asr "(bvashr %1 %2)"
syntax function lsr_bv "(bvlshr %1 %2)"
syntax function lsl_bv "(bvshl %1 %2)"
syntax function asr_bv "(bvashr %1 %2)"
syntax converter of_int "((_ int2bv 32) %1)"
syntax function to_int "(bv2int %1)"
remove prop to_int_of_int
remove prop to_int_extensionality
remove prop to_int_bounds
syntax function to_uint "(bv2int %1)"
remove prop to_uint_of_int
remove prop to_uint_extensionality
remove prop to_uint_bounds
syntax predicate eq "(= %1 %2)"
remove prop Extensionality
remove prop to_int_add
remove prop to_int_sub
remove prop to_int_neg
remove prop to_int_mul
remove prop to_int_udiv
remove prop to_int_urem
remove prop to_int_lsr
remove prop to_int_lsl
remove prop to_uint_add
remove prop to_uint_sub
remove prop to_uint_neg
remove prop to_uint_mul
remove prop to_uint_udiv
remove prop to_uint_urem
remove prop to_uint_lsr
remove prop to_uint_lsl
remove prop nth_ext
remove prop Nth_zero
remove prop Nth_ones
remove prop Nth_bw_or
......@@ -178,6 +183,7 @@ theory bitvec.BitVector32
remove prop Nth_bw_not
remove prop Nth_rotate_left
remove prop Nth_rotate_right
remove prop Nth_bv_is_nth
remove prop Lsr_nth_low
remove prop Lsr_nth_high
remove prop Asr_nth_low
......@@ -189,15 +195,19 @@ theory bitvec.BitVector32
syntax predicate ule "(bvule %1 %2)"
syntax predicate ugt "(bvugt %1 %2)"
syntax predicate uge "(bvuge %1 %2)"
syntax predicate slt "(bvslt %1 %2)"
syntax predicate sle "(bvsle %1 %2)"
syntax predicate sgt "(bvsgt %1 %2)"
syntax predicate sge "(bvsge %1 %2)"
syntax function nth
syntax function nth_bv
"(not (= (bvand (bvlshr %1 %2) (_ bv1 32)) (_ bv0 32)))"
syntax function rotate_left "(bvor (bvshl %1 (bvurem %2 (_ bv32 32))) (bvlshr %1 (bvsub (_ bv32 32) (bvurem %2 (_ bv32 32)))))"
syntax function rotate_right "(bvor (bvlshr %1 (bvurem %2 (_ bv32 32))) (bvshl %1 (bvsub (_ bv32 32) (bvurem %2 (_ bv32 32)))))"
end
theory bitvec.BitVector16
theory bv.BV16
syntax type t "(_ BitVec 16)"
syntax function zero "#x0000"
......@@ -214,27 +224,26 @@ theory bitvec.BitVector16
syntax function udiv "(bvudiv %1 %2)"
syntax function urem "(bvurem %1 %2)"
syntax function lsr "(bvlshr %1 %2)"
syntax function lsl "(bvshl %1 %2)"
syntax function asr "(bvashr %1 %2)"
syntax function lsr_bv "(bvlshr %1 %2)"
syntax function lsl_bv "(bvshl %1 %2)"
syntax function asr_bv "(bvashr %1 %2)"
syntax converter of_int "((_ int2bv 16) %1)"
syntax function to_int "(bv2int %1)"
remove prop to_int_of_int
remove prop to_int_extensionality
remove prop to_int_bounds
syntax function to_uint "(bv2int %1)"
remove prop to_uint_of_int
remove prop to_uint_extensionality
remove prop to_uint_bounds
syntax predicate eq "(= %1 %2)"
remove prop Extensionality
remove prop to_int_add
remove prop to_int_sub
remove prop to_int_neg
remove prop to_int_mul
remove prop to_int_udiv
remove prop to_int_urem
remove prop to_int_lsr
remove prop to_int_lsl
remove prop to_uint_add