Automata-based programming is a computer programming paradigm that treats sections of the program as finite automata. Each automaton can take one "step" at a time, and the execution of the program is broken down into individual steps. The steps communicate with each other by changing the value of a variable representing "the state," and control flow of the program is determined by the value of that variable.
The "state" variable can be a simple enum data type, but more complex data structures may be used. A common technique is to create a state transition table, a two-dimensional array comprising rows representing every possible state, and columns representing input parameter. The value of the table where the row and column meet is the next state the machine should transition to if both conditions are met.