module Depsolver_int:sig
..end
This module contains two type of functions. Normal functions work on a cudf universe. These are just a wrapper to _cache functions.
_cache functions work on a pool of ids that is a more compact
representation of a cudf universe based on arrays of integers.
_cache function can be used to avoid recreating the pool for each
operation and therefore speed up operations.
module R:sig
..end
module S:Common.EdosSolver.T
with module X = R
type
solver = {
|
constraints : |
(* |
the sat problem
| *) |
|
map : |
(* |
a map from cudf package ids to solver ids
| *) |
|
globalid : |
(* |
(keep_constrains,global_constrains),gui) where
gid is the last index of the cudfpool. Used to encode
a 'dummy' package and to enforce global constraints.
keep_constrains and global_constrains are true if either
keep_constrains or global_constrains are enforceble.
| *) |
typeglobal_constraints =
(Cudf_types.vpkglist * int list) list
typedep_t =
(Cudf_types.vpkg list * int list) list * (Cudf_types.vpkg * int list) list
pool_t
is an array where each index
is an solver variable and the content of the array associates
cudf dependencies to a list of solver varialbles representing
a packagetypepool =
dep_t array
typet =
[ `CudfPool of bool * pool
| `SolverPool of pool ]
type
result =
| |
Success of |
(* |
return a function providing the list of the
cudf packages belonging to the installation set
| *) |
| |
Failure of |
(* |
return a function with the
failure explanations
| *) |
val init_pool_univ : global_constraints:global_constraints ->
Cudf.universe -> [> `CudfPool of bool * pool ]
CudfPool
.
We assume that cudf uid are sequential and we can use them as an array indexval init_solver_pool : Common.Util.projection ->
[< `CudfPool of bool * pool ] ->
'a list -> [> `SolverPool of pool ]
SolverPool
val init_solver_cache : ?buffer:bool ->
?explain:bool ->
[< `SolverPool of pool ] -> S.state
SolverPool
val solve : ?tested:bool array ->
explain:bool ->
solver ->
Algo.Diagnostic.request_int -> Algo.Diagnostic.result_int
val pkgcheck : (Algo.Diagnostic.result_int * Algo.Diagnostic.request_int -> 'a) option ->
bool -> solver -> bool array -> int -> bool
val init_solver_univ : global_constraints:global_constraints ->
?buffer:bool -> ?explain:bool -> Cudf.universe -> solver
buffer
: debug buffer to print out debug messagesval init_solver_closure : global_constraints:global_constraints ->
?buffer:bool ->
[< `CudfPool of bool * pool ] ->
int list -> solver
buffer
: debug buffer to print out debug messagesval copy_solver : solver -> solver
val reverse_dependencies : Cudf.universe -> int list array
reverse_dependencies index
return an array that associates to a package id
i
the list of all packages ids that have a dependency on i
.val dependency_closure_cache : ?maxdepth:int ->
?conjunctive:bool ->
[< `CudfPool of bool * pool ] ->
int list -> S.var list
val reverse_dependency_closure : ?maxdepth:int -> int list array -> int list -> int list
maxdepth
: the maximum cone depth (infinite by default)val progressbar_init : Common.Util.Progress.t
val progressbar_univcheck : Common.Util.Progress.t