On the complexity of commutativity analysis

  • Oscar Ibarra
  • Pedro Diniz
  • Martin Rinard
Session 9
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1090)


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.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    A. Aho, J. Hopcroft and J. Ullman. Data Structures and Algorithms. Addison-Wesley, 1982.Google Scholar
  2. 2.
    J. Barnes and P. Hut. A hierarchical O(NlogN) force-calculation algorithm. Nature, pages 446–449, December 1976.Google Scholar
  3. 3.
    M. Berry et al. The PERFECT Club Benchmarks: Effective Performance Evaluation of Supercomputers. Technical Report CSRD-827, Center for Supercomputing Research and Development, University of Illinois, Urbana, IL, May, 1989.Google Scholar
  4. 4.
    W. Blume and R. Eigenmann Symbolic Range Propagation. In Proceedings of the Ninth IEEE Int. Parallel Processing Symposium, pp. 357–363, April, 1995Google Scholar
  5. 5.
    E. Gurari and O. Ibarra. The Complexity of the Equivalence Problem for Simple Programs. In Journal of the ACM, 28(3):535–560, July 1981.Google Scholar
  6. 6.
    M. Garey and D. Johnson. Computer and Intractability. A Guide to the Theory of NP-Completeness. Freeman, San Francisco, 1979.Google Scholar
  7. 7.
    O. Ibarra and S. Moran. Probabilistic Algorithms for Deciding Equivalence of Straight-Line Programs. In Journal of the ACM, 30(1):217–228, January 1983.Google Scholar
  8. 8.
    O. Ibarra and B. Leininger. On the Simplification and Equivalence Problems for Straight-Line Programs. In Journal of the ACM, 30(3):641–656, July 1983.Google Scholar
  9. 9.
    O. Ibarra and B. Leininger. On the Zero-Inequivalence Problem for Loop Programs. In Journal of Computer and System Sciences, 26(1):47–64, February 1983.Google Scholar
  10. 10.
    O. Ibarra, B. Leininger, and S. Moran. On the Complexity of Simple Arithmetic Expressions. In Theoretical Computer Science, 19:17–28, 1982.Google Scholar
  11. 11.
    O. Ibarra, B. Leininger, and L. Rosier. A Note on the Complexity of Program Evaluation. In Mathematical Systems Theory, 17:85–96, 1984.Google Scholar
  12. 12.
    O. Ibarra and B. Leininger. The Complexity of the Equivalence Problem for Simple Loop-Free Programs. In SIAM Journal on Computing, 11(1):15–27, February 1982.Google Scholar
  13. 13.
    M. Rinard and P. Diniz. Commutativity Analysis: A New Analysis Framework for Parallelizing Compilers, In Proceedings of the SIGPLAN '96 Conference on Program Language Design and Implementation, Philadelphia, PA, May 1996.Google Scholar
  14. 14.
    J. Solworth and B. Reagan. Arbitrary order operations on trees. In Languages and Compilers for Parallel Computing, Fourth International Workshop, Portland, OR, August 1993.Google Scholar
  15. 15.
    G. Steele. Making asynchronous parallelism safe for the world. In Proceedings of the Seventeenth Annual ACM Symposium on the Principles of Programming Languages, pages 218–231, San Francisco, CA, January 1990.Google Scholar
  16. 16.
    W. Weihl. Commutativity-based concurrency control for abstract data types. IEEE Transactions on Computers, 37(12):1488–1505, December 1988.CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1996

Authors and Affiliations

  • Oscar Ibarra
    • 1
  • Pedro Diniz
    • 1
  • Martin Rinard
    • 1
  1. 1.Department of Computer ScienceUniversity of California, Santa BarbaraSanta Barbara

Personalised recommendations