Legend:
Library
Module
Module type
Parameter
Class
Class type
Dependency solver. Low Level API
Implementation of the EDOS algorithms (and more). This module respects the cudf semantic.
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.
(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.
*)
}
internal state of the sat solver. The map allows to transform sat solver variables (that must be contiguous) to integers representing the id of a package
Solver Package Pool. 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 package
A pool can either be a low level representation of the universe where all integers are interpreted as solver variables or a universe where all integers are interpreted as cudf package indentifiers. The boolean associate to the cudfpool is true if keep_constrains are present in the universe. The last index of the pool is the globalid
type result =
| Successofunit ->int list
(*
return a function providing the list of the cudf packages belonging to the installation set
Given a cudf universe , this function returns a CudfPool. We assume that cudf uid are sequential and we can use them as an array index. The last index of the pool is the globalid.
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.
parametermdf
the package universe
val dependency_closure_cache :
?maxdepth:int ->?conjunctive:bool ->[< `CudfPool of bool * pool ]->int list->int list
dependency_closure_cache pool l return the union of the dependency closure of all packages in l in the given pool of packages. The result always contains the globalid.
parametermaxdepth
the maximum cone depth (infinite by default)
parameterconjunctive
consider only conjunctive dependencies (false by default)
val reverse_dependency_closure :
?maxdepth:int ->int list array->int list->int list
return the dependency closure of the reverse dependency graph. The visit is bfs.