]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/metadata/metadataDeps.ml
Bug fixed: if the context of a sequent was empty a vertical box without content
[helm.git] / helm / software / components / metadata / metadataDeps.ml
index b393dbb91a8f0f0a3ca74983758e386c02738c3a..f2b1d049644cb72e589e5f86a6a8d4e2c9c74c80 100644 (file)
@@ -91,6 +91,16 @@ let inverse_deps ~dbd uri =
   do_query (MetadataTypes.obj_tbl ())
     @ do_query MetadataTypes.library_obj_tbl
 
+let topological_sort ~dbd uris =
+ let module OrderedUri =
+  struct
+   type t = UriManager.uri
+   let compare = UriManager.compare
+  end in
+ let module Topo = HTopoSort.Make(OrderedUri) in
+  Topo.topological_sort uris
+   (fun uri -> fst (List.split (direct_deps ~dbd uri)))
+
 module DepGraph =
 struct
   module UriTbl = UriManager.UriHashtbl