]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matitaScript.ml
many changes:
[helm.git] / matita / matitaScript.ml
index c6f21c3f62dc19f74f1115013925913ad0306d29..844d2f01eb3c73d42767c0b7b68b26fd69056152 100644 (file)
@@ -549,15 +549,32 @@ let rec eval_macro include_paths (buffer : GText.buffer) guistuff lexicon_status
         in
         let proof_script = 
           if List.exists (fun (s,_) -> s = "paramodulation") params then
-            (* use declarative output *)
-            "Not supported yet"
+              let proof_term, how_many_lambdas = 
+                Auto.lambda_close ~prefix_name:"orrible_hack_" 
+                  proof_term menv cc 
+              in
+              let ty,_ = 
+                CicTypeChecker.type_of_aux'
+                  menv [] proof_term CicUniv.empty_ugraph
+              in
+              prerr_endline (CicPp.ppterm proof_term);
+              (* use declarative output *)
+              let obj =
+                (* il proof_term vive in cc, devo metterci i lambda no? *)
+                (Cic.CurrentProof ("xxx",menv,proof_term,ty,[],[]))
+              in
+               ApplyTransformation.txt_of_cic_object
+                ~map_unicode_to_tex:false 
+                ~skip_thm_and_qed:true
+                ~skip_initial_lambdas:how_many_lambdas
+                80 GrafiteAst.Declarative "" obj
           else
             if true then
               (* use cic2grafite *)
               cic2grafite cc menv proof_term 
             else
               (* alternative using FG stuff *)
-              let proof_term = 
+              let proof_term, how_many_lambdas = 
                 Auto.lambda_close ~prefix_name:"orrible_hack_" 
                   proof_term menv cc 
               in
@@ -573,7 +590,7 @@ let rec eval_macro include_paths (buffer : GText.buffer) guistuff lexicon_status
                   (ApplyTransformation.txt_of_cic_object
                     ~map_unicode_to_tex:false 
                     ~skip_thm_and_qed:true
-                    ~skip_initial_lambdas:true
+                    ~skip_initial_lambdas:how_many_lambdas
                     80 (GrafiteAst.Procedural None) "" obj)) 
         in
         let text = comment parsed_text ^ "\n" ^ proof_script ^ trailer in
@@ -583,7 +600,10 @@ let rec eval_macro include_paths (buffer : GText.buffer) guistuff lexicon_status
           raise exn
           (* [], comment parsed_text ^ "\nfail.\n", parsed_text_length *))
   | TA.Inline (_,style,suri,prefix) ->
-       let str = ApplyTransformation.txt_of_inline_macro style suri prefix in
+       let str = 
+         ApplyTransformation.txt_of_inline_macro
+           ~map_unicode_to_tex:false style suri prefix 
+       in
        [], str, String.length parsed_text
                                 
 and eval_executable include_paths (buffer : GText.buffer) guistuff