From bd346e44c8993b758013d98855b71404e4d0ad7f Mon Sep 17 00:00:00 2001 From: Chantal Keller Date: Tue, 7 Dec 2021 18:53:40 +0100 Subject: Solved bug in delayed ComDec --- src/trace/smtBtype.ml | 5 ++--- src/trace/smtMisc.ml | 2 +- src/trace/smtMisc.mli | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/trace/smtBtype.ml b/src/trace/smtBtype.ml index 3b6d107..7c08157 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 2080a64..e4747dd 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 a6f5db8..6378627 100644 --- a/src/trace/smtMisc.mli +++ b/src/trace/smtMisc.mli @@ -12,7 +12,7 @@ val cInt_tbl : (int, Structures.constr) Hashtbl.t val mkInt : int -> Structures.constr -type 'a gen_hashed = { index : int; hval : 'a; } +type 'a gen_hashed = { index : int; mutable hval : 'a; } val mklApp : Structures.constr Lazy.t -> Structures.constr array -> Structures.constr val string_of_name_def : string -> Structures.name -> string val string_coq_constr : Structures.constr -> string -- cgit