]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/ng_paramodulation/index.ml
New functorialization: paramod is abstracted over a Orderings.Blob, that is like...
[helm.git] / helm / software / components / ng_paramodulation / index.ml
index 9ec7fa4cbb89f8b590c8a31fe78c2db97d5bed19..889e1e7ef14955960fb1b88bbb7d8f40581ecf1c 100644 (file)
@@ -11,8 +11,8 @@
 
 (* $Id$ *)
 
-module Index(B : Terms.Blob) = struct
-  module U = Terms.Utils(B)
+module Index(B : Orderings.Blob) = struct
+  module U = FoUtils.Utils(B)
 
   module ClauseOT =
     struct 
@@ -79,4 +79,20 @@ module Index(B : Terms.Blob) = struct
       type dataset = ClauseSet.t
     = Make(FotermIndexable)(ClauseSet)
 
+  let index_unit_clause t = function
+    | (_,Terms.Equation (l,_,_,Terms.Gt),_,_) as c -> 
+          DT.index t l (Terms.Left2Right, c)
+    | (_,Terms.Equation (_,r,_,Terms.Lt),_,_) as c -> 
+          DT.index t r (Terms.Right2Left, c)
+    | (_,Terms.Equation (l,r,_,Terms.Incomparable),_,_) as c ->  
+          DT.index  
+           (DT.index t l (Terms.Left2Right, c))
+           r (Terms.Right2Left, c)
+    | (_,Terms.Equation (_,r,_,Terms.Eq),_,_)  -> assert false
+    | (_,Terms.Predicate p,_,_) as c ->
+          DT.index t p (Terms.Nodir, c)
+  ;;
+
+  type active_set = B.t Terms.unit_clause list * DT.t
+
 end