An OCaml implementation of Olivier Carton's Langages formels, Calculabilité, Complexité.
The lib/rational_language folder is about the first chapter of the book, Rational languages, in the following order:
-
words.mlcontains definitions and algorithms related to words, periods and morphisms. For instance,guibas_odlyzko wimplements Guidas-Odlyzko's theorem by returning a wordw'on the binary alphabet with the same periods ofw. -
re.mldefines rational expressions and implements a couple of algorithms related. -
auto.mldefines theautotype and multiple functions to implement all possible NFAs. It mainly serves as an abstraction used forauto_alg.ml. -
auto_algdefines many algorithms on automata.