aboutsummaryrefslogtreecommitdiff
path: root/engine/evarutil.mli
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2016-08-16 11:35:49 +0200
committerPierre-Marie Pédrot2016-08-16 11:35:49 +0200
commitfa324f9bedcc8f05421f729e49ebd0494aeb8765 (patch)
treebfcf98b5f48f1d0629f09a4765a4f51736d851d7 /engine/evarutil.mli
parent5f7463e1ad99f530e078ecbc600347328d603bb4 (diff)
parentf1e1b7f735c8cd4a1f3cc52e7f9a7cdf1481ffe5 (diff)
Efficiently generate the pretyping contexts.
We used to recompute all fresh named contexts for evars before this patch in the push_rel_context_to_named_context function. This was incurring a linear penalty and a memory explosion due to the reallocation of many arrays. Now, we rather remember the context between evar creations by sharing it in the pretyping environment. This can be considered as a fix for bug #4964 even though we might do better.
Diffstat (limited to 'engine/evarutil.mli')
-rw-r--r--engine/evarutil.mli14
1 files changed, 13 insertions, 1 deletions
diff --git a/engine/evarutil.mli b/engine/evarutil.mli
index 111d0f3e8c..c0c81442d5 100644
--- a/engine/evarutil.mli
+++ b/engine/evarutil.mli
@@ -199,8 +199,20 @@ val clear_hyps_in_evi : env -> evar_map ref -> named_context_val -> types ->
val clear_hyps2_in_evi : env -> evar_map ref -> named_context_val -> types -> types ->
Id.Set.t -> named_context_val * types * types
+type csubst
+
+val empty_csubst : csubst
+val csubst_subst : csubst -> Constr.t -> Constr.t
+
+type ext_named_context =
+ csubst * (Id.t * Constr.constr) list *
+ Id.Set.t * Context.Named.t
+
+val push_rel_decl_to_named_context :
+ Context.Rel.Declaration.t -> ext_named_context -> ext_named_context
+
val push_rel_context_to_named_context : Environ.env -> types ->
- named_context_val * types * constr list * constr list * (identifier*constr) list
+ named_context_val * types * constr list * csubst * (identifier*constr) list
val generalize_evar_over_rels : evar_map -> existential -> types * constr list