summaryrefslogtreecommitdiff
path: root/contrib/first-order/g_ground.ml4
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/first-order/g_ground.ml4')
-rw-r--r--contrib/first-order/g_ground.ml468
1 files changed, 46 insertions, 22 deletions
diff --git a/contrib/first-order/g_ground.ml4 b/contrib/first-order/g_ground.ml4
index f85f2171..366f563b 100644
--- a/contrib/first-order/g_ground.ml4
+++ b/contrib/first-order/g_ground.ml4
@@ -8,7 +8,7 @@
(*i camlp4deps: "parsing/grammar.cma" i*)
-(* $Id: g_ground.ml4,v 1.10.2.1 2004/07/16 19:30:10 herbelin Exp $ *)
+(* $Id: g_ground.ml4 9154 2006-09-20 17:18:18Z corbinea $ *)
open Formula
open Sequent
@@ -24,7 +24,7 @@ open Libnames
(* declaring search depth as a global option *)
-let ground_depth=ref 5
+let ground_depth=ref 3
let _=
let gdopt=
@@ -34,14 +34,29 @@ let _=
optread=(fun ()->Some !ground_depth);
optwrite=
(function
- None->ground_depth:=5
+ None->ground_depth:=3
| Some i->ground_depth:=(max i 0))}
in
declare_int_option gdopt
-
+
+let congruence_depth=ref 100
+
+let _=
+ let gdopt=
+ { optsync=true;
+ optname="Congruence Depth";
+ optkey=SecondaryTable("Congruence","Depth");
+ optread=(fun ()->Some !congruence_depth);
+ optwrite=
+ (function
+ None->congruence_depth:=0
+ | Some i->congruence_depth:=(max i 0))}
+ in
+ declare_int_option gdopt
+
let default_solver=(Tacinterp.interp <:tactic<auto with *>>)
-
-let fail_solver=tclFAIL 0 "GTauto failed"
+
+let fail_solver=tclFAIL 0 (Pp.str "GTauto failed")
type external_env=
Ids of global_reference list
@@ -81,23 +96,32 @@ let normalize_evaluables=
unfold_in_hyp (Lazy.force defined_connectives)
(Tacexpr.InHypType id)) *)
-TACTIC EXTEND Firstorder
- [ "Firstorder" tactic_opt(t) "with" ne_reference_list(l) ] ->
- [ gen_ground_tac true (option_app eval_tactic t) (Ids l) ]
-| [ "Firstorder" tactic_opt(t) "using" ne_preident_list(l) ] ->
- [ gen_ground_tac true (option_app eval_tactic t) (Bases l) ]
-| [ "Firstorder" tactic_opt(t) ] ->
- [ gen_ground_tac true (option_app eval_tactic t) Void ]
+TACTIC EXTEND firstorder
+ [ "firstorder" tactic_opt(t) "with" ne_reference_list(l) ] ->
+ [ gen_ground_tac true (option_map eval_tactic t) (Ids l) ]
+| [ "firstorder" tactic_opt(t) "using" ne_preident_list(l) ] ->
+ [ gen_ground_tac true (option_map eval_tactic t) (Bases l) ]
+| [ "firstorder" tactic_opt(t) ] ->
+ [ gen_ground_tac true (option_map eval_tactic t) Void ]
END
-(* Obsolete since V8.0
-TACTIC EXTEND GTauto
- [ "GTauto" ] ->
- [ gen_ground_tac false (Some fail_solver) Void ]
+TACTIC EXTEND gintuition
+ [ "gintuition" tactic_opt(t) ] ->
+ [ gen_ground_tac false (option_map eval_tactic t) Void ]
END
-*)
-TACTIC EXTEND GIntuition
- [ "GIntuition" tactic_opt(t) ] ->
- [ gen_ground_tac false (option_app eval_tactic t) Void ]
-END
+
+let default_declarative_automation gls =
+ tclORELSE
+ (Cctac.congruence_tac !congruence_depth [])
+ (gen_ground_tac true
+ (Some (tclTHEN
+ default_solver
+ (Cctac.congruence_tac !congruence_depth [])))
+ Void) gls
+
+
+
+let () =
+ Decl_proof_instr.register_automation_tac default_declarative_automation
+