]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/ng_paramodulation/index.ml
snaphost: supright almost done
[helm.git] / helm / software / components / ng_paramodulation / index.ml
index ca30c9b504ef126f72620205c5f2b586e949783c..6c26e7b86ab82cfeab8996b743d076bd614560f3 100644 (file)
@@ -79,4 +79,18 @@ 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)
+  ;;
+
 end