module Depsolver:sig
..end
type
solver
val load : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list ->
Cudf.universe -> solver
val is_consistent : Cudf.universe -> Algo.Diagnostic.diagnosis
val edos_install : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list ->
Cudf.universe -> Cudf.package -> Algo.Diagnostic.diagnosis
Packages marked as `Keep_package must be always installed.
val edos_coinstall : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list ->
Cudf.universe -> Cudf.package list -> Algo.Diagnostic.diagnosis
val edos_coinstall_prod : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list ->
Cudf.universe -> Cudf.package list list -> Algo.Diagnostic.diagnosis list
val trim : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list ->
Cudf.universe -> Cudf.universe
val trimlist : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list ->
Cudf.universe -> Cudf.package list -> Cudf.package list
val find_broken : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list ->
Cudf.universe -> Cudf.package list
val find_installable : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list ->
Cudf.universe -> Cudf.package list
val find_listbroken : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list ->
Cudf.universe -> Cudf.package list -> Cudf.package list
val find_listinstallable : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list ->
Cudf.universe -> Cudf.package list -> Cudf.package list
val univcheck : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list ->
?callback:(Algo.Diagnostic.diagnosis -> unit) ->
?explain:bool -> 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.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.val univcheck_lowmem : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list ->
?callback:(Algo.Diagnostic.diagnosis -> unit) ->
?explain:bool -> Cudf.universe -> int
val listcheck : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list ->
?callback:(Algo.Diagnostic.diagnosis -> unit) ->
?explain:bool -> Cudf.universe -> Cudf.package list -> int
listcheck ~callback:c subuniverse l
check if all packages in l
can be
installed.
Invariant : l is a subset of universe can be installed in the solver universe.
It is responsability of the user to pass listcheck an appropriate subuniverse`
Returns the number of broken packages
callback
: : execute a function for each package.val dependency_closure : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list ->
?maxdepth:int ->
?conjunctive:bool -> Cudf.universe -> Cudf.package list -> Cudf.package list
dependency_closure index l
return the union of the dependency closure of
all packages in l
.maxdepth
: the maximum cone depth (infinite by default)conjunctive
: consider only conjunctive dependencies (false by default)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:(Cudf_types.vpkglist * Cudf.package list) list ->
?enc:enc -> Cudf.universe -> string
output_clauses enc univ
return a string encoded accordingly to enc
(default cnf).typedepclean_result =
Cudf.package *
(Cudf_types.vpkglist * Cudf_types.vpkg * Cudf.package list) list *
(Cudf_types.vpkg * Cudf.package list) list
val depclean : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list ->
?callback:(depclean_result -> unit) ->
Cudf.universe -> Cudf.package list -> depclean_result list
p
in packagelist
, depclean univ packagelist
detect
redundundant dependencies that refer to packages that are either missing
or not co-installable together with the root package p
type
solver_result =
| |
Sat of |
| |
Unsat of |
| |
Error of |
val dummy_request : Cudf.package
val check_request : ?cmd:string ->
?criteria:string ->
?dummy:Cudf.package ->
?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) ->
?criteria:string ->
?dummy:Cudf.package ->
?explain:bool -> Cudf.cudf -> solver_result
check_request
, but allows to specify any function to call the
external solver. It should raise Depsolver.Unsat
on failure.val installation_graph : solution:Cudf.universe ->
Common.CudfAdd.Cudf_set.t * Common.CudfAdd.Cudf_set.t ->
Defaultgraphs.ActionGraph.G.t