+proceduralPreprocess.cmo: proceduralPreprocess.cmi
+proceduralPreprocess.cmx: proceduralPreprocess.cmi
proceduralTypes.cmo: proceduralTypes.cmi
proceduralTypes.cmx: proceduralTypes.cmi
-proceduralClassify.cmo: proceduralClassify.cmi
-proceduralClassify.cmx: proceduralClassify.cmi
-proceduralMode.cmo: proceduralClassify.cmi proceduralMode.cmi
-proceduralMode.cmx: proceduralClassify.cmx proceduralMode.cmi
-proceduralConversion.cmo: proceduralTypes.cmi proceduralClassify.cmi \
- proceduralConversion.cmi
-proceduralConversion.cmx: proceduralTypes.cmx proceduralClassify.cmx \
- proceduralConversion.cmi
-acic2Procedural.cmo: proceduralTypes.cmi proceduralMode.cmi \
- proceduralConversion.cmi proceduralClassify.cmi acic2Procedural.cmi
-acic2Procedural.cmx: proceduralTypes.cmx proceduralMode.cmx \
- proceduralConversion.cmx proceduralClassify.cmx acic2Procedural.cmi
+proceduralClassify.cmo: proceduralPreprocess.cmi proceduralClassify.cmi
+proceduralClassify.cmx: proceduralPreprocess.cmx proceduralClassify.cmi
+proceduralMode.cmo: proceduralPreprocess.cmi proceduralClassify.cmi \
+ proceduralMode.cmi
+proceduralMode.cmx: proceduralPreprocess.cmx proceduralClassify.cmx \
+ proceduralMode.cmi
+proceduralConversion.cmo: proceduralTypes.cmi proceduralPreprocess.cmi \
+ proceduralMode.cmi proceduralConversion.cmi
+proceduralConversion.cmx: proceduralTypes.cmx proceduralPreprocess.cmx \
+ proceduralMode.cmx proceduralConversion.cmi
+acic2Procedural.cmo: proceduralTypes.cmi proceduralPreprocess.cmi \
+ proceduralMode.cmi proceduralConversion.cmi proceduralClassify.cmi \
+ acic2Procedural.cmi
+acic2Procedural.cmx: proceduralTypes.cmx proceduralPreprocess.cmx \
+ proceduralMode.cmx proceduralConversion.cmx proceduralClassify.cmx \
+ acic2Procedural.cmi
+proceduralPreprocess.cmo: proceduralPreprocess.cmi
+proceduralPreprocess.cmx: proceduralPreprocess.cmi
proceduralTypes.cmo: proceduralTypes.cmi
proceduralTypes.cmx: proceduralTypes.cmi
-proceduralClassify.cmo: proceduralClassify.cmi
-proceduralClassify.cmx: proceduralClassify.cmi
-proceduralMode.cmo: proceduralClassify.cmi proceduralMode.cmi
-proceduralMode.cmx: proceduralClassify.cmx proceduralMode.cmi
-proceduralConversion.cmo: proceduralTypes.cmi proceduralClassify.cmi \
- proceduralConversion.cmi
-proceduralConversion.cmx: proceduralTypes.cmx proceduralClassify.cmx \
- proceduralConversion.cmi
-acic2Procedural.cmo: proceduralTypes.cmi proceduralMode.cmi \
- proceduralConversion.cmi proceduralClassify.cmi acic2Procedural.cmi
-acic2Procedural.cmx: proceduralTypes.cmx proceduralMode.cmx \
- proceduralConversion.cmx proceduralClassify.cmx acic2Procedural.cmi
+proceduralClassify.cmo: proceduralPreprocess.cmi proceduralClassify.cmi
+proceduralClassify.cmx: proceduralPreprocess.cmx proceduralClassify.cmi
+proceduralMode.cmo: proceduralPreprocess.cmi proceduralClassify.cmi \
+ proceduralMode.cmi
+proceduralMode.cmx: proceduralPreprocess.cmx proceduralClassify.cmx \
+ proceduralMode.cmi
+proceduralConversion.cmo: proceduralTypes.cmi proceduralPreprocess.cmi \
+ proceduralMode.cmi proceduralConversion.cmi
+proceduralConversion.cmx: proceduralTypes.cmx proceduralPreprocess.cmx \
+ proceduralMode.cmx proceduralConversion.cmi
+acic2Procedural.cmo: proceduralTypes.cmi proceduralPreprocess.cmi \
+ proceduralMode.cmi proceduralConversion.cmi proceduralClassify.cmi \
+ acic2Procedural.cmi
+acic2Procedural.cmx: proceduralTypes.cmx proceduralPreprocess.cmx \
+ proceduralMode.cmx proceduralConversion.cmx proceduralClassify.cmx \
+ acic2Procedural.cmi
PREDICATES =
INTERFACE_FILES = \
+ proceduralPreprocess.mli \
proceduralTypes.mli \
proceduralClassify.mli \
proceduralMode.mli \
module E = CicEnvironment
module PER = ProofEngineReduction
+module P = ProceduralPreprocess
module Cl = ProceduralClassify
module M = ProceduralMode
module T = ProceduralTypes
let script = if proceed then
let ty, _ = TC.type_of_aux' [] st.context (cic hd) Un.empty_ugraph in
let (classes, rc) as h = Cl.classify st.context ty in
- let premises, _ = Cl.split st.context ty in
+ let premises, _ = P.split st.context ty in
let decurry = List.length classes - List.length tl in
if decurry < 0 then mk_proof (clear st) (appl_expand decurry t) else
if decurry > 0 then mk_proof (clear st) (eta_expand decurry t) else
*)
module C = Cic
-module R = CicReduction
module D = Deannotate
module I = CicInspect
+module P = ProceduralPreprocess
+
type conclusion = (int * int) option
(* debugging ****************************************************************)
let id x = x
-let split c t =
- let add s v c = Some (s, C.Decl v) :: c in
- let rec aux whd a n c = function
- | C.Prod (s, v, t) -> aux false (v :: a) (succ n) (add s v c) t
- | v when whd -> v :: a, n
- | v -> aux true a n c (R.whd ~delta:true c v)
- in
- aux false [] 0 c t
-
let classify_conclusion = function
| C.Rel i -> Some (i, 0)
| C.Appl (C.Rel i :: tl) -> Some (i, List.length tl)
let classify c t =
try
- let vs, h = split c t in
+ let vs, h = P.split c t in
let rc = classify_conclusion (List.hd vs) in
let map (b, h) v = (I.get_rels_from_premise h v, I.S.empty) :: b, succ h in
let l, h = List.fold_left map ([], 0) vs in
val classify: Cic.context -> Cic.term -> CicInspect.S.t list * conclusion
val to_string: CicInspect.S.t list * conclusion -> string
-
-val split: Cic.context -> Cic.term -> Cic.term list * int
module D = Deannotate
module UM = UriManager
+module P = ProceduralPreprocess
module T = ProceduralTypes
-module Cl = ProceduralClassify
module M = ProceduralMode
(* helpers ******************************************************************)
if is_recursive premise then 0, lift (succ k) 1 case, succ k else
0, case, succ k
in
- let premises, _ = Cl.split context cty in
+ let premises, _ = P.split context cty in
let _, lifted_case, _ =
List.fold_left map (lpsno, case, 1) (List.rev (List.tl premises))
in
*)
module C = Cic
+
+module P = ProceduralPreprocess
module Cl = ProceduralClassify
let is_eliminator = function
let bkd c t =
let classes, rc = Cl.classify c t in
- let premises, _ = Cl.split c t in
+ let premises, _ = P.split c t in
match rc with
| Some (i, j) when i > 1 && i <= List.length classes && is_eliminator premises -> true
| _ ->
- let ts, _ = Cl.split c t in
+ let ts, _ = P.split c t in
is_appl true (List.hd ts)
helmLibraryObjects.cmi: cic.cmo
discrimination_tree.cmi: cic.cmo
path_indexing.cmi: cic.cmo
+cicInspect.cmi: cic.cmo
cic.cmo: cicUniv.cmi
cic.cmx: cicUniv.cmx
unshare.cmo: cic.cmo unshare.cmi
helmLibraryObjects.cmi: cic.cmx
discrimination_tree.cmi: cic.cmx
path_indexing.cmi: cic.cmx
+cicInspect.cmi: cic.cmx
cic.cmo: cicUniv.cmi
cic.cmx: cicUniv.cmx
unshare.cmo: cic.cmx unshare.cmi
matitaExcPp.cmx matitaEngine.cmx buildTimeConf.cmx \
applyTransformation.cmx matitacLib.cmi
matitac.cmo: matitaprover.cmi matitamake.cmi matitadep.cmi matitaclean.cmi \
- matitacLib.cmi matitaWiki.cmo gragrep.cmi
+ matitacLib.cmi matitaWiki.cmo matitaInit.cmi matitaEngine.cmi gragrep.cmi
matitac.cmx: matitaprover.cmx matitamake.cmx matitadep.cmx matitaclean.cmx \
- matitacLib.cmx matitaWiki.cmx gragrep.cmx
+ matitacLib.cmx matitaWiki.cmx matitaInit.cmx matitaEngine.cmx gragrep.cmx
matitadep.cmo: matitaInit.cmi matitadep.cmi
matitadep.cmx: matitaInit.cmx matitadep.cmi
matitaEngine.cmo: matitaEngine.cmi
matitaExcPp.cmx matitaEngine.cmx buildTimeConf.cmx \
applyTransformation.cmx matitacLib.cmi
matitac.cmo: matitaprover.cmi matitamake.cmi matitadep.cmi matitaclean.cmi \
- matitacLib.cmi matitaWiki.cmx gragrep.cmi
+ matitacLib.cmi matitaWiki.cmx matitaInit.cmi matitaEngine.cmi gragrep.cmi
matitac.cmx: matitaprover.cmx matitamake.cmx matitadep.cmx matitaclean.cmx \
- matitacLib.cmx matitaWiki.cmx gragrep.cmx
+ matitacLib.cmx matitaWiki.cmx matitaInit.cmx matitaEngine.cmx gragrep.cmx
matitadep.cmo: matitaInit.cmi matitadep.cmi
matitadep.cmx: matitaInit.cmx matitadep.cmi
matitaEngine.cmo: matitaEngine.cmi
(* $Id$ *)
+module G = GrafiteAst
+
let mpres_document pres_box =
Xml.add_xml_declaration (CicNotationPres.print_box pres_box)
remove_closed_substs s
let txt_of_cic_object ?map_unicode_to_tex n style prefix obj =
- let aobj,_,_,ids_to_inner_sorts,ids_to_inner_types,_,_ =
- try Cic2acic.acic_object_of_cic_object obj
+ let get_aobj obj =
+ try
+ let aobj,_,_,ids_to_inner_sorts,ids_to_inner_types,_,_ =
+ Cic2acic.acic_object_of_cic_object obj
+ in
+ aobj, ids_to_inner_sorts, ids_to_inner_types
with e ->
let msg = "txt_of_cic_object: " ^ Printexc.to_string e in
failwith msg
in
match style with
- | GrafiteAst.Declarative ->
- let cobj = Acic2content.annobj2content ids_to_inner_sorts ids_to_inner_types aobj in
+ | G.Declarative ->
+ let aobj, ids_to_inner_sorts, ids_to_inner_types = get_aobj obj in
+ let cobj = Acic2content.annobj2content ids_to_inner_sorts ids_to_inner_types aobj in
let bobj = Content2pres.content2pres ids_to_inner_sorts cobj in
remove_closed_substs ("\n\n" ^
BoxPp.render_to_string ?map_unicode_to_tex
(function _::x::_ -> x | _ -> assert false) n
(CicNotationPres.mpres_of_box bobj)
)
- | GrafiteAst.Procedural depth ->
+ | G.Procedural depth ->
+ let obj = ProceduralPreprocess.pp_obj obj in
+ let aobj, ids_to_inner_sorts, ids_to_inner_types = get_aobj obj in
let term_pp = term2pres (n - 8) ids_to_inner_sorts in
let lazy_term_pp = term_pp in
let obj_pp = CicNotationPp.pp_obj term_pp in
let aux = GrafiteAstPp.pp_statement ~term_pp ~lazy_term_pp ~obj_pp in
- let script = Acic2Procedural.acic2procedural
+ let script = Acic2Procedural.acic2procedural
~ids_to_inner_sorts ~ids_to_inner_types ?depth prefix aobj in
"\n" ^ String.concat "" (List.map aux script)