License: Creative Commons Attribution 3.0 Unported license (CC BY 3.0)
When quoting this document, please refer to the following
DOI: 10.4230/LIPIcs.CALCO.2019.16
URN: urn:nbn:de:0030-drops-114440
URL: http://dagstuhl.sunsite.rwth-aachen.de/volltexte/2019/11444/
Campbell, Graham ;
Courtehoute, Brian ;
Plump, Detlef
Linear-Time Graph Algorithms in GP 2
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.
BibTeX - Entry
@InProceedings{campbell_et_al:LIPIcs:2019:11444,
author = {Graham Campbell and Brian Courtehoute and Detlef Plump},
title = {{Linear-Time Graph Algorithms in GP 2}},
booktitle = {8th Conference on Algebra and Coalgebra in Computer Science (CALCO 2019)},
pages = {16:1--16:23},
series = {Leibniz International Proceedings in Informatics (LIPIcs)},
ISBN = {978-3-95977-120-7},
ISSN = {1868-8969},
year = {2019},
volume = {139},
editor = {Markus Roggenbach and Ana Sokolova},
publisher = {Schloss Dagstuhl--Leibniz-Zentrum fuer Informatik},
address = {Dagstuhl, Germany},
URL = {http://drops.dagstuhl.de/opus/volltexte/2019/11444},
URN = {urn:nbn:de:0030-drops-114440},
doi = {10.4230/LIPIcs.CALCO.2019.16},
annote = {Keywords: Graph transformation, rooted graph programs, GP 2, linear-time algorithms, depth-first search, topological sorting}
}
Keywords: |
|
Graph transformation, rooted graph programs, GP 2, linear-time algorithms, depth-first search, topological sorting |
Collection: |
|
8th Conference on Algebra and Coalgebra in Computer Science (CALCO 2019) |
Issue Date: |
|
2019 |
Date of publication: |
|
25.11.2019 |