package dolmen

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
Usual definitions
type t = ty

The type of types.

type subst = (ty_var, ty) Subst.t

The type of substitutions over types.

type 'a tag = 'a Tag.t

A type for tags to attach to arbitrary types.

val hash : t -> int

A hash function for types, should be suitable to create hashtables.

val equal : t -> t -> bool

An equality function on types. Should be compatible with the hash function.

val compare : t -> t -> int

Comparison function over types. Should be compativle with the equality function.

val print : Format.formatter -> t -> unit

Printing function.

View
type view = [
  1. | `Int
    (*

    Integers

    *)
  2. | `Rat
    (*

    Rationals

    *)
  3. | `Real
    (*

    Reals

    *)
  4. | `Array of ty * ty
    (*

    Function arrays, from source to destination type.

    *)
  5. | `Bitv of int
    (*

    Bitvectors of fixed length.

    *)
  6. | `Float of int * int
    (*

    Floating points.

    *)
  7. | `String
    (*

    Strings

    *)
  8. | `String_reg_lang
    (*

    Regular languages over strings

    *)
  9. | `Var of ty_var
    (*

    Variables

    *)
  10. | `App of [ `Generic of ty_const | `Builtin of builtin ] * ty list
    (*

    Generic applications.

    *)
]

View on types.

val view : t -> view

View on types.

Type structure definition
type adt_case = {
  1. cstr : term_const;
  2. tester : term_const;
  3. dstrs : term_const option array;
}

One case of an algebraic datatype definition.

type def =
  1. | Abstract
  2. | Adt of {
    1. ty : ty_const;
    2. record : bool;
    3. cases : adt_case array;
    }

The various ways to define a type inside the solver.

val define : ty_const -> def -> unit

Register a type definition.

val definition : ty_const -> def option

Return the definition of a type (if it exists).

Variables and constants
module Var : sig ... end

A module for variables that occur in types.

module Const : sig ... end

A module for constant symbols the occur in types.

val prop : t

The type of propositions

val bool : t

Alias for prop.

val unit : t

The unit type.

val base : t

An arbitrary type.

val int : t

The type of integers

val rat : t

The type of rationals

val real : t

The type of reals.

val string : t

The type of strings

val string_reg_lang : t

The type of regular language over strings.

val wildcard : unit -> t

Type wildcard

val as_ : t -> Var.t -> t

Add a pattern ascription to a type.

val of_var : Var.t -> t

Create a type from a variable.

val apply : Const.t -> t list -> t

Application for types.

val array : t -> t -> t

Build an array type from source to destination types.

val bitv : int -> t

Bitvectors of a given length.

val float : int -> int -> t

Floating point of given exponent and significand.

val roundingMode : t
val tag : t -> 'a tag -> 'a -> unit

Annotate the given type with the given tag and value.

val get_tag : t -> 'a tag -> 'a list

Return the list of value associated to the tag.

val get_tag_last : t -> 'a tag -> 'a option

Return the last value associated to the tag (if any).

val subst : ?fix:bool -> subst -> t -> t

Substitution on types.

OCaml

Innovation. Community. Security.