Part of my goal with this blog is to write about the Ubuntu experience, I’m still working on a wireless writeup but it keeps getting pushed back because everyone knows about Ubuntu wireless. I’m a student at the University of Toronto, and I’m currently taking CSC363 — Computability and Complexity. Anyways I’m doing my first assignment and the first question is to draw a finite state machine. My problem was that I would draw the finite state machine and the figure out that I missed some special case and have to re draw it. Getting frustrated I fired up synaptic and searched for (finite stat machine), synaptic returns four results but the one that catches my eye is graphviz, partly because it has the ubuntu logo beside it meaning its an officially supported package like gaim (anyone find a link to support this, I cant), and partly because of its decryption “rich set of graph drawing tools”. I install it and it all goes well, and then i do what I always do after I install a program, I run it.
I type “graphviz” into the terminal and nothing happens. Well thats weird usualy I can just run programs based off the names I installed them with. I go back to synaptic and check that its installed correctly which it is. So skip to the bottom of the description below and it turns out that graphviz website, all the time that I’m doing this my buddy is sitting beside me trying to find a windows program to draw finite state machines.
Heading over to the website it turns out that they have some great examples of finite state machines and the “source code” that was used to make them. It is at about this time that my buddy finds JFLAP and starts to download it, you have to fill out a bunch of information before you can. A bit more searching on that website and I learn that I can “compile” that source code code to a png image with the following command “ccomps -x fsm.dot | dot | gvpack | neato -s -n2 -Tpng > fsm.png”
Now as a side note the nifty thing is that JFLAP (the program my buddy found) is a jar file so we should be able to run it on linux, while I continued to use graphviz to do my assignment because I liked to type up the finite state machine and then compile it, if you want to test your finite state machine you may want to look into using JFLAP.
After I get my assignment back Ill post my finite state machine and its source if there is interest.