Module Depsolver

module Depsolver: sig .. end
Dependency solver. Implementation of the Edos algorithms

type solver 
the solver is an abstract data type associated to a universe
val load : ?check:bool -> Cudf.universe -> solver
initialize the solver. If check is true (default), then check for universe consistency (cf. Cudf_checker.is_consistent)
val result : Depsolver_int.identity ->
Cudf.universe -> Diagnostic_int.result -> Diagnostic.result
Turn a result from Diagnostic_int into one of Diagnostic
val request : Cudf.universe -> Diagnostic_int.request -> Diagnostic.request
Turn a request from Diagnostic_int into one of Diagnostic
val edos_install : ?global_constraints:bool ->
Cudf.universe -> Cudf.package -> Diagnostic.diagnosis
check if the given package can be installed in the universe
global_constraints : : enforce global constraints on the given universe. In particular packages marked as `Keep_package must be always installed. Default false.
val edos_coinstall : ?global_constraints:bool ->
Cudf.universe -> Cudf.package list -> Diagnostic.diagnosis
check if the give package list can be installed in the universe
global_constraints : : enforce global constraints on the given universe. In particular packages marked as `Keep_package must be always installed. Default false.
val edos_coinstall_prod : ?global_constraints:bool ->
Cudf.universe -> Cudf.package list list -> Diagnostic.diagnosis list
accept a list of list of packages and return the coinstallability test of the cartesian product.
val trim : ?global_constraints:bool -> Cudf.universe -> Cudf.universe
remove uninstallable packages from the universe . global_constraints is true by default
val find_broken : ?global_constraints:bool -> Cudf.universe -> Cudf.package list
return the list of broken packages
val find_installable : ?global_constraints:bool -> Cudf.universe -> Cudf.package list
return the list of installable packages
val find_listbroken : ?global_constraints:bool ->
Cudf.universe -> Cudf.package list -> Cudf.package list
return the list of broken packages
val find_listinstallable : ?global_constraints:bool ->
Cudf.universe -> Cudf.package list -> Cudf.package list
return the list of installable packages
val univcheck : ?global_constraints:bool ->
?callback:(Diagnostic.diagnosis -> unit) -> Cudf.universe -> int
univcheck check if all packages in the universe can be installed. Since not all packages are directly tested for installation, if a packages is installable, the installation might be empty. To obtain an installation set for each installable packages, the correct procedure is to iter on the list of packages.
Returns the number of broken packages
global_constraints : : enforce global constraints on the given universe. In particular packages marked as `Keep_package must be always installed. Default true.
callback : : execute a function for each package. This function can have side effects and can be used to collect the installation set or the failure reason.

listcheck ~callback:c solver l check if all packages in l can be installed.

Invariant : l is a subset of universe can be installed in the solver universe.

val listcheck : ?global_constraints:bool ->
?callback:(Diagnostic.diagnosis -> unit) ->
Cudf.universe -> Cudf.package list -> int
val dependency_closure : ?maxdepth:int ->
?conjunctive:bool -> Cudf.universe -> Cudf.package list -> Cudf.package list
dependency_closure universe l compute the dependencies closure of the give package list. Invariant : l must be a subset of universe
val reverse_dependencies : Cudf.universe -> Cudf.package list Common.CudfAdd.Cudf_hashtbl.t
reverse_dependencies univ compute the reverse dependency list of all packages in the universe univ
val reverse_dependency_closure : ?maxdepth:int -> Cudf.universe -> Cudf.package list -> Cudf.package list
reverse_dependencies_closure univ compute the reverse dependency list of all packages in l in the universe univ
type enc = 
| Cnf
| Dimacs
val output_clauses : ?global_constraints:bool -> ?enc:enc -> Cudf.universe -> string
output_clauses enc univ return a string encoded accordingly to enc (default cnf).
global_constraints : : enforce global constraints on the given universe.
type solver_result = 
| Sat of (Cudf.preamble option * Cudf.universe)
| Unsat of Diagnostic.diagnosis option
| Error of string
val check_request : ?cmd:string ->
?callback:(int array * Diagnostic.diagnosis -> unit) ->
?criteria:string -> ?explain:bool -> Cudf.cudf -> solver_result
check_request check if there exists a solution for the give cudf document if ?cmd is specified, it will be used to call an external cudf solver to satisfy the request. if ?criteria is specified it will be used as optimization criteria. if ?explain is specified and there is no solution for the give request, the result will contain the failure reason.
val check_request_using : ?call_solver:(Cudf.cudf -> Cudf.preamble option * Cudf.universe) ->
?callback:(int array * Diagnostic.diagnosis -> unit) ->
?criteria:string -> ?explain:bool -> Cudf.cudf -> solver_result
Same as check_request, but allows to specify any function to call the external solver. It should raise Depsolver.Unsat on failure