Fast Rule-Based Graph Programs
Graham Campbell, Brian Courtehoute, Detlef Plump

TL;DR
This paper introduces linear-time graph algorithms implemented in GP 2, a rule-based language, focusing on graph property checking and traversal, with proofs and empirical validation of their efficiency.
Contribution
It presents novel linear-time implementations of graph algorithms in GP 2, utilizing rooted rules for efficient pattern matching, and provides correctness and complexity proofs.
Findings
Graph reduction programs run in linear time on all graphs.
Depth-first search programs run in linear time on bounded degree graphs.
Empirical results support the theoretical linear-time complexity.
Abstract
Implementing graph algorithms efficiently in a rule-based language is challenging because graph pattern matching is expensive. In this paper, we present a number of linear-time implementations of graph algorithms in GP 2, an experimental programming language based on graph transformation rules which aims to facilitate program analysis and verification. We focus on two classes of rule-based graph programs: graph reduction programs which check some graph property, and programs using a depth-first search to test some property or perform an operation such as producing a 2-colouring or a topological sorting. Programs of the first type run in linear time without any constraints on input graphs while programs of the second type require input graphs of bounded degree to run in linear time. Essential for achieving the linear time complexity are so-called rooted rules in GP 2, which, in many…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
