/
opamSolver.mli
76 lines (60 loc) · 2.69 KB
/
opamSolver.mli
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
(**************************************************************************)
(* *)
(* Copyright 2012-2013 OCamlPro *)
(* Copyright 2012 INRIA *)
(* *)
(* All rights reserved.This file is distributed under the terms of the *)
(* GNU Lesser General Public License version 3.0 with linking *)
(* exception. *)
(* *)
(* OPAM is distributed in the hope that it will be useful, but WITHOUT *)
(* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *)
(* or FITNESS FOR A PARTICULAR PURPOSE.See the GNU General Public *)
(* License for more details. *)
(* *)
(**************************************************************************)
(** SAT-solver for package dependencies and conflicts *)
open OpamTypes
val empty_universe: universe
(** {2 Solver} *)
(** Convert a request to a string *)
val string_of_request: atom request -> string
(** Compute statistics about a solution *)
val stats: solution -> stats
(** Return the new packages in the solution *)
val new_packages: solution -> package_set
(** Pretty-printing of statistics *)
val string_of_stats: stats -> string
(** Is the solution empty ? *)
val solution_is_empty: solution -> bool
(** Does the solution implies deleting or updating a package *)
val delete_or_update : solution -> bool
(** Display a solution *)
val print_solution:
messages:(package -> string list) ->
rewrite:(package -> package) ->
solution -> unit
(** Given a description of packages, return a solution preserving the
consistency of the initial description. *)
val resolve :
?verbose:bool ->
universe -> requested:OpamPackage.Name.Set.t -> atom request -> (solution, string) result
(** Keep only the packages that are installable. *)
val installable: universe -> package_set
(** Return the topological sort of the transitive dependency closures
of a collection of packages.*)
val dependencies :
depopts:bool ->
installed:bool ->
universe ->
package_set ->
package list
(** Same as [dependencies] but for reverse dependencies *)
val reverse_dependencies :
depopts:bool ->
installed:bool ->
universe ->
package_set ->
package list
(** Create a sequential solution from a list of actions *)
val sequential_solution: package action list -> solution