aboutsummaryrefslogtreecommitdiff
path: root/engine/termops.ml
diff options
context:
space:
mode:
authorMatthieu Sozeau2017-04-25 21:54:31 +0200
committerMaxime Dénès2020-09-07 20:47:42 +0200
commitb6dabf6aa5b96cfa3c11038316399f0797d734ac (patch)
tree0e97b6c66bba554833c47cec50d017820f72afe6 /engine/termops.ml
parentb972cc5195e941633319c1fa428a9801ac4ef9e2 (diff)
Refine test for unresolved evars: not reachable from initial evars
The test is refined to handle aliases: i.e. undefined evars coming from restrictions and evar-evar unifications with an initial evar are not considered fresh unresolved evars. To check this, we generalize the restricted_evars set to an aliased_evars set in the evar map, registering evars being solved by another evar due to restriction or evar-evar unifications. This implements the proposal of PR #370 for testing the resolution status of evars independently of the evar-evar orientation order. This allows [apply] to refine an evar with a new one if it results from a [clear] request or an evar-evar solution only, otherwise the new evar is considered fresh and an error is raised. Also fixes bugs #4095 and #4413. Co-authored-by: Maxime Dénès <maxime.denes@inria.fr>
Diffstat (limited to 'engine/termops.ml')
-rw-r--r--engine/termops.ml8
1 files changed, 4 insertions, 4 deletions
diff --git a/engine/termops.ml b/engine/termops.ml
index ac6870a39e..0923ab6f4b 100644
--- a/engine/termops.ml
+++ b/engine/termops.ml
@@ -310,15 +310,15 @@ let pr_evar_map_gen with_univs pr_evars env sigma =
let pr_evar_list env sigma l =
let open Evd in
- let pr_restrict ev =
- match is_restricted_evar sigma ev with
+ let pr_alias ev =
+ match is_aliased_evar sigma ev with
| None -> mt ()
- | Some ev' -> str " (restricted to " ++ Evar.print ev' ++ str ")"
+ | Some ev' -> str " (aliased to " ++ Evar.print ev' ++ str ")"
in
let pr (ev, evi) =
h 0 (Evar.print ev ++
str "==" ++ pr_evar_info env sigma evi ++
- pr_restrict ev ++
+ pr_alias ev ++
(if evi.evar_body == Evar_empty
then str " {" ++ pr_existential_key sigma ev ++ str "}"
else mt ()))