Skip to main content

An Abstract Domain for Heap Commutativity

  • Conference paper
  • First Online:
Verification, Model Checking, and Abstract Interpretation (VMCAI 2025)

Abstract

Commutativity of program code (i.e. the equivalence of two code fragments composed in alternate orders) is of ongoing interest in many settings such as program verification, scalable concurrency, and security analysis. While some have explored static analysis for code commutativity, few have specifically catered to heap-manipulating programs. We introduce an abstract domain in which commutativity synthesis or verification techniques can safely be performed on abstract mathematical models and, from those results, one can directly obtain commutativity conditions for concrete heap programs. This approach offloads challenges of concrete heap reasoning into the simpler abstract space. We show this reasoning supports framing and composition, and conclude with commutativity analysis of programs operating on example heap data structures. Our work has been mechanized in Coq and is available in the supplement.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Antonopoulos, T., Koskinen, E., Le, T.C., Nagasamudram, R., Naumann, D.A., Ngo, M.: An algebra of alignment for relational verification. Proc. ACM Program. Lang. 7(POPL), 573–603 (2023). https://doi.org/10.1145/3571213

  2. Bansal, K., Koskinen, E., Tripp, O.: Automatic generation of precise and useful commutativity conditions (extended version). CoRR (2018). http://arxiv.org/abs/1802.08748

  3. Bansal, K., Koskinen, E., Tripp, O.: Synthesizing precise and useful commutativity conditions. J. Autom. Reason. 64(7), 1333–1359 (2020). https://doi.org/10.1007/S10817-020-09573-W

    Article  MathSciNet  MATH  Google Scholar 

  4. Calcagno, C., O’Hearn, P.W., Yang, H.: Local action and abstract separation logic. In: 22nd Annual IEEE Symposium on Logic in Computer Science (LICS 2007), pp. 366–378 (2007). https://doi.org/10.1109/LICS.2007.30

  5. Charguéraud, A.: Separation Logic Foundations, Software Foundations, vol. 6. Electronic textbook (2023). http://softwarefoundations.cis.upenn.edu, version 2.0

  6. Chen, A., Fathololumi, P., Koskinen, E., Pincus, J.: Veracity: Declarative multicore programming with commutativity. Proc. ACM Program. Lang. 6(OOPSLA2) (2022). https://doi.org/10.1145/3563349

  7. Chen, A., Fathololumi, P., Nicola, M., Pincus, J., Brennan, T., Koskinen, E.: Better predicates and heuristics for improved commutativity synthesis. In: André, É., Sun, J. (eds.) Automated Technology for Verification and Analysis - 21st International Symposium, ATVA 2023, Singapore, 24-27 October 2023, Proceedings, Part II. LNCS, vol. 14216, pp. 93–113. Springer (2023). https://doi.org/10.1007/978-3-031-45332-8_5

  8. Clements, A.T., Kaashoek, M.F., Zeldovich, N., Morris, R.T., Kohler, E.: The scalable commutativity rule: designing scalable software for multicore processors. In: Proceedings of the Twenty-Fourth ACM Symposium on Operating Systems Principles, SOSP 2013, pp. 1–17. Association for Computing Machinery, New York (2013). https://doi.org/10.1145/2517349.2522712

  9. Cortesi, A., Costantini, G., Ferrara, P.: A survey on product operators in abstract interpretation. Electr. Proc. Theoret. Comput. Sci. 129, 325–336 (sep 2013). https://doi.org/10.4204/eptcs.129.19

  10. Cousot, P., Cousot, R.: Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: Proceedings of the 4th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages. pp. 238–252. POPL ’77, Association for Computing Machinery, New York, NY, USA (1977). https://doi.org/10.1145/512950.512973

  11. Cousot, P., Cousot, R.: Abstract interpretation and application to logic programs. J. Logic Program. 13(2), 103–179 (1992). https://doi.org/10.1016/0743-1066(92)90030-7

    Article  MathSciNet  MATH  Google Scholar 

  12. Dickerson, T., Gazzillo, P., Herlihy, M., Koskinen, E.: Adding concurrency to smart contracts. In: Proceedings of the ACM Symposium on Principles of Distributed Computing, PODC 2017, pp. 303–312. ACM, New York (2017). https://doi.org/10.1145/3087801.3087835

  13. Eilers, M., Dardinier, T., Müller, P.: Commcsl: proving information flow security for concurrent programs using abstract commutativity. Proc. ACM Program. Lang. 7(PLDI), 1682–1707 (2023). https://doi.org/10.1145/3591289

  14. Elmas, T., Qadeer, S., Tasiran, S.: A calculus of atomic actions. ACM SIGPLAN Notices 44(1), 2–15 (2009)

    Article  MATH  Google Scholar 

  15. Enea, C., Koskinen, E.: Scenario-based proofs for concurrent objects. Proc. ACM Program. Lang. (to appear) (OOPSLA2) (2024)

    Google Scholar 

  16. Farzan, A.: Commutativity in automated verification. In: LICS, pp. 1–7 (2023). https://doi.org/10.1109/LICS56636.2023.10175734

  17. Farzan, A., Klumpp, D., Podelski, A.: Stratified commutativity in verification algorithms for concurrent programs. Proc. ACM Program. Lang. 7(POPL), 1426–1453 (2023). https://doi.org/10.1145/3571242

  18. Farzan, A., Klumpp, D., Podelski, A.: Commutativity simplifies proofs of parameterized programs. Proc. ACM Program. Lang. (POPL) (2024)

    Google Scholar 

  19. Farzan, A., Mathur, U.: Coarser equivalences for causal concurrency. Proc. ACM Program. Lang. 8(POPL), 911–941 (2024). https://doi.org/10.1145/3632873

  20. Flanagan, C., Freund, S.N.: The anchor verifier for blocking and non-blocking concurrent software. Proc. ACM Program. Lang (OOPSLA) 4, 1–29 (2020)

    Google Scholar 

  21. Giacobazzi, R., Ranzato, F.: The reduced relative power operation on abstract domains. Theoret. Comput. Sci. 216(1), 159–211 (1999). https://doi.org/10.1016/S0304-3975(98)00194-7

    Article  MathSciNet  MATH  Google Scholar 

  22. Giacobazzi, R., Ranzato, F., Scozzari, F.: Making abstract domains condensing. ACM Trans. Comput. Logic 6(1), 33–60 (2005). https://doi.org/10.1145/1042038.1042040

    Article  MathSciNet  MATH  Google Scholar 

  23. Giacobazzi, R., Scozzari, F.: A logical model for relational abstract domains. ACM Trans. Program. Lang. Syst. 20(5), 1067–1109 (1998). https://doi.org/10.1145/293677.293680

    Article  MATH  Google Scholar 

  24. Kim, D., Rinard, M.C.: Verification of semantic commutativity conditions and inverse operations on linked data structures. In: Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2011, pp. 528–541. ,Association for Computing Machinery, New York (2011). https://doi.org/10.1145/1993498.1993561

  25. Koskinen, E., Bansal, K.: Decomposing data structure commutativity proofs with \(m\!n\)-differencing. In: Henglein, F., Shoham, S., Vizel, Y. (eds.) VMCAI 2021. LNCS, vol. 12597, pp. 81–103. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-67067-2_5

    Chapter  MATH  Google Scholar 

  26. Kragl, B., Qadeer, S.: The CIVL verifier. In: 2021 Formal Methods in Computer Aided Design (FMCAD), pp. 143–152. IEEE (2021)

    Google Scholar 

  27. Lette, D., Farzan, A.: Commutativity for concurrent program termination proofs. In: Enea, C., Lal, A. (eds.) Computer Aided Verification - 35th International Conference, CAV 2023, Paris, France, 17-22 July 2023, Proceedings, Part I. LNCS, vol. 13964, pp. 109–131. Springer (2023). https://doi.org/10.1007/978-3-031-37706-8_6

  28. Nagasamudram, R., Naumann, D.A.: Alignment completeness for relational hoare logics. In: 36th Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2021, Rome, Italy, 29 June - 2 July, 2021. pp. 1–13. IEEE (2021). https://doi.org/10.1109/LICS52264.2021.9470690

  29. Parkinson, M., Bierman, G.: Separation logic and abstraction. In: Proceedings of the 32nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 247–258 (2005)

    Google Scholar 

  30. Pincus, J.: Commutativity Reasoning for the Heap. Master’s thesis, Stevens Institute of Technology (2022). https://www.proquest.com/docview/2681771819

  31. Pincus, J., Koskinen, E.: An abstract domain for heap commutativity (extended version) (2024). https://doi.org/10.48550/arXiv.2411.12857

  32. Pîrlea, G., Kumar, A., Sergey, I.: Practical Smart Contract Sharding with Ownership and Commutativity Analysis, pp. 1327–1341. Association for Computing Machinery, New York (2021). https://doi.org/10.1145/3453483.3454112

  33. Prabhu, P., Ghosh, S., Zhang, Y., Johnson, N.P., August, D.I.: Commutative set: a language extension for implicit parallel programming. In: Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 1–11 (2011). https://doi.org/10.1145/1993316.1993500

  34. Reynolds, J.: Separation logic: a logic for shared mutable data structures. In: Proceedings 17th Annual IEEE Symposium on Logic in Computer Science, pp. 55–74 (2002). https://doi.org/10.1109/LICS.2002.1029817

  35. Rinard, M.C., Diniz, P.C.: Semantic foundations of commutativity analysis. In: Bougé, L., Fraigniaud, P., Mignotte, A., Robert, Y. (eds.) Euro-Par 1996. LNCS, vol. 1123, pp. 414–423. Springer, Heidelberg (1996). https://doi.org/10.1007/3-540-61626-8_55

    Chapter  Google Scholar 

  36. Shapiro, M., Preguiça, N., Baquero, C., Zawirski, M.: A comprehensive study of convergent and commutative replicated data types. Ph.D. thesis, Inria–Centre Paris-Rocquencourt; INRIA (2011)

    Google Scholar 

  37. Sims, E.J.: An abstract domain for separation logic formulae. In: Proceedings of the 1st International Workshop on Emerging Applications of Abstract Interpretation (EAAI 2006), pp. 133–148. ENTCS, Vienna, Austria (2006)

    Google Scholar 

  38. Weihl, W.E.: Data-dependent concurrency control and recovery (extended abstract). In: Proceedings of the second annual ACM symposium on Principles of distributed computing (PODC 1983), pp. 63–75. ACM Press, New York (1983). https://doi.org/10.1145/800221.806710

  39. Yang, H.: Relational separation logic. Theor. Comput. Sci. 375(1–3), 308–334 (2007). https://doi.org/10.1016/J.TCS.2006.12.036

    Article  MathSciNet  MATH  Google Scholar 

Download references

Acknowledgments

We thank Marco Gaboardi, David Naumann, VFC, and the anonymous reviewers for their feedback on earlier versions of this draft. Both authors were partially supported by NSF award #2008633. Koskinen was partially supported by NSF award #2315363. Pincus was partially supported by NSF award #1801564.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Jared Pincus .

Editor information

Editors and Affiliations

Ethics declarations

Disclosure of Interests

The authors have no competing interests to declare.

Rights and permissions

Reprints and permissions

Copyright information

© 2025 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Pincus, J., Koskinen, E. (2025). An Abstract Domain for Heap Commutativity. In: Shankaranarayanan, K., Sankaranarayanan, S., Trivedi, A. (eds) Verification, Model Checking, and Abstract Interpretation. VMCAI 2025. Lecture Notes in Computer Science, vol 15530. Springer, Cham. https://doi.org/10.1007/978-3-031-82703-7_2

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-82703-7_2

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-82702-0

  • Online ISBN: 978-3-031-82703-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics