@@ -123,7 +123,7 @@ module SyntacticDependencyGraph = struct
123
123
124
124
let default_pp = ref CudfAdd. default_pp
125
125
126
- module G = Imperative.Digraph. ConcreteBidirectionalLabeled (PkgV )(PkgE )
126
+ module G = Imperative.Digraph. ConcreteLabeled (PkgV )(PkgE )
127
127
module DotPrinter = struct
128
128
module Display = struct
129
129
include G
715
715
716
716
(* *****************************************************)
717
717
718
- (* * Integer Imperative Bidirectional Graph *)
718
+ (* * Integer Imperative Bidirectional Graph. Mainly used in Strong Conflicts *)
719
719
module IntPkgGraph = struct
720
720
721
721
module PkgV = struct
@@ -725,7 +725,7 @@ module IntPkgGraph = struct
725
725
let equal = (= )
726
726
end
727
727
728
- module G = Imperative.Digraph. ConcreteBidirectional (PkgV )
728
+ module G = Imperative.Digraph. Concrete (PkgV )
729
729
module S = Set. Make (PkgV )
730
730
module O = GraphOper (G )
731
731
@@ -765,40 +765,17 @@ module IntPkgGraph = struct
765
765
end
766
766
)
767
767
768
- let add_edge transitive graph i j =
769
- let rec adapt k red =
770
- let new_red =
771
- S. fold (fun l acc ->
772
- if k <> l then G. add_edge graph k l;
773
- G. fold_succ (fun m acc' ->
774
- if not (G. mem_edge graph k m)
775
- then S. add m acc'
776
- else acc'
777
- ) graph l acc
778
- ) red S. empty
779
- in
780
- if S. is_empty new_red then ()
781
- else adapt k new_red
782
- in
783
- begin
768
+ let add_edge graph i j =
784
769
debug " Adding edge from %d to %d" i j;
785
- G. add_edge graph i j;
786
- if transitive then begin
787
- adapt i (S. singleton j);
788
- G. iter_pred (fun k ->
789
- if not (G. mem_edge graph k j) then
790
- adapt k (S. singleton j)
791
- ) graph i
792
- end
793
- end
770
+ G. add_edge graph i j
794
771
795
772
(* * add to the graph all conjunctive dependencies of package id *)
796
- let conjdepgraph_int ?( transitive = false ) graph univ id =
773
+ let conjdepgraph_int graph univ id =
797
774
G. add_vertex graph id;
798
775
let p = CudfAdd. inttovar univ id in
799
776
List. iter (fun vpkgs ->
800
777
match CudfAdd. resolve_vpkgs_int univ vpkgs with
801
- | [q] when q <> id -> add_edge transitive graph id q
778
+ | [q] when q <> id -> add_edge graph id q
802
779
| _ -> ()
803
780
) p.Cudf. depends
804
781
0 commit comments