#automata #dfa #nfa #regex #gnfa


AUTOmata Utilities and Representation (AUTOUR) is a small toolbox to experiment with various kinds of automata and draw them

7 releases

0.1.6 Jun 4, 2023
0.1.5 Jun 3, 2023
0.1.3 May 20, 2023

#1086 in Algorithms

Download history 14/week @ 2023-08-15 1/week @ 2023-08-22 16/week @ 2023-08-29 21/week @ 2023-09-05 6/week @ 2023-09-12 2/week @ 2023-09-19 5/week @ 2023-09-26 3/week @ 2023-10-03 4/week @ 2023-10-10 5/week @ 2023-10-17 5/week @ 2023-10-24 11/week @ 2023-10-31 5/week @ 2023-11-07 6/week @ 2023-11-14 11/week @ 2023-11-21 33/week @ 2023-11-28

55 downloads per month



AUTOmata Utilities and Representation (AUTOUR)

Some processes / analyses built on top of the autour_core crate.

Word analysis Algorithm from NFA

An algorithm for analyzing words against a NFA that acts as a specification of expected behavior.

A word is analyzed from a certain set of starting states. In the example below we start from the start state of the automata and successfully empty the trace. Letters of the word are read one after the other while the current set of active states changes. Here the trace is successfully re-enacted and no deviations are observed.


In the case where the next letter to analyze cannot be read from the current active states, the analysis may fail as in the example below (depending on the parameterization of the algorithm).


It is possible to parameterize the algorithm so that we start, not from the initial state, but from a different start, to treat more specific scenarios.

specific start

In this spirit, we can perform resets when it becomes impossible to read the next letter during the analysis. Then, the analyzed word might not be recognized as accepted by the language but we can identify sub-words that can be recognized as such.

In the example below at one point in the analysis it is impossible to read the next letter. We perform a reset which means that we forget the state in which the system is and suppose it can be in any state (let us remark that we can configure which states are reset states (here all states are reset states)) A warning of the deviation is emitted and we may then continue the analysis from that point.


Even with resets, it is still possible to be stuck at one point during the analysis. This occurs when we try to read a letter which does not correspond to any outgoing transition from reset states.

The example below describes this case.

reset fail

To be able to continue the analysis, we may perform a skip i.e. ignoring the letter. In the example below it is done at the same time of the first reset.



~62K SLoC