|
1 | 1 | #automata |
2 | 2 | This is a kind of generic FSA implementation. |
3 | | -It was written to handle keystrokes, so there are no accepting states but each transition can trigger actions: |
| 3 | +It was written to handle keystrokes, so there are no accepting states |
| 4 | +but each transition can trigger actions: |
4 | 5 | - printing constant strings in the terminal:`print "hi!"` |
5 | 6 | - broadcasting the same kind of strings in UDP:`bc 2000 "HELLO EVERYONE"` |
6 | 7 |
|
7 | 8 | Combinators allow you prioritizing automata: |
8 | 9 | -`a < b` will produce`b`'s actions when`a` doesn't |
9 | 10 | -`a || b` will produce (at each step) actions from`a` and`b`, in this order |
10 | 11 |
|
11 | | -#Examples |
12 | | -##A cash register simulator |
| 12 | +##Tools |
| 13 | +-`server.ml` is a UDP server (for pranks, etc.) |
| 14 | +-`run.ml` is a combinator tester |
| 15 | +-`dot.ml` converts FSAs to graphs (see_Examples_ below) |
| 16 | + |
| 17 | +##Building |
| 18 | +``` |
| 19 | +opam install ocamlbuild menhir |
| 20 | +ocamlbuild -lib unix -use-menhir dot.byte run.byte server.byte |
| 21 | +``` |
| 22 | + |
| 23 | +##Examples |
| 24 | +###A cash register simulator |
13 | 25 | Running |
14 | 26 | ``` |
15 | 27 | ./dot.byte cashregister.aut |dot -Tpng >cashregister.png |
|