]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/ng_paramodulation/foUtils.ml
Invert dependencies between baseuris (files) are now stored in the db.
[helm.git] / helm / software / components / ng_paramodulation / foUtils.ml
index 624b6c99cf3a842fb791a1a552245a61cfcc2c03..f56cccd89933b5dde4a4da6b434fb5b9c9312a39 100644 (file)
@@ -20,9 +20,14 @@ let rec lexicograph f l1 l2 =
   | [],_ -> ~-1
   | _,[] -> 1
 ;;
+  
+let mk_id = 
+  let id = ref 0 in
+  fun () -> incr id; !id
+;;
 
 module Utils (B : Terms.Blob) = struct
-  module Subst = FoSubst.Subst(B) ;;
+        module Subst = FoSubst;; (*.Subst(B) ;;*)
   module Order = Orderings.Orderings(B) ;;
 
   let rec eq_foterm x y =
@@ -102,11 +107,6 @@ module Utils (B : Terms.Blob) = struct
   ;;
 
   (* may be moved inside the bag *)
-  let mk_id = 
-    let id = ref 0 in
-    fun () -> incr id; !id
-  ;;
-
   let mk_unit_clause maxvar ty proofterm =
     let varlist =
       let rec aux acc = function
@@ -136,4 +136,13 @@ module Utils (B : Terms.Blob) = struct
     
   let empty_bag = Terms.M.empty ;;
 
+  let mk_passive_clause cl =
+    (Order.compute_unit_clause_weight cl, cl)
+  ;;
+
+  let compare_passive_clauses (w1,(id1,_,_,_)) (w2,(id2,_,_,_)) =
+    if w1 = w2 then id1 - id2
+    else w1 - w2
+  ;;
+
 end