aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChantal Keller <Chantal.Keller@lri.fr>2021-12-07 19:01:16 +0100
committerChantal Keller <Chantal.Keller@lri.fr>2021-12-07 19:01:16 +0100
commit96cd98b3e04aba915cb36cba39e15a39422ab628 (patch)
tree099efa22abad84f3fa6028dfe7310cd96efd73d0
parent349815b8f98c548d9054efad176e3894a37a3957 (diff)
parent01900662373ca1b72d9c78171bcc21133cec3bf4 (diff)
downloadsmtcoq-96cd98b3e04aba915cb36cba39e15a39422ab628.tar.gz
smtcoq-96cd98b3e04aba915cb36cba39e15a39422ab628.zip
Merge remote-tracking branch 'origin/coq-8.10' into coq-8.11
-rw-r--r--src/trace/smtBtype.ml5
-rw-r--r--src/trace/smtMisc.ml2
-rw-r--r--src/trace/smtMisc.mli2
-rw-r--r--unit-tests/Tests_verit_tactics.v23
4 files changed, 27 insertions, 5 deletions
diff --git a/src/trace/smtBtype.ml b/src/trace/smtBtype.ml
index d091758..c610129 100644
--- a/src/trace/smtBtype.ml
+++ b/src/trace/smtBtype.ml
@@ -304,10 +304,9 @@ let of_coq_compdec reify t compdec =
(match i.hval with
| CompDec _ -> ty
| Delayed _ ->
- Hashtbl.remove reify.tbl t;
let ce = mklApp cTyp_compdec [|t; compdec|] in
- let res = Tindex {index = i.index; hval = CompDec ce} in
- Hashtbl.add reify.tbl t res;
+ i.hval <- CompDec ce;
+ let res = Tindex i in
res
)
| _ -> ty
diff --git a/src/trace/smtMisc.ml b/src/trace/smtMisc.ml
index 165814b..11eee8a 100644
--- a/src/trace/smtMisc.ml
+++ b/src/trace/smtMisc.ml
@@ -21,7 +21,7 @@ let mkInt i =
ci
(** Generic representation of shared object *)
-type 'a gen_hashed = { index : int; hval : 'a }
+type 'a gen_hashed = { index : int; mutable hval : 'a }
(** Functions over constr *)
diff --git a/src/trace/smtMisc.mli b/src/trace/smtMisc.mli
index 5359c15..632ac79 100644
--- a/src/trace/smtMisc.mli
+++ b/src/trace/smtMisc.mli
@@ -12,7 +12,7 @@
val cInt_tbl : (int, CoqInterface.constr) Hashtbl.t
val mkInt : int -> CoqInterface.constr
-type 'a gen_hashed = { index : int; hval : 'a; }
+type 'a gen_hashed = { index : int; mutable hval : 'a; }
val mklApp : CoqInterface.constr Lazy.t -> CoqInterface.constr array -> CoqInterface.constr
val string_of_name_def : string -> CoqInterface.name -> string
val string_coq_constr : CoqInterface.constr -> string
diff --git a/unit-tests/Tests_verit_tactics.v b/unit-tests/Tests_verit_tactics.v
index ce530bd..1bbf484 100644
--- a/unit-tests/Tests_verit_tactics.v
+++ b/unit-tests/Tests_verit_tactics.v
@@ -1475,3 +1475,26 @@ Section QInstAnd.
Proof. verit. Qed.
End QInstAnd.
+
+
+Section OCamlCompDec.
+ Variable A : Type.
+ Variable HA : CompDec A.
+ Variable H2 : forall (h : A) (l x : list A), (h :: l) ++ x = h :: l ++ x.
+ Variable H4 : forall x : list A, nil ++ x = x.
+ Variable H5 : forall (x : A) (x0 : list A), nil = x :: x0 -> False.
+ Variable H6 : forall (x : list A) (x0 : list (list A)), nil = x :: x0 -> False.
+ Variable H8 : forall (x x0 : list A) (x1 x2 : list (list A)), x :: x1 = x0 :: x2 -> x = x0 /\ x1 = x2.
+ Variable proj_list : forall A : Type, list A -> list A -> list A.
+ Variable H0 : forall (H : list A) (H0 : A) (H1 : list A), proj_list A H (H0 :: H1) = H1.
+ Variable H10 : forall (H : list (list A)) (H0 : list A) (H1 : list (list A)),
+ proj_list (list A) H (H0 :: H1) = H1.
+ Variable proj_list0 : forall A : Type, A -> list A -> A.
+ Variable H9 : forall (H H0 : A) (H1 : list A), proj_list0 A H (H0 :: H1) = H0.
+ Variable H12 : forall (H H0 : list A) (H1 : list (list A)), proj_list0 (list A) H (H0 :: H1) = H0.
+ Variable H11 : forall (x : A) (x0 x1 : list A), x1 = nil \/ x1 = proj_list0 A x x1 :: proj_list A x0 x1.
+
+ Goal forall (x y : list A) (a0 : A),
+ x ++ y = a0::nil -> x = nil /\ y = a0::nil \/ x = a0::nil /\ y = nil.
+ Proof. verit_no_check. Qed.
+End OCamlCompDec.