This is not very complex. You take a graph, you take a set of rules, you search for a subgraph that matches a rule, you replace it according to the rule.
The difficult bits of the theory (terminal conditions, confluency, blah blah) can all be ignored here because the idea is to exploit nondeterminacy to create random levels.
The difficult bit of implementation can be done by various free libraries if you don't fancy implementing subgraph matching. Same thing for force-based graph drawing and Voronoi diagrams.