<br>
Thanks for the responses for my posting on my need to draw finite state<br>
machines. For example:<br><br>> > I am writing an open source project in Squeak for constructing<br>> > finite state machines from regular expressions. It contains<br>> > a large number of algorithms (I am comparing them to determine
<br>> > the best ones). To help me debug the FSM minimization algorithms<br>> > and for other reasons I want a package that can draw a finite state<br>> > machine<br>> > given the FSM as input.<br>
<br>> Just use the Graphviz package, available on SM. We use it in Gjallar btw<br>> and let it produce gifs (but it can produce lots of formats, including<br>> svg), <br>etc.<br><br>They have made clear that I have not explained my needs very well so
<br>allow me to expand further:<br><br>I need smalltalk (Squeak) code that when given a directed labeled graph (i.e. a <br>finite state machine) draws the graph nicely on a window pane within a <br>running smalltalk image (containing also my application).
<br>In addition, this window pane will have a text area where the user may<br>put text and then place the cursor anywhere within said text. <br><br>For text "abc.def", where the "." indicates the location of the cursor,
<br>my application will instruct the graph drawing package to add attributes <br>(attributes may be things like color, line thickness, bold text) <br>to the state that the FSM is in after reading input "abc" to indicate
<br>the current state of the FSM. <br>If the user moves the cursor (say to the right) my application will send<br>instructions to the graph drawing package to remove <br>the attributes of the previously current state ( "
abc.def") and add <br>attributes to the state the FSM is in for text "abcd.ef" <br><br>NOTES:<br> 1) Adding or removing of attributes should not cause the drawing of the<br> FSM to change except where the attributes have been added or removed.
<br> 2) Attributes may be added or removed from the vertices, edges, and<br> labels of the graph.<br> 3) If the FSM is non-deterministic, then there may be many states <br>
which are attributed concurrently.<br>
4) In some cases the vertices may also have labels; in such cases I expect<br> a state to be drawn as a label inside a circle, rectangle, or other shape.<br><br>There are more things I could describe but you get the picture.
<br><br>Now, is there a graph drawing package that I can load into my Squeak<br>image that does (at least some of) what I want and that I can write<br>an interface to? Note that, if possible, I need the graph drawing package
<br>to be fast because the user may move the cursor the the left or right<br>very quickly and I don't want the response time to be slow.<br><br>Note that mostly I don't want to be responsible for deciding how the graph
<br>is drawn on the page, i.e. the location of vertices, edges and labels.<br>The package should have the ability to decide that for itself and do a good<br>job of it too.<br><br>Thanks again<br><br>Ralph<br><br>P.S. As I said before, if there is anyone who would like to implement this
<br>part of my Regular Expression package that would be great. <br>I have a text based version of the needed graph drawing package working<br>already and it works great! VERY COOL, even if I must toot my own horn.<br><br>
<br>