* http://cs.unibo.it/helm/.
*)
-let search_theorems_in_context ~status:((proof,goal) as status) =
+let search_theorems_in_context status =
+ let (proof, goal) = status in
let module C = Cic in
let module R = CicReduction in
let module S = CicSubstitution in
| hd::tl ->
let res =
try
- Some (PrimitiveTactics.apply_tac ~status ~term:(C.Rel n))
+ Some (PrimitiveTactics.apply_tac status ~term:(C.Rel n))
with
ProofEngineTypes.Fail _ -> None in
(match res with
else
(* choices is a list of pairs proof and goallist *)
let choices =
- (search_theorems_in_context ~status:(proof,goal))@
- (TacticChaser.searchTheorems mqi_handle ~status:(proof,goal))
+ (search_theorems_in_context (proof,goal))@
+ (TacticChaser.searchTheorems mqi_handle (proof,goal))
in
let rec try_choices = function
[] -> raise NotApplicableTheorem
try_choices tl) in
try_choices choices;;
-let auto_tac mqi_handle ~status:(proof,goal) =
+let auto_tac mqi_handle (proof,goal) =
prerr_endline "Entro in Auto";
try
let proof = auto_tac mqi_handle depth proof goal in
chiedere: find dovrebbe restituire una lista di hyp (?) da passare all'utonto con una
funzione di callback che restituisce la (sola) hyp da applicare *)
-let assumption_tac ~status:((proof,goal) as status) =
+let assumption_tac status =
+ let (proof, goal) = status in
let module C = Cic in
let module R = CicReduction in
let module S = CicSubstitution in
| _ -> find (n+1) tl
)
| [] -> raise (ProofEngineTypes.Fail "Assumption: No such assumption")
- in PrimitiveTactics.apply_tac ~status ~term:(C.Rel (find 1 context))
+ in PrimitiveTactics.apply_tac status ~term:(C.Rel (find 1 context))
;;
(* ANCORA DA DEBUGGARE *)
let generalize_tac
?(mk_fresh_name_callback = FreshNamesGenerator.mk_fresh_name)
- terms ~status:((proof,goal) as status)
+ terms status
=
+ let (proof, goal) = status in
let module C = Cic in
let module P = PrimitiveTactics in
let module T = Tacticals in
~where:ty)
)))
~continuations: [(P.apply_tac ~term:(C.Rel 1)) ; T.id_tac]
- ~status
+ status
;;