First real Soffit examples

I've gotten Soffit to the point where it can now produce interesting graphs, like this one:

full size

The rule set that produces this graph is:

{
    "version" : "0.1",
    "start" : "ROOT [color=maroon]",
    "X [color=maroon]" : "X[color=maroon]; Y[color=brown]; X--Y",
    "Y [color=brown]" : [ "Y [color=brown]; Z[color=green]; Y--Z",
                          "Y [color=brown]; Z[color=brown]; Y--Z",
                          "Y [color=forestgreen]; Z1[color=green]; Z2[color=green]; Y--Z1; Y--Z2;" ]
}

As you can see, the tags in this grammar are graphviz attributes, which are just copied into the output directly!

The numbers are the order in which new nodes were added to the graph.

I am thinking of adding an option to do a separate rewrite step, where you apply one grammar and then another, so that the first grammar can be written with "natural" tags like "root", "internal", "leaf" and then be rewritten in one pass to be display labels and attributes.

Getting closer to a release. All this is on github and available to play with right now, but to-do's include:

  • Write a tutorial
  • Look at how parsing errors are displayed
  • Figure out which characters to accept (and do so efficiently, startup time is still kind of long)
  • Friendlier command line, other output options besides SVG, ensure dependencies are correct
  • More options to control graph expansion (when to quit, for example? Time-based instead of number of iterations?)
  • Apply multiple rule sets (maybe in v2)
  • Weighting for rules (maybe in v3)
  • Add to PyPi? (maybe in a stable version)

Development blog entries

My #procjam project: Soffit
Soffit progress report #2
Soffit non-progress report #3
Hooray for unit tests
Soffit progress report #5
graphviz clusters suck
Graph rewrite examples, generated by Soffit

H2
H3
H4
3 columns
2 columns
1 column
Join the conversation now
Logo
Center