👋 Hi there! I'm Justin Woodring!
I built DFAify as a hobby project to allow users to model and inspect the behaviour of basic DFAs. DFAify is a diagramming and graphical analysis tool supporting playback and stepping logic for DFAs.
If you really love DFAify consider supporting me! 💵 paypal.me/jwoodrg
If you just want to use DFAify, I recommend taking a look at the releases.
But if you're curious here's how you build from the source:
- Install JDK 17, I recommend Adoptium's builds.
- Clone this repo.
- Run
./gradlew runon Linux and Mac or.\gradlew.bat runon Windows - Done! 🥳
DFAs are expressed in a very simple xml format. Here's a sample:
<dfa>
<state name="EVEN A" ref="even" entry="true" final="true">
<conn to="odd" takes="a"/>
<conn to="even" takes="b"/>
</state>
<state name="ODD A" ref="odd" entry="false" final="false">
<conn to="even" takes="a"/>
<conn to="odd" takes="b"/>
</state>
</dfa>Rules:
- A DFA XML documents begins with a
<dfa>and ends with a</dfa> - A DFA must have at least one
<state>. - Each
<state>must be an child of the dfa root element. - Each
<state>has anameattribute which will be displayed when they are rendered. - Each
<state>has arefattribute which is how you will reference other states in their connections or<conn>tags.refattributes must hold unique values.
- Each
<state>has aentryattribute which is boolean flag indicating whether that state is the DFA's entry point.- There must one and only one
entryattribute flagged astrue
- There must one and only one
- Each
<state>has afinalattribute declaring whether that state is a final state or not.- You can any number of final states including zero.
- Each
<conn>tag must be a child of a state element. - Each
<conn>has atoattribute which takes the value of arefattribute on a<state> - Each
<conn>has atakesattribute takes a character which represents the transition character to another<state>- Each
<conn>cannot have another sibling<conn>which has the sametakesattribute.
- Each
- All attributes are not optional.
Save this file with an .xml extension. And open it up in DFAify.

