aboutsummaryrefslogtreecommitdiffhomepage
path: root/proofs/proof.ml
diff options
context:
space:
mode:
authorGravatar Enrico Tassi <Enrico.Tassi@inria.fr>2015-09-20 15:34:19 +0200
committerGravatar Enrico Tassi <Enrico.Tassi@inria.fr>2015-09-20 15:34:19 +0200
commitb3bd2696c31ad2cb544f3436ddb5a237fe7fa6fe (patch)
tree059f63fda56ae254df9ed763f1572b335f08d289 /proofs/proof.ml
parent0c766b2e3b54d96713a79e40661653c5486822a8 (diff)
Proof: suggest Admitted->Qed only if the proof is really complete (#4349)
Diffstat (limited to 'proofs/proof.ml')
-rw-r--r--proofs/proof.ml10
1 files changed, 8 insertions, 2 deletions
diff --git a/proofs/proof.ml b/proofs/proof.ml
index a7077d911..c7aa5bad9 100644
--- a/proofs/proof.ml
+++ b/proofs/proof.ml
@@ -173,6 +173,12 @@ let is_done p =
(* spiwack: for compatibility with <= 8.2 proof engine *)
let has_unresolved_evar p =
Proofview.V82.has_unresolved_evar p.proofview
+let has_shelved_goals p = not (CList.is_empty (p.shelf))
+let has_given_up_goals p = not (CList.is_empty (p.given_up))
+
+let is_complete p =
+ is_done p && not (has_unresolved_evar p) &&
+ not (has_shelved_goals p) && not (has_given_up_goals p)
(* Returns the list of partial proofs to initial goals *)
let partial_proof p = Proofview.partial_proof p.entry p.proofview
@@ -305,9 +311,9 @@ end
let return p =
if not (is_done p) then
raise UnfinishedProof
- else if not (CList.is_empty (p.shelf)) then
+ else if has_shelved_goals p then
raise HasShelvedGoals
- else if not (CList.is_empty (p.given_up)) then
+ else if has_given_up_goals p then
raise HasGivenUpGoals
else if has_unresolved_evar p then
(* spiwack: for compatibility with <= 8.3 proof engine *)