aboutsummaryrefslogtreecommitdiff
path: root/proofs/refiner.ml
diff options
context:
space:
mode:
authorcorbinea2003-06-20 13:49:47 +0000
committercorbinea2003-06-20 13:49:47 +0000
commite05172b682a8ceec5e8e0a26f7d4ba5fe49e554f (patch)
treeb8e29b06955a246a1bfcfa096afa58d17a2b4336 /proofs/refiner.ml
parent5a79547ba17c0c372127cce5939b8108499497f7 (diff)
Ground Update.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@4188 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'proofs/refiner.ml')
-rw-r--r--proofs/refiner.ml22
1 files changed, 22 insertions, 0 deletions
diff --git a/proofs/refiner.ml b/proofs/refiner.ml
index dad31af9cb..e68b4bf4a5 100644
--- a/proofs/refiner.ml
+++ b/proofs/refiner.ml
@@ -530,6 +530,28 @@ let rec tclFIRST = function
| [] -> tclFAIL_s "No applicable tactic."
| t::rest -> tclORELSE0 t (tclFIRST rest)
+let ite_gen tcal tac_if continue tac_else=
+ let success=ref false in
+ let tac_if0 gl=
+ let result=tac_if gl in
+ success:=true;result in
+ let tac_else0 gl=
+ if !success then
+ tclFAIL_s "failure in THEN branch" gl
+ else
+ tac_else gl in
+ tclORELSE0 (tcal tac_if0 continue) (tac_else0)
+
+(* Try the first tactic and, if it succeeds, continue with
+ the second one, and if it fails, use the third one *)
+
+let tclIFTHENELSE=ite_gen tclTHEN
+
+(* Idem with tclTHENS and tclTHENSV *)
+
+let tclIFTHENSELSE=ite_gen tclTHENS
+
+let tclIFTHENSVELSE=ite_gen tclTHENSV
(* Fails if a tactic did not solve the goal *)