Fast Rule-Based Graph Programs

12/21/2020
by   Graham Campbell, et al.
0

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 situations, can be matched in constant time. For each of our programs, we prove both correctness and complexity, and also give empirical evidence for their run time.

READ FULL TEXT
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

page 2

page 3

page 4

10/06/2020

The Improved GP 2 Compiler

GP 2 is a rule-based programming language based on graph transformation ...
12/03/2020

A Fast Graph Program for Computing Minimum Spanning Trees

When using graph transformation rules to implement graph algorithms, a c...
05/01/1998

Integrative Windowing

In this paper we re-investigate windowing for rule learning algorithms. ...
02/07/2020

Improving the GP 2 Compiler

GP 2 is an experimental programming language based on graph transformati...
06/11/2019

Efficient Graph Rewriting

Graph transformation is the rule-based modification of graphs, and is a ...
11/05/2020

Less Arbitrary waiting time

Property testing is the cheapest and most precise way of building up a t...
12/03/2020

Verifying Graph Programs with First-Order Logic

We consider Hoare-style verification for the graph programming language ...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.