package opam-solver

  1. Overview
  2. Docs

Various implementations of the low-level CUDF resolution, most of them relying on external solvers (aspcud, etc.). Used for calling-back below Dose.

include module type of struct include OpamCudfSolverSig end
type criteria_def = OpamCudfSolverSig.criteria_def = {
  1. crit_default : string;
  2. crit_upgrade : string;
  3. crit_fixup : string;
  4. crit_best_effort_prefix : string option;
exception Timeout of (Cudf.preamble option * Cudf.universe) option

Timeout might still return a non-optimal solution

module type S = OpamCudfSolverSig.S
module Aspcud : S
module Aspcud_old : S
module Mccs : S
module Packup : S
val default_solver_selection : (module S) list

The list of supported solvers, in decreasing order of preference

val custom_solver : OpamTypes.arg list -> (module S)

Generates a custom solver implementation from a user command. Contains some magic:

  • if the command matches one of the predefined ones, the default criteria are taken from there
  • if the command is a singleton and matches, it is expanded similarly from the pre-defined solvers
val solver_of_string : string -> (module S)

Like custom_solver, but takes a simple command as a string

val get_solver : ?internal:bool -> (module S) list -> (module S)

Gets the first present solver from the list. Exits with error if none was found.

val has_builtin_solver : unit -> bool
val get_name : (module S) -> string

Gets the full solver name with params