Rule-Based Graph Programs Matching the Time Complexity of Imperative Algorithms
Ziad Ismaili Alaoui, Detlef Plump

TL;DR
This paper advances rule-based graph programming by enhancing data structures to match the time complexity of imperative algorithms, demonstrated through case studies including connectivity, acyclicity, and shortest paths.
Contribution
It overcomes previous limitations by improving the graph data structure in GP 2, enabling efficient implementations of fundamental algorithms on arbitrary graphs.
Findings
Linear time algorithms for connectivity and acyclicity on arbitrary graphs.
Shortest path program runs in O(nm) time, matching imperative Bellman-Ford.
Formal proofs and runtime experiments validate the approaches.
Abstract
We report on recent advances in rule-based graph programming, which allow us to match the time complexity of some fundamental imperative graph algorithms. In general, achieving the time complexity of graph algorithms implemented in conventional languages using a rule-based graph-transformation language is challenging due to the cost of graph matching. Previous work demonstrated that with rooted rules, certain algorithms can be implemented in the graph programming language GP 2 such that their runtime matches the time complexity of imperative implementations. However, this required input graphs to have a bounded node degree and (for some algorithms) to be connected. In this paper, we overcome these limitations by enhancing the graph data structure generated by the GP 2 compiler and exploiting the new structure in programs. We present three case studies: the first program checks whether…
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.
Taxonomy
TopicsConstraint Satisfaction and Optimization · Formal Methods in Verification · AI-based Problem Solving and Planning
