aboutsummaryrefslogtreecommitdiffstats
path: root/src/trace/smtAtom.ml
diff options
context:
space:
mode:
authorckeller <ckeller@users.noreply.github.com>2021-01-05 17:49:50 +0100
committerGitHub <noreply@github.com>2021-01-05 17:49:50 +0100
commit09117dcb494ed47828ee658b9c72ad83c880a438 (patch)
tree4d0eb85832fcf2d2c73cbfa23203549bef185010 /src/trace/smtAtom.ml
parent73c49626476ed7ae4313f92431a9dea0b4eeb51d (diff)
downloadsmtcoq-09117dcb494ed47828ee658b9c72ad83c880a438.tar.gz
smtcoq-09117dcb494ed47828ee658b9c72ad83c880a438.zip
Reify polymorphic terms
A polymorphic term is now reified as a whole of the term applied to one or many types. The same polymorphic term applied to different types is reified as different monomorphic terms.
Diffstat (limited to 'src/trace/smtAtom.ml')
-rw-r--r--src/trace/smtAtom.ml15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/trace/smtAtom.ml b/src/trace/smtAtom.ml
index ae44b8d..121e705 100644
--- a/src/trace/smtAtom.ml
+++ b/src/trace/smtAtom.ml
@@ -1262,6 +1262,21 @@ module Atom =
| _ -> assert false
and mk_unknown c args ty =
+ let rec collect_types = function
+ | [] -> ([],[])
+ | x::xs as l ->
+ if Constr.iskind (Structures.retyping_get_type_of env sigma x) then
+ let (l1, l2) = collect_types xs in
+ (x::l1, l2)
+ else
+ ([], l)
+ in
+ let (args1, args2) = collect_types args in
+ let c, args =
+ match args1 with
+ | [] -> c, args
+ | _ -> Constr.mkApp (c, Array.of_list args1), args2
+ in
let hargs = Array.of_list (List.map mk_hatom args) in
let op =
try Op.of_coq ro c