]> matita.cs.unibo.it Git - helm.git/blobdiff - components/metadata/metadataConstraints.ml
Set of Set of uri added.
[helm.git] / components / metadata / metadataConstraints.ml
index 6c373f18036677cf454d256fd79e264f2161a49e..d7192bd7e75e12c65f1c0d12922ec6e5e3f31673 100644 (file)
@@ -626,8 +626,10 @@ let sigmatch ~(dbd:HMysql.dbd) ?(facts=false) ?(where = `Conclusion)
       let subsets = power_upto just_factor constants in
       (* let _ = prerr_endline (("subsets: ")^
         (string_of_int (List.length subsets))) in *)
-      let types_no = List.length types in
-      List.map (function (n,l) -> (n+types_no,types@l)) subsets
+      let types_no = List.length types in 
+       if types_no > 0 then  
+          List.map (function (n,l) -> (n+types_no,types@l)) subsets
+       else subsets
     in
     prerr_endline ("critical_value exceded..." ^ string_of_int constants_no);
     let all_constants = 
@@ -636,14 +638,16 @@ let sigmatch ~(dbd:HMysql.dbd) ?(facts=false) ?(where = `Conclusion)
     in
      compute_with_only ~dbd ~where main subsets all_constants
   else
+    (prerr_endline ("all subsets..." ^ string_of_int constants_no);
     let subsets = 
       let subsets = power constants in
       let types_no = List.length types in
        if types_no > 0 then  
         (0,[]) :: List.map (function (n,l) -> (n+types_no,types@l)) subsets
        else subsets
-      in
-       compute_exactly ~dbd ~facts ~where main subsets
+    in
+       prerr_endline "fine1";
+       compute_exactly ~dbd ~facts ~where main subsets)
 
   (* match query wrappers *)