]> matita.cs.unibo.it Git - helm.git/commitdiff
generation of more than one theorem per file fixed
authorEnrico Tassi <enrico.tassi@inria.fr>
Sun, 14 May 2006 13:01:17 +0000 (13:01 +0000)
committerEnrico Tassi <enrico.tassi@inria.fr>
Sun, 14 May 2006 13:01:17 +0000 (13:01 +0000)
components/binaries/tptp2grafite/main.ml

index 4ae496b1da3270ac7c8ff92330d8d586356094e5..8df37fe00e3154f6fd58625bbc24a81ebdb082e8 100644 (file)
@@ -152,9 +152,13 @@ let convert_ast statements context = function
           in
           let o = PT.Theorem (`Theorem,name,f,None) in
           statements @ [
-            GA.Executable(
-              floc,GA.Command(
-                floc,GA.Obj(floc,o)))],
+            GA.Executable(floc,GA.Command(floc,GA.Obj(floc,o)));
+            GA.Executable(floc,GA.Tactical(floc, GA.Tactic(floc,
+              GA.Intros (floc,None,[])),Some (GA.Dot(floc))));
+            GA.Executable(floc,GA.Tactical(floc, GA.Tactic(floc,
+              GA.Auto (floc,None,None,Some "paramodulation",None)),
+                Some (GA.Dot(floc))));
+            GA.Executable(floc,GA.Command(floc, GA.Qed(floc)))],
           context
       | A.Definition 
       | A.Lemma 
@@ -225,10 +229,7 @@ let _ =
   in
   let pp t = 
     (* for a correct pp we should disambiguate the term... *)
-    let term_pp x = 
-      BoxPp.render_to_string 80 (CicNotationPres.render (Hashtbl.create 1)
-        (TermContentPres.pp_ast x))
-    in
+    let term_pp = CicNotationPp.pp_term in
     let lazy_term_pp = fun x -> assert false in
     let obj_pp = CicNotationPp.pp_obj in
     print_endline 
@@ -239,19 +240,10 @@ let _ =
       GA.Set(floc,"baseuri","cic:/matita/TPTP/" ^ !inputfile)));
     GA.Executable(floc,GA.Command(floc, GA.Include(floc,"legacy/coq.ma")))]
   in
-  let extra_statements_end = [
-    GA.Executable(floc,GA.Tactical(floc, GA.Tactic(floc,
-      GA.Intros (floc,None,[])),Some (GA.Dot(floc))));
-    GA.Executable(floc,GA.Tactical(floc, GA.Tactic(floc,
-      GA.Auto (floc,None,None,Some "paramodulation",None)),
-      Some (GA.Dot(floc))));
-    GA.Executable(floc,GA.Command(floc, GA.Qed(floc)))]
-  in 
   List.iter pp extra_statements_start;
   print_endline
     (LexiconAstPp.pp_command 
       (LA.Alias(floc,
         LA.Ident_alias("eq","cic:/Coq/Init/Logic/eq.ind#xpointer(1/1)"))) ^ ".");
   List.iter pp grafite_ast_statements;
-  List.iter pp extra_statements_end;
   exit 0