]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/paramodulation/utils.ml
fixed a finalization issue for connections closed twice
[helm.git] / helm / ocaml / paramodulation / utils.ml
index f2ece4baa9f8478716212d4bf13e89d42b5b40ff..c1c9086de1ccf4db4570125ea0f2963bcfd1495f 100644 (file)
@@ -107,8 +107,10 @@ let compute_equality_weight ty left right =
 (*     metasw := List.fold_left (fun s (i, _) -> IntSet.add i s) !metasw m; *)
     w
   in
-  (weight_of ty) + (weight_of left) + (weight_of right) +
-    !metasw
+  (* Warning: the following let cannot be expanded since it forces the
+     right evaluation order!!!! *)
+  let w = (weight_of ty) + (weight_of left) + (weight_of right) in
+  w + !metasw
 (*     (4 * IntSet.cardinal !metasw) *)
 ;;