aboutsummaryrefslogtreecommitdiff
path: root/proofs/pfedit.ml
diff options
context:
space:
mode:
authorherbelin2003-10-10 17:51:48 +0000
committerherbelin2003-10-10 17:51:48 +0000
commit5a131ee885f0d320c228f5f756bb6e552fde740e (patch)
tree05e63dcc3cbc29ee05bb50f13afa7a07ae69b754 /proofs/pfedit.ml
parent2adb1d2aff79adbec1660df191d076e1900944ce (diff)
Gestion en temps constant de la pile des Unfo; affichage des buts par Pfedit pour utilisation par les tactiques (Setoid_replace)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@4561 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'proofs/pfedit.ml')
-rw-r--r--proofs/pfedit.ml29
1 files changed, 26 insertions, 3 deletions
diff --git a/proofs/pfedit.ml b/proofs/pfedit.ml
index 7f8e748623..d8dc585f3f 100644
--- a/proofs/pfedit.ml
+++ b/proofs/pfedit.ml
@@ -108,7 +108,7 @@ let get_current_proof_name () =
| Some(na,_,_) -> na
let add_proof (na,pfs,ts) =
- Edit.create proof_edits (na,pfs,ts,Some (!undo_limit+1))
+ Edit.create proof_edits (na,pfs,ts,!undo_limit+1)
let delete_proof_gen = Edit.delete proof_edits
@@ -306,5 +306,28 @@ let reset_top_of_tree () =
let pts = get_pftreestate () in
if not (is_top_pftreestate pts) then mutate top_of_tree
-
-
+(** Printers *)
+
+let pr_subgoals_of_pfts pfts =
+ let gls = fst (Refiner.frontier (proof_of_pftreestate pfts)) in
+ let sigma = project (top_goal_of_pftreestate pfts) in
+ pr_subgoals_existential sigma gls
+
+let pr_open_subgoals () =
+ let pfts = get_pftreestate () in
+ match focus() with
+ | 0 ->
+ pr_subgoals_of_pfts pfts
+ | n ->
+ let pf = proof_of_pftreestate pfts in
+ let gls = fst (frontier pf) in
+ assert (n > List.length gls);
+ if List.length gls < 2 then
+ pr_subgoal n gls
+ else
+ v 0 (int(List.length gls) ++ str" subgoals" ++ cut () ++
+ pr_subgoal n gls)
+
+let pr_nth_open_subgoal n =
+ let pf = proof_of_pftreestate (get_pftreestate ()) in
+ pr_subgoal n (fst (frontier pf))