A simple and easy-to-use framework for creating automatons..
- Descriptive declarations
- Finite, Pushdown and Turing machine support.
- Implemented with breadth-first search for evaluate the tree of possibilities
The *.jar
file will be created at dist
directory.
ant -f build.xml
FState
: Finite StatePState
: Pushdown StateTState
: Turing machine State
DFARunner
: Deterministic Finite AutomatonNFARunner
: Non-Deterministic Finite AutomatonDPDARunner
: Deterministic Pushdown AutomatonNPDARunner
: Non-Deterministic Pushdown AutomatonDTMRunner
: Deterministic Turing Machine
For further understanding take a look at examples
tree.
- Define your states.
FState q0 = new FState("q0");
FState q1 = new FState("q1");
- Define your transitions.
q0.trans().when("1").goTo(q0);
q0.trans().when("0").goTo(q1);
q1.trans().when("1").when("0").goTo(q1);
- Create your test words.
Word word = new Word("111110000");
- Compute your string
DFARunner runner = new DFARunner(word, q0);
runner.compute();
- Do whatever you want with the result
System.out.println(runner.getResult().getState());
- DFA minimization?
- NFA to DFA conversion?
- More examples!