package dose3

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Dose_algo.DepsolverSource

Dependency solver. Implementation of the Edos algorithms

Sourcetype solver

the solver is an abstract data type associated to a universe

Sourceval load : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list -> Cudf.universe -> solver

initialize the solver.

check if the universe universe is consistent (all installed packages are coinstallable) This function is a wrapper of Cudf_checker.is_consistent.

Sourceval edos_install : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list -> Cudf.universe -> Cudf.package -> Diagnostic.diagnosis

check if the given package can be installed in the universe

Packages marked as `Keep_package must be always installed.

Sourceval edos_coinstall : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list -> Cudf.universe -> Cudf.package list -> Diagnostic.diagnosis

check if the give package list can be installed in the universe

Sourceval edos_coinstall_prod : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list -> 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.

Sourceval trim : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list -> Cudf.universe -> Cudf.universe

remove uninstallable packages from the universe .

Sourceval trimlist : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list -> Cudf.universe -> Cudf.package list -> Cudf.package list

remove uninstallable packages from the pkglist.

Sourceval find_broken : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list -> Cudf.universe -> Cudf.package list

return the list of broken packages.

Sourceval find_installable : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list -> Cudf.universe -> Cudf.package list

return the list of installable packages.

Sourceval find_listbroken : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list -> Cudf.universe -> Cudf.package list -> Cudf.package list

return the list of broken packages.

Sourceval find_listinstallable : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list -> Cudf.universe -> Cudf.package list -> Cudf.package list

return the list of installable packages.

Sourceval univcheck : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list -> ?callback:(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.

  • parameter 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.

  • returns

    the number of broken packages

Sourceval univcheck_lowmem : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list -> ?callback:(Diagnostic.diagnosis -> unit) -> ?explain:bool -> Cudf.universe -> int
Sourceval listcheck : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list -> ?callback:(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`

  • parameter callback

    : execute a function for each package.

  • returns

    the number of broken packages

Sourceval 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 .

  • parameter maxdepth

    the maximum cone depth (infinite by default)

  • parameter conjunctive

    consider only conjunctive dependencies (false by default)

  • parameter universe

    the package universe

  • parameter pkglist

    a subset of universe

reverse_dependencies univ compute the reverse dependency list of all packages in the universe univ

Sourceval 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

Sourcetype enc =
  1. | Cnf
  2. | Dimacs
Sourceval 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).

Sourcetype depclean_result = Cudf.package * (Cudf_types.vpkglist * Cudf_types.vpkg * Cudf.package list) list * (Cudf_types.vpkg * Cudf.package list) list

The result of the depclean function is a tuple containing a package, a list of dependencies that are redundant and a list of conflicts that are redundant

Sourceval depclean : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list -> ?callback:(depclean_result -> unit) -> Cudf.universe -> Cudf.package list -> depclean_result list

For each package 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

Sourcetype solver_result =
  1. | Sat of Cudf.preamble option * Cudf.universe
  2. | Unsat of Diagnostic.diagnosis option
  3. | Error of string
Sourceval dummy_request : Cudf.package

an empty package used to enforce global contraints on the request

Sourceval 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 ?dummy is specified, adds this dummy package to the user request. This parameter is used to encode a list of 'essential' packages that must always be installed in the solution alongside with the user request. 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.

Sourceval check_request_using : ?call_solver:(Cudf.cudf -> Cudf.preamble option * Cudf.universe) -> ?dummy:Cudf.package -> ?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.

Build the installation graph from a cudf solution universe and sets of packages to be installed/removed (see CudfAdd.make_summary)

OCaml

Innovation. Community. Security.