Linear-time graph algorithms in GP 2

Graham Campbell, Brian Courtehoute, Detlef Plump

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

3 Citations (Scopus)

Abstract

GP 2 is an experimental programming language based on graph transformation rules which aims to facilitate program analysis and verification. However, implementing graph algorithms efficiently in a rule-based language is challenging because graph pattern matching is expensive. GP 2 mitigates this problem by providing rooted rules which, under mild conditions, can be matched in constant time. In this paper, we present linear-time GP 2 programs for three problems: tree recognition, binary directed acyclic graph (DAG) recognition, and topological sorting. In each case, we show the correctness of the program, prove its linear time complexity, and also give empirical evidence for the linear run time. For DAG recognition and topological sorting, the linear behaviour is achieved by implementing depth-first search strategies based on an encoding of stacks in graphs.

Original languageEnglish
Title of host publication8th Conference on Algebra and Coalgebra in Computer Science, CALCO 2019
EditorsMarkus Roggenbach, Ana Sokolova
PublisherSchloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing
Number of pages23
ISBN (Electronic)9783959771207
DOIs
Publication statusPublished - 25 Nov 2019
Externally publishedYes
Event8th Conference on Algebra and Coalgebra in Computer Science - London, United Kingdom
Duration: 3 Jun 20196 Jun 2019
Conference number: 8
https://drops.dagstuhl.de/entities/volume/LIPIcs-volume-139

Publication series

NameLeibniz International Proceedings in Informatics, LIPIcs
PublisherSchloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing
Volume139
ISSN (Print)1868-8969

Conference

Conference8th Conference on Algebra and Coalgebra in Computer Science
Abbreviated titleCALCO 2019
Country/TerritoryUnited Kingdom
CityLondon
Period3/06/196/06/19
Internet address

Fingerprint

Dive into the research topics of 'Linear-time graph algorithms in GP 2'. Together they form a unique fingerprint.

Cite this