(text,prefix_len,concl))
) seqs)
| GrafiteAst.NAuto (_loc, (l,a)) ->
- NTactics.auto_tac
+ NAuto.auto_tac
~params:(List.map (fun x -> "",0,x) l,a)
| GrafiteAst.NBranch _ -> NTactics.branch_tac
| GrafiteAst.NCases (_loc, what, where) ->
nCicElim.cmx: nCicElim.cmi
nAuto.cmo: nTacStatus.cmi nAuto.cmi
nAuto.cmx: nTacStatus.cmx nAuto.cmi
-nTactics.cmo: nTacStatus.cmi nCicElim.cmi nAuto.cmi nTactics.cmi
-nTactics.cmx: nTacStatus.cmx nCicElim.cmx nAuto.cmx nTactics.cmi
+nTactics.cmo: nTacStatus.cmi nCicElim.cmi nTactics.cmi
+nTactics.cmx: nTacStatus.cmx nCicElim.cmx nTactics.cmi
nInversion.cmo: nTactics.cmi nCicElim.cmi nInversion.cmi
nInversion.cmx: nTactics.cmx nCicElim.cmx nInversion.cmi
nCicElim.cmx: nCicElim.cmi
nAuto.cmo: nTacStatus.cmi nAuto.cmi
nAuto.cmx: nTacStatus.cmx nAuto.cmi
-nTactics.cmo: nTacStatus.cmi nCicElim.cmi nAuto.cmi nTactics.cmi
-nTactics.cmx: nTacStatus.cmx nCicElim.cmx nAuto.cmx nTactics.cmi
+nTactics.cmo: nTacStatus.cmi nCicElim.cmi nTactics.cmi
+nTactics.cmx: nTacStatus.cmx nCicElim.cmx nTactics.cmi
nInversion.cmo: nTactics.cmi nCicElim.cmi nInversion.cmi
nInversion.cmx: nTactics.cmx nCicElim.cmx nInversion.cmi
nCicTacReduction.mli \
nTacStatus.mli \
nCicElim.mli \
- nAuto.mli \
nTactics.mli \
+ nAuto.mli \
nInversion.mli
IMPLEMENTATION_FILES = $(INTERFACE_FILES:%.mli=%.ml)
open NTacStatus
module Ast = CicNotationPt
-let auto_tac status =
+(* =================================== paramod =========================== *)
+let auto_paramod ~params:(l,_) status goal =
+ let gty = get_goalty status goal in
+ let n,h,metasenv,subst,o = status#obj in
+ let status,t = term_of_cic_term status gty (ctx_of gty) in
+ let status, l =
+ List.fold_left
+ (fun (status, l) t ->
+ let status, t = disambiguate status t None (ctx_of gty) in
+ let status, ty = typeof status (ctx_of t) t in
+ let status, t = term_of_cic_term status t (ctx_of gty) in
+ let status, ty = term_of_cic_term status ty (ctx_of ty) in
+ (status, (t,ty) :: l))
+ (status,[]) l
+ in
+ match
+ NCicParamod.nparamod status metasenv subst (ctx_of gty) (NCic.Rel ~-1,t) l
+ with
+ | [] -> raise (NTacStatus.Error (lazy "no proof found",None))
+ | (pt, metasenv, subst)::_ ->
+ let status = status#set_obj (n,h,metasenv,subst,o) in
+ instantiate status goal (NTacStatus.mk_cic_term (ctx_of gty) pt)
+;;
+
+let auto_paramod_tac ~params status =
+ NTactics.distribute_tac (auto_paramod ~params) status
+;;
+
+(* =================================== auto =========================== *)
+let auto_tac ~params status =
prerr_endline "I teoremi noti sono";
NDiscriminationTree.DiscriminationTree.iter status#auto_cache
(fun _ t ->
(NDiscriminationTree.TermSet.elements t));
status
;;
+
+(* ========================= dispatching of auto/auto_paramod ============ *)
+let auto_tac ~params:(_,flags as params) =
+ if List.mem_assoc "paramodulation" flags then
+ auto_paramod_tac ~params
+ else
+ auto_tac ~params
+;;
+
+(* EOF *)
(* $Id: nCic.ml 9058 2008-10-13 17:42:30Z tassi $ *)
-val auto_tac : 's NTacStatus.tactic
+val auto_tac:
+ params:(NTacStatus.tactic_term list * (string * string) list) ->
+ 's NTacStatus.tactic
+
+val auto_paramod_tac:
+ params:(NTacStatus.tactic_term list * (string * string) list) ->
+ 's NTacStatus.tactic
) status
;;
-let auto ~params:(l,_) status goal =
- let gty = get_goalty status goal in
- let n,h,metasenv,subst,o = status#obj in
- let status,t = term_of_cic_term status gty (ctx_of gty) in
- let status, l =
- List.fold_left
- (fun (status, l) t ->
- let status, t = disambiguate status t None (ctx_of gty) in
- let status, ty = typeof status (ctx_of t) t in
- let status, t = term_of_cic_term status t (ctx_of gty) in
- let status, ty = term_of_cic_term status ty (ctx_of ty) in
- (status, (t,ty) :: l))
- (status,[]) l
- in
- match
- NCicParamod.nparamod status metasenv subst (ctx_of gty) (NCic.Rel ~-1,t) l
- with
- | [] -> raise (NTacStatus.Error (lazy "no proof found",None))
- | (pt, metasenv, subst)::_ ->
- let status = status#set_obj (n,h,metasenv,subst,o) in
- instantiate status goal (NTacStatus.mk_cic_term (ctx_of gty) pt)
-;;
-
-let auto_tac ~params status =
- (* distribute_tac (auto ~params) status *)
- NAuto.auto_tac status
-;;
-
((string * [`Decl of NTacStatus.tactic_term | `Def of NTacStatus.tactic_term * NTacStatus.tactic_term]) list * NTacStatus.tactic_term) list ->
's NTacStatus.tactic
-val auto_tac:
- params:(NTacStatus.tactic_term list * (string * string) list) ->
- 's NTacStatus.tactic
-
val constructor_tac :
?num:int -> args:NTacStatus.tactic_term list -> 's NTacStatus.tactic