aboutsummaryrefslogtreecommitdiffstats
path: root/src/trace/coqInterface.ml
diff options
context:
space:
mode:
authorvblot <24938579+vblot@users.noreply.github.com>2021-07-07 08:55:25 +0200
committerGitHub <noreply@github.com>2021-07-07 08:55:25 +0200
commite2683e1e653a1b6872a886f4b99218e2803f7a74 (patch)
treee5058272d1f912065fd22d41d45d0e93a8c7c5ab /src/trace/coqInterface.ml
parent6a209bbc1bf5c90adb5f576093129fc62ce84780 (diff)
downloadsmtcoq-e2683e1e653a1b6872a886f4b99218e2803f7a74.tar.gz
smtcoq-e2683e1e653a1b6872a886f4b99218e2803f7a74.zip
use native integers (#96)
Diffstat (limited to 'src/trace/coqInterface.ml')
-rw-r--r--src/trace/coqInterface.ml26
1 files changed, 6 insertions, 20 deletions
diff --git a/src/trace/coqInterface.ml b/src/trace/coqInterface.ml
index 36f4337..b462881 100644
--- a/src/trace/coqInterface.ml
+++ b/src/trace/coqInterface.ml
@@ -112,26 +112,12 @@ let init_modules = Coqlib.init_modules
(* Int63 *)
-let int63_modules = [["SMTCoq";"Int63";"Int63Native"]]
-
-(* 31-bits integers are "called" 63 bits (this is sound) *)
-let int31_module = [["Coq";"Numbers";"Cyclic";"Int31";"Int31"]]
-let cD0 = gen_constant int31_module "D0"
-let cD1 = gen_constant int31_module "D1"
-let cI31 = gen_constant int31_module "I31"
-
-let mkInt : int -> constr = fun i ->
- let a = Array.make 31 (Lazy.force cD0) in
- let j = ref i in
- let k = ref 30 in
- while !j <> 0 do
- if !j land 1 = 1 then a.(!k) <- Lazy.force cD1;
- j := !j lsr 1;
- decr k
- done;
- mkApp (Lazy.force cI31, a)
-
-let cint = gen_constant int31_module "int31"
+let int63_module = [["Coq";"Numbers";"Cyclic";"Int63";"Int63"]]
+
+let mkInt : int -> Constr.constr =
+ fun i -> Constr.mkInt (Uint63.of_int i)
+
+let cint = gen_constant int63_module "int"
(* PArray *)