package grenier

  1. Overview
  2. Docs
A collection of various algorithms in OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

grenier-0.13.tbz
sha256=04831d5c2ea783d4e32b356a8495e5481ce8919aa70f5eecee29baebbf6fa483
sha512=1199122ab70701ecd33bf9c6339a743d163a1ba3ef5d0db189cab6c6712386739031b66002bf48d4740112430a93780f82dc37f56688ee33f99da928186b8205

doc/grenier.valmari/Valmari/module-type-INPUT/index.html

Module type Valmari.INPUTSource

include DFA
Sourcetype states

The set of DFA nodes

Sourcetype transitions

The set of DFA transitions

Sourcetype label

The type of labels that annotate transitions

Get the label associated with a transition

Get the source state of the transition

Get the target state of the transition

Sourceval initials : (states Strong.Finite.elt -> unit) -> unit

Iterate on initial states

Sourceval finals : (states Strong.Finite.elt -> unit) -> unit

Iterate final states

Sourceval refinements : refine:(iter:((states Strong.Finite.elt -> unit) -> unit) -> unit) -> unit

The minimization algorithms operate on a DFA plus an optional initial refinement (state that must be distinguished, because of some external properties not observable from the labelled transitions alone).

If no refinements are needed, the minimum implementation is just: let refinements ~refine:_ = ()

Otherwise, the refinements function should invoke the refine function for each set of equivalent states and call the iter for each equivalent state.

E.g if our automata has 5 states, and states 2 and 3 have tag A while states 4 and 5 have tag B, we will do:

let refinements ~refine = refine (fun ~iter -> iter 2; 3); refine (fun ~iter -> iter 4; 5)

OCaml

Innovation. Community. Security.