]> matita.cs.unibo.it Git - helm.git/commitdiff
fixed generation of horn clauses, negated atoms are hypotheses
authorEnrico Tassi <enrico.tassi@inria.fr>
Tue, 19 May 2009 10:07:42 +0000 (10:07 +0000)
committerEnrico Tassi <enrico.tassi@inria.fr>
Tue, 19 May 2009 10:07:42 +0000 (10:07 +0000)
helm/software/components/tptp_grafite/tptp2grafite.ml

index 63dfe0285bb00cb87374c0a5b20096b95c58dbbc..7a714ce0704ee8843ad64d172fd2c6bc962ecd9d 100644 (file)
@@ -84,11 +84,17 @@ let rec convert_term = function
       PT.Appl (mk_ident name :: List.map convert_term args)
 ;;
 
-let rec atom_of_formula = function
-    | A.Disjunction (a,b) -> 
-        atom_of_formula a @ atom_of_formula b
-    | A.NegAtom a -> [a] (* removes the negation *)
-    | A.Atom a -> [a]
+let rec atom_of_formula neg pos = function
+    | A.Disjunction (a,b) ->
+        let neg, pos = atom_of_formula neg pos a in
+        atom_of_formula neg pos b 
+    | A.NegAtom a -> a::neg, pos 
+    | A.Atom a -> neg, a::pos
+;;
+
+let atom_of_formula f =
+  let neg, pos = atom_of_formula [] [] f in
+  neg @ pos
 ;;
   
 let rec mk_arrow component tail = function
@@ -263,7 +269,12 @@ let convert_ast statements context = function
                   GA.AutoBatch (floc,([],["paramodulation","";
                   "timeout",string_of_int !paramod_timeout]))
               else
-                  GA.AutoBatch (floc,([],["depth",string_of_int !depth]))
+                  GA.AutoBatch (floc,([],[
+                          "depth",string_of_int 5;
+                          "width",string_of_int 5;
+                          "size",string_of_int 20;
+                          "timeout",string_of_int 10;
+                  ]))
             ),
               GA.Semicolon(floc)));
             GA.Executable(floc,GA.Tactic(floc, Some (GA.Try(floc,