X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Facic_procedural%2Facic2Procedural.ml;h=0eb8d8efbf9565e8ef64382587879c18e3b76589;hb=dcef667a444aa0f189225855c1433d26b65fb8b7;hp=043bd6e3a6637cb0cb4915822c52013462467363;hpb=1b36fc4540d93ff21c1afcf485e47e3fe3f26ddb;p=helm.git diff --git a/helm/software/components/acic_procedural/acic2Procedural.ml b/helm/software/components/acic_procedural/acic2Procedural.ml index 043bd6e3a..0eb8d8efb 100644 --- a/helm/software/components/acic_procedural/acic2Procedural.ml +++ b/helm/software/components/acic_procedural/acic2Procedural.ml @@ -23,7 +23,10 @@ * http://cs.unibo.it/helm/. *) -module P1 = Procedural1 +module L = Librarian + +module T = ProceduralTypes +module P2 = Procedural2 module X = ProceduralTeX let tex_formatter = ref None @@ -32,20 +35,13 @@ let tex_formatter = ref None let procedural_of_acic_object ~ids_to_inner_sorts ~ids_to_inner_types ?info ?depth ?flavour prefix anobj = - let st = { - sorts = ids_to_inner_sorts; - types = ids_to_inner_types; - max_depth = depth; - depth = 0; - context = []; - case = [] - } in - L.time_stamp "P : LEVEL 1 "; - HLog.debug "Procedural: level 1 transformation"; - let steps = proc_obj st ?flavour ?info anobj in + let st = P2.init ~ids_to_inner_sorts ~ids_to_inner_types ?depth [] in + L.time_stamp "P : LEVEL 2 "; + HLog.debug "Procedural: level 2 transformation"; + let steps = P2.proc_obj st ?flavour ?info anobj in let _ = match !tex_formatter with | None -> () - | Some frm -> X.tex_of_steps frm st.sorts steps + | Some frm -> X.tex_of_steps frm ids_to_inner_sorts steps in L.time_stamp "P : RENDERING"; HLog.debug "Procedural: grafite rendering"; @@ -54,19 +50,12 @@ let procedural_of_acic_object ~ids_to_inner_sorts ~ids_to_inner_types let procedural_of_acic_term ~ids_to_inner_sorts ~ids_to_inner_types ?depth prefix context annterm = - let st = { - sorts = ids_to_inner_sorts; - types = ids_to_inner_types; - max_depth = depth; - depth = 0; - context = context; - case = [] - } in - HLog.debug "Procedural: level 1 transformation"; - let steps = proc_proof st annterm in + let st = P2.init ~ids_to_inner_sorts ~ids_to_inner_types ?depth context in + HLog.debug "Procedural: level 2 transformation"; + let steps = P2.proc_proof st annterm in let _ = match !tex_formatter with | None -> () - | Some frm -> X.tex_of_steps frm st.sorts steps + | Some frm -> X.tex_of_steps frm ids_to_inner_sorts steps in HLog.debug "Procedural: grafite rendering"; List.rev (T.render_steps [] steps)