| Absurd of loc * 'term
| Apply of loc * 'term
| Assumption of loc
- | Auto of loc * int option * int option * string option
- (* depth, width, paramodulation *)
+ | Auto of loc * int option * int option * string option * string option
+ (* depth, width, paramodulation, full *) (* ALB *)
| Change of loc * ('term, 'lazy_term, 'ident) pattern * 'lazy_term
| Clear of loc * 'ident
| ClearBody of loc * 'ident
| IDENT "auto";
depth = OPT [ IDENT "depth"; SYMBOL "="; i = int -> i ];
width = OPT [ IDENT "width"; SYMBOL "="; i = int -> i ];
- paramodulation = OPT [ IDENT "paramodulation" ] -> (* ALB *)
- GrafiteAst.Auto (loc,depth,width,paramodulation)
+ paramodulation = OPT [ IDENT "paramodulation" ];
+ full = OPT [ IDENT "full" ] -> (* ALB *)
+ GrafiteAst.Auto (loc,depth,width,paramodulation,full)
| IDENT "clear"; id = IDENT ->
GrafiteAst.Clear (loc,id)
| IDENT "clearbody"; id = IDENT ->
tactics.cmi: proofEngineTypes.cmi
proofEngineTypes.cmo: proofEngineTypes.cmi
proofEngineTypes.cmx: proofEngineTypes.cmi
-proofEngineReduction.cmo: proofEngineHelpers.cmi proofEngineReduction.cmi
-proofEngineReduction.cmx: proofEngineHelpers.cmx proofEngineReduction.cmi
proofEngineHelpers.cmo: proofEngineTypes.cmi proofEngineHelpers.cmi
proofEngineHelpers.cmx: proofEngineTypes.cmx proofEngineHelpers.cmi
+proofEngineReduction.cmo: proofEngineTypes.cmi proofEngineHelpers.cmi \
+ proofEngineReduction.cmi
+proofEngineReduction.cmx: proofEngineTypes.cmx proofEngineHelpers.cmx \
+ proofEngineReduction.cmi
tacticals.cmo: proofEngineTypes.cmi tacticals.cmi
tacticals.cmx: proofEngineTypes.cmx tacticals.cmi
reductionTactics.cmo: proofEngineTypes.cmi proofEngineReduction.cmi \
*)
let paramodulation_tactic = ref
- (fun dbd status -> raise (ProofEngineTypes.Fail "Not Ready yet..."));;
+ (fun dbd ?full ?depth ?width status ->
+ raise (ProofEngineTypes.Fail "Not Ready yet..."));;
let term_is_equality = ref
(fun term -> debug_print (lazy "term_is_equality E` DUMMY!!!!"); false);;
-let auto_tac ?(depth=default_depth) ?(width=default_width) ?paramodulation ~(dbd:HMysql.dbd) () =
+let auto_tac ?(depth=default_depth) ?(width=default_width) ?paramodulation
+ ?full ~(dbd:HMysql.dbd) () =
let auto_tac dbd (proof, goal) =
let normal_auto () =
let universe = MetadataQuery.signature_of_goal ~dbd (proof, goal) in
(proof,[])
| _ -> assert false
in
+ let full = match full with None -> false | Some _ -> true in
let paramodulation_ok =
match paramodulation with
| None -> false
| Some _ ->
let _, metasenv, _, _ = proof in
let _, _, meta_goal = CicUtil.lookup_meta goal metasenv in
- !term_is_equality meta_goal
+ full || (!term_is_equality meta_goal)
in
if paramodulation_ok then (
debug_print (lazy "USO PARAMODULATION...");
(* try *)
- !paramodulation_tactic dbd (proof, goal)
+ !paramodulation_tactic dbd ~depth ~width ~full (proof, goal)
(* with ProofEngineTypes.Fail _ -> *)
(* normal_auto () *)
) else
*)
val auto_tac:
- ?depth:int -> ?width:int -> ?paramodulation:string ->
+ ?depth:int -> ?width:int -> ?paramodulation:string -> ?full:string ->
dbd:HMysql.dbd -> unit ->
ProofEngineTypes.tactic
val paramodulation_tactic:
- (HMysql.dbd -> ProofEngineTypes.status ->
+ (HMysql.dbd -> ?full:bool -> ?depth:int -> ?width:int ->
+ ProofEngineTypes.status ->
ProofEngineTypes.proof * ProofEngineTypes.goal list) ref
val term_is_equality:
uris
let equations_for_goal ~(dbd:HMysql.dbd) ((proof, goal) as status) =
+ let to_string set =
+ "{ " ^
+ (String.concat ", "
+ (Constr.UriManagerSet.fold
+ (fun u l -> (UriManager.string_of_uri u)::l) set []))
+ ^ " }"
+ in
let (_, metasenv, _, _) = proof in
let (_, context, ty) = CicUtil.lookup_meta goal metasenv in
let main, sig_constants = Constr.signature_of ty in
- match main with
- None -> raise Goal_is_not_an_equation
- | Some (m,l) ->
- if m == UriManager.uri_of_string HelmLibraryObjects.Logic.eq_XURI then
- let set = signature_of_hypothesis context in
- let set = Constr.UriManagerSet.union set sig_constants in
- let set = close_with_types set metasenv context in
- let set = close_with_constructors set metasenv context in
- let set = List.fold_right Constr.UriManagerSet.remove (m::l) set in
- let uris =
- sigmatch ~dbd ~facts:false ~where:`Statement (main,set) in
- let uris = List.filter nonvar (List.map snd uris) in
- let uris = List.filter Hashtbl_equiv.not_a_duplicate uris in
- uris
- else raise Goal_is_not_an_equation
+(* Printf.printf "\nsig_constants: %s\n\n" (to_string sig_constants); *)
+(* match main with *)
+(* None -> raise Goal_is_not_an_equation *)
+(* | Some (m,l) -> *)
+ let m, l =
+ let eq_URI = UriManager.uri_of_string HelmLibraryObjects.Logic.eq_XURI in
+ match main with
+ | None -> eq_URI, []
+ | Some (m, l) when UriManager.eq m eq_URI -> m, l
+ | Some (m, l) -> eq_URI, []
+ in
+ Printf.printf "\nSome (m, l): %s, [%s]\n\n"
+ (UriManager.string_of_uri m)
+ (String.concat "; " (List.map UriManager.string_of_uri l));
+ (* if m == UriManager.uri_of_string HelmLibraryObjects.Logic.eq_XURI then ( *)
+ let set = signature_of_hypothesis context in
+ (* Printf.printf "\nsignature_of_hypothesis: %s\n\n" (to_string set); *)
+ let set = Constr.UriManagerSet.union set sig_constants in
+ let set = close_with_types set metasenv context in
+ (* Printf.printf "\ndopo close_with_types: %s\n\n" (to_string set); *)
+ let set = close_with_constructors set metasenv context in
+ (* Printf.printf "\ndopo close_with_constructors: %s\n\n" (to_string set); *)
+ let set = List.fold_right Constr.UriManagerSet.remove (m::l) set in
+ let uris =
+ sigmatch ~dbd ~facts:false ~where:`Statement (main,set) in
+ let uris = List.filter nonvar (List.map snd uris) in
+ let uris = List.filter Hashtbl_equiv.not_a_duplicate uris in
+ uris
+ (* ) *)
+ (* else raise Goal_is_not_an_equation *)
let experimental_hint
~(dbd:HMysql.dbd) ?(facts=false) ?signature ((proof, goal) as status) =
val auto :
?depth:int ->
?width:int ->
- ?paramodulation:string -> dbd:HMysql.dbd -> unit -> ProofEngineTypes.tactic
+ ?paramodulation:string ->
+ ?full:string -> dbd:HMysql.dbd -> unit -> ProofEngineTypes.tactic
val change :
pattern:ProofEngineTypes.pattern ->
ProofEngineTypes.lazy_term -> ProofEngineTypes.tactic