Trace theory (formulated by Mazurkiewicz in 1987) is a framework for designing equivalence relations for concurrent program runs based on a commutativity relation over the set of atomic steps taken by individual program threads. It has been widely used in a variety of program verification and testing techniques. It is simple and elegant, and it yields efficient algorithms that are broadly useful in many different contexts. It is well-understood that the larger the equivalence classes are, the more benefits they would bring to the algorithms that use them. In this paper, we study relaxations of trace equivalence with the goal of maintaining its algorithmic advantages. We prove that the largest appropriate relaxation of trace equivalence, an equivalence relation that preserves the order of steps taken by each thread and what write operation each read operation observes, does not yield efficient algorithms. Specifically, we prove a linear space lower bound for the problem of checking if two arbitrary steps of a concurrent program run are causally concurrent (i.e. they can be reordered in an equivalent run) or causally ordered (i.e. they always appear in the same order in all equivalent runs). The same problem can be decided in constant space for trace equivalence.
翻译:追踪理论(由Mazurkiewicz在1987年提出)是一种基于单个程序线程所采取的原子步骤集上的可交换关系设计并发程序运行等价关系的框架。它已经广泛应用于各种程序验证和测试技术。它既简单又优雅,可以提供高效的算法,在许多不同的情况下都能产生广泛的应用。众所周知,等价类越大,它们为使用它们的算法带来的优势就越大。在本文中,我们研究了追踪等价的放宽,旨在保持其算法优势。我们证明,追踪等价的最大适当放宽,它保留了每个线程所采取的步骤及其读操作观察到的写操作的顺序,不会产生高效的算法。具体来说,我们证明了对于检查并发程序运行的任意两个步骤是否因果并发(即它们可以在等效运行中重新排序)或因果有序(即它们始终以相同的顺序出现在所有等效运行中)的问题,追踪等价可以使用常数空间来解决,然而对于该问题使用线性空间的下界证明。