Inference Of Node And Edge Replacement Graph Grammars