package smtml

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

Statistics Module. This module defines types and utilities for managing and manipulating solver statistics, including merging and pretty-printing.

Entry Types

type entry = [
  1. | `Int of int
    (*

    An integer statistic entry.

    *)
  2. | `Float of float
    (*

    A floating-point statistic entry.

    *)
]

The type entry represents a single statistic entry, which can be either an integer or a floating-point number.

Statistics Map

module Map : Smtml_prelude.Map.S with type key = string

Map is a module for managing statistics as a map from string keys to statistic entries.

type t = entry Map.t

The type t represents a collection of statistics as a map from string keys to statistic entries.

Merging and Aggregation

val sum_entries : entry -> entry -> entry

sum_entries e1 e2 sums two statistic entries e1 and e2. If both entries are integers, the result is an integer. If either entry is a float, the result is a float.

val merge : t -> t -> t

merge t1 t2 merges two statistics maps t1 and t2. If a key exists in both maps, the corresponding entries are summed using sum_entries.

Pretty Printing

val pp_entry : entry Fmt.t

pp_entry fmt entry pretty-prints a single statistic entry entry using the formatter fmt.

val pp : t Fmt.t

pp fmt stats pretty-prints the statistics map stats using the formatter fmt.

OCaml

Innovation. Community. Security.