package lrgrep
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=e53de12e4c5cbe6bca00643593266b4f9fa2e3f6a138195eeff7a4329f5c1c75
sha512=7fd7c4d11506fea7cc11c9bbf5aea9142d905643553c0c90e1bb16b794106b0c14a266acf89ae91b6929008dc0ba6515f788642873e2e4ba6c3d49bd45d25127
doc/valmari/Valmari/Minimize/argument-2-In/index.html
Parameter Minimize.In
include DFA with type label := Label.t
val states : states Fix.Indexing.cardinalThe set of DFA nodes
val transitions : transitions Fix.Indexing.cardinalThe set of DFA transitions
val label : transitions Fix.Indexing.index -> Label.tGet the label associated with a transition
val source : transitions Fix.Indexing.index -> states Fix.Indexing.indexGet the source state of the transition
val target : transitions Fix.Indexing.index -> states Fix.Indexing.indexGet the target state of the transition
val initials : (states Fix.Indexing.index -> unit) -> unitIterate on initial states
val finals : (states Fix.Indexing.index -> unit) -> unitIterate final states
val refinements :
((add:(states Fix.Indexing.index -> unit) -> unit) -> unit) ->
unitThe 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)