package graphlib

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

A solution to a system of fixed-point equations.

We represent the solution to a system of fixed-point equations as a pair of a finite mapping M that associates a variable (a node) with its value, and a default value, that is a value of all variables that are not in M.

type ('n, 'd) t

an abstract representation of a solution

val create : ('n, 'd, _) Core_kernel.Std.Map.t -> 'd -> ('n, 'd) t

create constraints init creates an initial approximation of a solution. The init parameters defines the initial value of all variables unspecified in the initial constraint.

  • parameter constraints

    a finite mapping from variables to their value approximations.

    For the returned value s the following is true:

    • not(is_fixpoint s)
    • iterations s = 0
    • get s x = constraints[x] if x in constraints else init
val iterations : ('n, 'd) t -> int

iterations s returns the total number of iterations that was made to obtain the current solution.

val is_fixpoint : ('n, 'd) t -> bool

is_fixpoint s is true if the solution is a fixed point solution, i.e., is a solution that stabilizes the system of equations.

val get : ('n, 'd) t -> 'n -> 'd

get s x returns a value of x.

OCaml

Innovation. Community. Security.