skip to main content
research-article

Verification of semantic commutativity conditions and inverse operations on linked data structures

Authors Info & Claims
Published:04 June 2011Publication History
Skip Abstract Section

Abstract

We present a new technique for verifying commutativity conditions, which are logical formulas that characterize when operations commute. Because our technique reasons with the abstract state of verified linked data structure implementations, it can verify commuting operations that produce semantically equivalent (but not necessarily identical) data structure states in different execution orders. We have used this technique to verify sound and complete commutativity conditions for all pairs of operations on a collection of linked data structure implementations, including data structures that export a set interface (ListSet and HashSet) as well as data structures that export a map interface (AssociationList, HashTable, and ArrayList). This effort involved the specification and verification of 765 commutativity conditions.

Many speculative parallel systems need to undo the effects of speculatively executed operations. Inverse operations, which undo these effects, are often more efficient than alternate approaches (such as saving and restoring data structure state). We present a new technique for verifying such inverse operations. We have specified and verified, for all of our linked data structure implementations, an inverse operation for every operation that changes the data structure state.

Together, the commutativity conditions and inverse operations provide a key resource that language designers, developers of program analysis systems, and implementors of software systems can draw on to build languages, program analyses, and systems with strong correctness guarantees.

References

  1. F. Aleen and N. Clark. Commutativity analysis for software parallelization: Letting program transformations see the big picture. In Proc. of the International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. T. E. Anderson. The performance of spin lock alternatives for shared-memory multiprocessors. IEEE Trans. Parall. Distrib. Syst., 1 (1), 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. H. Attiya, R. Guerraoui, D. Hendler, P. Kuznetsov, M. M. Michael, and M. Vechev. Laws of order: Expensive synchronization in concurrent algorithms cannot be eliminated. In Proc. of the ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages (POPL), 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. D. F. Bacon, R. Konuru, C. Murthy, and M. Serrano. Thin locks: Featherweight synchronization for Java. In Proc. of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. t al.(2009)Bocchino Jr., Adve, Dig, Adve, Heumann, Komuravelli, Overbey, Simmons, Sung, and Vakilian}DPJ2009R. L. Bocchino Jr., V. S. Adve, D. Dig, S. V. Adve, S. Heumann, R. Komuravelli, J. Overbey, P. Simmons, H. Sung, and M. Vakilian. A type and effect system for Deterministic Parallel Java. In Proc. of the ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages and Applications (OOPSLA), 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. C. Bouillaguet, V. Kuncak, T. Wies, K. Zee, and M. C. Rinard. Using first-order theorem provers in the Jahob data structure verification system. In Proc. of the International Conference on Verification, Model Checking, and Abstract Interpretation (VMCAI), 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. M. J. Bridges, N. Vachharajani, Y. Zhang, T. B. Jablin, and D. I. August. Revisiting the sequential programming model for the multicore era. IEEE Micro, 28 (1), 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. J. Burnim, G. Necula, and K. Sen. Specifying and checking semantic atomicity for multithreaded programs. In Proc. of the International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. T. H. Cormen, C. E. Leiserson, and R. L. Rivest. Introduction to Algorithms. The MIT Press and McGraw-Hill Book Company, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. er(2007)}MouraCADE07L. de Moura and N. Bjørner. Efficient E-matching for SMT solvers. In Proc. of the International Conference on Automated Deduction (CADE), 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. drich(2001)}DeLinePLDI01R. DeLine and M. Fähndrich. Enforcing high-level protocols in low-level software. In Proc. of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. B. Demsky and P. Lam. Views: Object-inspired concurrency control. In Proc. of the ACM/IEEE International Conference on Software Engineering (ICSE), 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. I. Dillig, T. Dillig, and A. Aiken. Precise reasoning for programs using containers. In Proc. of the ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages (POPL), 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. T. Elmas, S. Qadeer, and S. Tasiran. A calculus of atomic actions. In Proc. of the ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages (POPL), 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. drich and DeLine(2002)}FahndrichPLDI02M. Fähndrich and R. DeLine. Adoption and focus: Practical linear types for imperative programming. In Proc. of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. drich and Leino(2003)}FahndrichIWACO03M. Fähndrich and K. R. M. Leino. Heap monotonic typestates. In Proc. of the International Workshop on Aliasing, Confinement and Ownership in Object-Oriented Programming (IWACO), 2003.Google ScholarGoogle Scholar
  17. A. Fekete, N. A. Lynch, M. Merritt, and W. E. Weihl. Commutativity-based locking for nested transactions. In Proc. of the International Workshop on Persistent Object Systems (POS), 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. J. Field, D. Goyal, G. Ramalingam, and E. Yahav. Typestate verification: Abstraction techniques and complexity results. In Proc. of the International Static Analysis Symposium (SAS), 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Y. Ge, C. Barrett, and C. Tinelli. Solving quantified verification conditions using satisfiability modulo theories. In Proc. of the International Conference on Automated Deduction (CADE), 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. A. Goel, K. Po, K. Farhadi, Z. Li, and E. de Lara. The Taser intrusion recovery system. In Proc. of the ACM Symposium on Operating Systems Principles (SOSP), 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. J. Gray and A. Reuter. Transaction Processing: Concepts and Techniques. Morgan Kaufmann, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. S. Gulwani and G. C. Necula. Precise interprocedural analysis using random interpretation. In Proc. of the ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages (POPL), 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. P. Hawkins, A. Aiken, K. Fisher, M. Rinard, and M. Sagiv. Data representation synthesis. In Proc. of the ACM SIGPLAN conference on Programming Language Design and Implementation (PLDI), 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. ensen, Klarlund, Paige, Rauhe, and Sandholm}HenriksenTACAS95J. G. Henriksen, J. Jensen, M. Jørgensen, N. Klarlund, R. Paige, T. Rauhe, and A. Sandholm. Mona: Monadic second-order logic in practice. In Proc. of the International Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS), 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. M. Herlihy, V. Luchangco, and M. Moir. Obstruction-free synchronization: Double-ended queue as an example. In Proc. of the International Conference on Distributed Computing Systems (ICDCS), 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. D. Kim and M. C. Rinard. Verification of semantic commutativity conditions and inverse operations on linked data structures. Technical Report MIT-CSAIL-TR-2010-056, Computer Science and Artificial Intelligence Laboratory, Massachusetts Institute of Technology, Dec. 2010.Google ScholarGoogle Scholar
  27. T. Kim, X. Wang, N. Zeldovich, and M. F. Kaashoek. Intrusion recovery using selective re-execution. In Proc. of the Symposium on Operating Systems Design and Implementation (OSDI), 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. M. Kulkarni, K. Pingali, B. Walter, G. Ramanarayanan, K. Bala, and L. P. Chew. Optimistic parallelism requires abstractions. In Proc. of the ACM SIGPLAN conference on Programming Language Design and Implementation (PLDI), 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. M. Kulkarni, D. Prountzos, D. Nguyen, and K. Pingali. Defining and implementing commutativity conditions for parallel execution. Technical Report TR-ECE-09-11, School of Electrical and Computer Engineering, Purdue University, Aug. 2009.Google ScholarGoogle Scholar
  30. M. Kulkarni, D. Nguyen, D. Prountzos, X. Sui, and K. Pingali. Exploiting the commutativity lattice. In Proc. of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. V. Kuncak and M. Rinard. Towards efficient satisfiability checking for Boolean algebra with Presburger arithmetic. In Proc. of the International Conference on Automated Deduction (CADE), 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. V. Kuncak, P. Lam, and M. Rinard. Role analysis. In Proc. of the ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages (POPL), 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Kuncak, Lam, Zee, and Rinard}KuncakTSE06V. Kuncak, P. Lam, K. Zee, and M. C. Rinard. Modular pluggable analyses for data structure consistency. IEEE Trans. Softw. Eng., 32 (12), 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Kuncak, Nguyen, and Rinard}KuncakBAPA97V. Kuncak, H. H. Nguyen, and M. Rinard. Deciding Boolean algebra with Presburger arithmetic. Journal of Automated Reasoning, 36 (3), 2006\natexlabb. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Lam, Kuncak, and Rinard}HobAOSDP. Lam, V. Kuncak, and M. Rinard. Crosscutting techniques in program specification and analysis. In Proc. of the International Conference on Aspect-Oriented Software Development (AOSD), 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Lam, Kuncak, and Rinard}LamCC05P. Lam, V. Kuncak, and M. Rinard. Hob: A tool for verifying data structure consistency. In Proc. of the International Conference on Compiler Construction (CC), 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Lam, Kuncak, and Rinard}LamVMCAI05P. Lam, V. Kuncak, and M. Rinard. Generalized typestate checking for data structure consistency. In Proc. of the International Conference on Verification, Model Checking, and Abstract Interpretation (VMCAI), 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. P. Mahajan, R. Kotla, C. C. Marshall, V. Ramasubramanian, T. L. Rodeheffer, D. B. Terry, and T. Wobber. Effective and efficient compromise recovery for weakly consistent replication. In Proc. of the ACM European Conference on Computer Systems (EuroSys), 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. M. M. Michael and M. L. Scott. Simple, fast, and practical non-blocking and blocking concurrent queue algorithms. In Proc. of the ACM Symposium on Principles of Distributed Computing (PODC), 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. E. Moss. Personal communication, 2011.Google ScholarGoogle Scholar
  41. M. C. Rinard and P. C. Diniz. Commutativity analysis: a new analysis technique for parallelizing compilers. ACM Trans. Prog. Lang. Syst., 19 (6), 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. M. C. Rinard and M. S. Lam. The design, implementation, and evaluation of Jade. ACM Trans. Prog. Lang. Syst., 20 (3), 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. S. Sagiv, T. W. Reps, and R. Wilhelm. Parametric shape analysis via 3-valued logic. ACM Trans. Prog. Lang. Syst., 24 (3), 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. S. Schulz. E -- a brainiac theorem prover. AI Commun., 15 (2--3), 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. F. Shafique, K. Po, and A. Goel. Correlating multi-session attacks via replay. In Proc. of the Workshop on Hot Topics in System Dependability (HotDep), 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. N. Shavit and D. Touitou. Software transactional memory. Distributed Computing, 10 (2), 1997.Google ScholarGoogle Scholar
  47. R. E. Strom and S. Yemini. Typestate: A programming language concept for enhancing software reliability. IEEE Trans. Softw. Eng., 12 (1), 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. C. Weidenbach. Combining superposition, sorts and splitting. In A. Robinson and A. Voronkov, editors, Handbook of Automated Reasoning, volume 2, chapter 27, pages 1965--2013. The MIT Press, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. W. E. Weihl. Commutativity-based concurrency control for abstract data types. IEEE Trans. Comput., 37 (12), 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. T. Wies, V. Kuncak, P. Lam, A. Podelski, and M. Rinard. Field constraint analysis. In Proc. of the International Conference on Verification, Model Checking, and Abstract Interpretation (VMCAI), 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. K. Zee, V. Kuncak, and M. C. Rinard. Full functional verification of linked data structures. In Proc. of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  52. K. Zee, V. Kuncak, and M. C. Rinard. An integrated proof language for imperative programs. In Proc. of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Verification of semantic commutativity conditions and inverse operations on linked data structures

              Recommendations

              Comments

              Login options

              Check if you have access through your login credentials or your institution to get full access on this article.

              Sign in

              Full Access

              • Published in

                cover image ACM SIGPLAN Notices
                ACM SIGPLAN Notices  Volume 46, Issue 6
                PLDI '11
                June 2011
                652 pages
                ISSN:0362-1340
                EISSN:1558-1160
                DOI:10.1145/1993316
                Issue’s Table of Contents
                • cover image ACM Conferences
                  PLDI '11: Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation
                  June 2011
                  668 pages
                  ISBN:9781450306638
                  DOI:10.1145/1993498
                  • General Chair:
                  • Mary Hall,
                  • Program Chair:
                  • David Padua

                Copyright © 2011 ACM

                Publisher

                Association for Computing Machinery

                New York, NY, United States

                Publication History

                • Published: 4 June 2011

                Check for updates

                Qualifiers

                • research-article

              PDF Format

              View or Download as a PDF file.

              PDF

              eReader

              View online with eReader.

              eReader
              About Cookies On This Site

              We use cookies to ensure that we give you the best experience on our website.

              Learn more

              Got it!