Graph-Based Procedural Abstraction