Lang.PrimesPrimes benchmark — unbounded natural-number WFA.
A 2-state WFA over a 4-letter alphabet {a, b, c, d} where each letter is associated with a distinct prime p: reading letter x in the second state multiplies by its prime. The language maps a word to the product of the primes of its letters. Used to exercise the learner on a multi-letter alphabet with unbounded Nat weights.
module S : sig ... endmodule Matrix : sig ... endmodule Aut : sig ... endval alpha : (Automata.Char.t, Automata.Char.comparator_witness) Base.Set.tval zipped : (Automata.Char.t * int) Base.List.tval aut : Aut.tThe target automaton: 2 states. For each letter x with associated prime p, the transition matrix is [1;0];[1;p], encoding a "multiply by p" operation on the second component.
val out : Automata.Word.t -> Aut.s