TY - GEN
T1 - Compiling Graph Programs to C
AU - Bak, Christopher Peter
AU - Plump, Detlef
N1 - © C. Bak, G. Faulkner, D. Plump & C. Runciman. This is an author-produced version of the published article. Uploaded in accordance with the publisher’s self-archiving policy. Further copying may not be permitted; contact the publisher for details.
PY - 2016
Y1 - 2016
N2 - We show how to generate efficient C code for a high-level domain-specific language for graphs. The experimental language GP 2 is based on graph transformation rules and aims to facilitate formal reasoning on programs. Implementing graph programs is challenging because rule matching is expensive in general. GP 2 addresses this problem by providing rooted rules which under mild conditions can be matched in constant time. Using a search plan, our compiler generates C code for matching rooted graph transformation rules. We present run-time experiments with our implementation in a case study on checking graphs for two-colourability: on grid graphs of up to 100,000 nodes, the compiled GP 2 program is as fast as the tailor-made C program given by Sedgewick.
AB - We show how to generate efficient C code for a high-level domain-specific language for graphs. The experimental language GP 2 is based on graph transformation rules and aims to facilitate formal reasoning on programs. Implementing graph programs is challenging because rule matching is expensive in general. GP 2 addresses this problem by providing rooted rules which under mild conditions can be matched in constant time. Using a search plan, our compiler generates C code for matching rooted graph transformation rules. We present run-time experiments with our implementation in a case study on checking graphs for two-colourability: on grid graphs of up to 100,000 nodes, the compiled GP 2 program is as fast as the tailor-made C program given by Sedgewick.
UR - http://www.scopus.com/inward/record.url?scp=84977530434&partnerID=8YFLogxK
U2 - 10.1007/978-3-319-40530-8_7
DO - 10.1007/978-3-319-40530-8_7
M3 - Conference contribution
SN - 978-3-319-40529-2
T3 - Lecture Notes in Computer Science
SP - 102
EP - 117
BT - Proceedings 9th International Conference on Graph Transformation (ICGT 2016)
A2 - Echahed, Rachid
A2 - Minas, Mark
PB - Springer
T2 - 9th International Conference on Graph Transformation (ICGT 2016)
Y2 - 5 July 2016 through 6 July 2016
ER -