Implementing petri nets / networks following the posts by John Baez: http://math.ucr.edu/home/baez/networks/