On the Complexity of Commutativity Analysis

Two operations commute if they generate the same result regardless of the order in which they execute. Commutativity is an important property — commuting operations enable significant optimizations in the fields of parallel computing, optimizing compilers, parallelizing compilers and database concurrency control. Algorithms that statically decide if operations commute can be an important component of systems in these fields because they enable the automatic application of these optimizations. In this paper we define the commutativity decision problem and establish its complexity for a variety of basic instructions and control constructs. Although deciding commutativity is, in general, undecidable or computationally intractable, we believe that efficient algorithms exist that can solve many of the cases that arise in practice.

[1]  Oscar H. Ibarra,et al.  The Complexity of the Equivalence Problem for Simple Loop-Free Programs , 1982, SIAM J. Comput..

[2]  Geoffrey C. Fox,et al.  The Perfect Club Benchmarks: Effective Performance Evaluation of Supercomputers , 1989, Int. J. High Perform. Comput. Appl..

[3]  Alfred V. Aho,et al.  Data Structures and Algorithms , 1983 .

[4]  Oscar H. Ibarra,et al.  On the Simplification and Equivalence Problems for Straight-Line Programs , 1983, JACM.

[5]  Piet Hut,et al.  A hierarchical O(N log N) force-calculation algorithm , 1986, Nature.

[6]  Rudolf Eigenmann,et al.  Symbolic range propagation , 1995, Proceedings of 9th International Parallel Processing Symposium.

[7]  Eitan M. Gurari,et al.  The Complexity of the Equivalence Problem for Simple Programs , 1981, JACM.

[8]  William E. Weihl Commutativity-based concurrency control for abstract data types , 1988 .

[9]  Jon A. Solworth,et al.  Arbitrary Order Operations on Trees , 1993, LCPC.

[10]  Oscar H. Ibarra,et al.  On the Complexity of Simple Arithmetic Expressions , 1982, Theor. Comput. Sci..

[11]  Guy L. Steele,et al.  Making asynchronous parallelism safe for the world , 1989, POPL '90.

[12]  Oscar H. Ibarra,et al.  On the Zero-Inequivalence Problem for Loop Programs , 1983, J. Comput. Syst. Sci..

[13]  David S. Johnson,et al.  Computers and Intractability: A Guide to the Theory of NP-Completeness , 1978 .

[14]  Oscar H. Ibarra,et al.  Probabilistic Algorithms for Deciding Equivalence of Straight-Line Programs , 1983, JACM.

[15]  Martin C. Rinard,et al.  Commutativity analysis: a new analysis framework for parallelizing compilers , 1996, PLDI '96.