arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2012.11394cs.PLcs.DS
收藏

基于规则的快速图形程序

Fast Rule-Based Graph Programs

Graham Campbell, Brian Courtehoute, Detlef Plump

摘要:

在基于规则的语言中有效地实现图算法是具有挑战性的,因为图模式匹配是昂贵的。在本文中,我们提出了一些在GP 2,一个实验性的程序设计语言的基础上的图形转换规则,旨在促进程序分析和验证的图算法的线性时间实现。我们专注于两类基于规则的图形程序:图形简化程序,检查一些图形属性,和程序使用深度优先搜索来测试一些属性或执行操作,如生产2-着色或拓扑排序。第一种类型的程序在线性时间内运行,对输入图没有任何约束,而第二种类型的程序需要有界度的输入图在线性时间内运行。实现线性时间复杂度的关键是GP 2中所谓的根规则,在许多情况下,这些根规则可以在恒定时间内匹配。对于我们的每一个程序,我们证明了正确性和复杂性,也给他们的运行时间的经验证据。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑