Next: , Up: test   [Contents][Index]


Format of Automaton File

Format of Automaton File

A deterministic finite automaton that models the environment is described in a text file, an example of which is shown below.

Non-empty line #1
Non-empty line #2
       ...
Non-empty line #n

2 5 3 0
1 0 0 0 0
1/3 2/4
2/1 1/2
0/4 1/0

All lines before the first empty line are ignored. The first line after that empty line has format

number_of_input_signals number_of_output_signals number_of_states initial_state_index

Indices of signals and states start from 0.

The second line after the empty line contains floating-point numbers, which are the increments in system spur for all output signals. Those increments take place when corresponding output signals are emitted by the automaton.

Starting from the third line after the empty line, there go descriptions of transitions between states upon receiving input signals. The third line corresponds to transitions from state 0, the fourth—from state 1, the fifth—from state 2, and so on. Each line contains number pairs that correspond to input signals. The first pair corresponds to input signal 0, the second—to input signal 1, the third—to input signal 2, and so on. A pair has format

target_state/output_signal

and specifies a transition from a source state to a target state triggered by an input signal, during which an output signal is emitted.