package smtml

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

Parameter Management Module. This module defines a type-safe interface for handling solver parameters, allowing configuration of options such as timeouts, model production, and parallel execution.

Parameter Types

type t

The type t represents a set of solver parameters.

type _ param =
  1. | Timeout : int param
    (*

    Specifies a timeout in milliseconds for each check call.

    *)
  2. | Model : bool param
    (*

    Enable or disable model production.

    *)
  3. | Unsat_core : bool param
    (*

    Enable or disable unsatisfiable core computation.

    *)
  4. | Ematching : bool param
    (*

    Enable or disable ematching.

    *)
  5. | Parallel : bool param
    (*

    Enable or disable parallel execution.

    *)
  6. | Num_threads : int param
    (*

    Specifies the maximum number of threads to use in parallel mode.

    *)

The type _ param represents a type-safe parameter, where the type parameter indicates the type of the parameter's value.

type param' =
  1. | P : 'a param * 'a -> param'

The type param' is a wrapper for storing parameter-value pairs.

Default Values

val default_value : 'a param -> 'a

default_value param returns the default value associated with the given parameter.

val default : unit -> t

default () returns a parameter set with default values for all parameters.

Parameter Manipulation

val ($) : t -> ('a param * 'a) -> t

Infix operator for setting a parameter.

params $ (param, value) updates the parameter set params by setting param to value.

val set : t -> 'a param -> 'a -> t

set params param value updates the parameter set params by setting param to value.

val opt : t -> 'a param -> 'a option -> t

opt params param opt_value conditionally updates the parameter set params. If opt_value is Some v, it sets param to v. Otherwise, params remains unchanged.

val get : t -> 'a param -> 'a

get params param retrieves the current value of param from the parameter set params.

Conversion

val to_list : t -> param' list

to_list params converts the parameter set params into a list of parameter-value pairs.

OCaml

Innovation. Community. Security.