Skip to main content

2-Pointer Logic

  • Chapter
  • First Online:
Taming the Infinities of Concurrency

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 14660))

Abstract

For reasoning about properties of pointers, we consider conjunctions of equalities and dis-equalities between terms built up from address constants by addition of offsets and dereferencing. We call the resulting class of formulas 2-pointer logic. We introduce a quantitative version of congruence closure to provide polynomial time algorithms for deciding satisfiability as well as implication between formulas. By generalizing quantitative congruence closure to quantitative finite automata, we succeed in constructing canonical normal forms so that checking of equivalence between conjunctions reduces to syntactic equality.

We apply our techniques to realize abstract transformers for dedicated forms of assignments via pointers, in particular, indefinite, definite and locally invertible assignments. Quantitative finite automata here allow us to restrict formulas to properties expressible by some subterm-closed subset of terms only.

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

Access this chapter

eBook
USD 16.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 129.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Arceri, V., Olliaro, M., Cortesi, A., Ferrara, P.: Relational string abstract domains. In: Finkbeiner, B., Wies, T. (eds.) VMCAI 2022. LNCS, vol. 13182, pp. 20–42. Springer, Cham (2022). https://doi.org/10.1007/978-3-030-94583-1_2

    Chapter  Google Scholar 

  2. Chang, B.E., Rival, X.: Modular construction of shape-numeric analyzers. In: Banerjee, A., Danvy, O., Doh, K., Hatcliff, J. (eds.) Semantics, Abstract Interpretation, and Reasoning about Programs: Essays Dedicated to David A. Schmidt on the Occasion of his Sixtieth Birthday, Manhattan, Kansas, USA, 19–20th September 2013, EPTCS, vol. 129, pp. 161–185 (2013). https://doi.org/10.4204/EPTCS.129.11

  3. Cousot, P., Halbwachs, N.: Automatic discovery of linear restraints among variables of a program. In: Aho, A.V., Zilles, S.N., Szymanski, T.G. (eds.) Conference Record of the Fifth Annual ACM Symposium on Principles of Programming Languages, Tucson, Arizona, USA, January 1978, pp. 84–96. ACM Press (1978). https://doi.org/10.1145/512760.512770

  4. Giet, J., Ridoux, F., Rival, X.: A product of shape and sequence abstractions. In: Hermenegildo, M.V., Morales, J.F. (eds.) SAS 2023. LNCS, vol. 14284, pp. 310–342. Springer, Cham (2023). https://doi.org/10.1007/978-3-031-44245-2_15

    Chapter  Google Scholar 

  5. Gotsman, A., Berdine, J., Cook, B., Sagiv, M.: Thread-modular shape analysis. In: PLDI 2007, pp. 266–277. ACM (2007). https://doi.org/10.1145/1250734.1250765

  6. Gulwani, S., Tiwari, A., Necula, G.C.: Join algorithms for the theory of uninterpreted functions. In: Lodaya, K., Mahajan, M. (eds.) FSTTCS 2004. LNCS, vol. 3328, pp. 311–323. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-30538-5_26

    Chapter  Google Scholar 

  7. Illous, H., Lemerre, M., Rival, X.: A relational shape abstract domain. Formal Methods Syst. Des. 57(3), 343–400 (2021). https://doi.org/10.1007/S10703-021-00366-4

    Article  Google Scholar 

  8. Korovin, K., Kovács, L., Reger, G., Schoisswohl, J., Voronkov, A.: ALASCA: reasoning in quantified linear arithmetic. In: Sankaranarayanan, S., Sharygina, N. (eds.) TACAS 2023. LNCS, vol. 13993, pp. 647–665. Springer, Cham (2023). https://doi.org/10.1007/978-3-031-30823-9_33

    Chapter  Google Scholar 

  9. Kroening, D., Strichman, O.: Decision Procedures - An Algorithmic Point of View. Texts in Theoretical Computer Science. An EATCS Series. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-74105-3. ISBN 978-3-540-74104-6

  10. Miné, A.: A new numerical abstract domain based on difference-bound matrices. In: Danvy, O., Filinski, A. (eds.) PADO 2001. LNCS, vol. 2053, pp. 155–172. Springer, Heidelberg (2001). https://doi.org/10.1007/3-540-44978-7_10

    Chapter  Google Scholar 

  11. Miné, A.: The octagon abstract domain. In: WCRE 2001, p. 310. IEEE Computer Society (2001). https://doi.org/10.1109/WCRE.2001.957836

  12. Miné, A.: Field-sensitive value analysis of embedded C programs with union types and pointer arithmetics. In: Irwin, M.J., Bosschere, K.D. (eds.) Proceedings of the 2006 ACM SIGPLAN/SIGBED Conference on Languages, Compilers, and Tools for Embedded Systems (LCTES 2006), Ottawa, Ontario, Canada, 14–16 June 2006, pp. 54–63. ACM (2006). https://doi.org/10.1145/1134650.1134659

  13. Miné, A.: The octagon abstract domain. Higher Order Symbol. Comput. 19(1), 31–100 (2006). https://doi.org/10.1007/s10990-006-8609-1. ISSN 1388-3690

  14. Müller-Olm, M., Seidl, H.: A note on Karr’s algorithm. In: Díaz, J., Karhumäki, J., Lepistö, A., Sannella, D. (eds.) ICALP 2004. LNCS, vol. 3142, pp. 1016–1028. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-27836-8_85

    Chapter  Google Scholar 

  15. Müller-Olm, M., Seidl, H.: Precise interprocedural analysis through linear algebra. In: Jones, N.D., Leroy, X. (eds.) Proceedings of the 31st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2004, Venice, Italy, 14–16 January 2004, pp. 330–341. ACM (2004). https://doi.org/10.1145/964001.964029

  16. Müller-Olm, M., Seidl, H.: Upper adjoints for fast inter-procedural variable equalities. In: Drossopoulou, S. (ed.) ESOP 2008. LNCS, vol. 4960, pp. 178–192. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-78739-6_15

    Chapter  Google Scholar 

  17. Nelson, G., Oppen, D.C.: Simplification by cooperating decision procedures. ACM Trans. Program. Lang. Syst. 1(2), 245–257 (1979). https://doi.org/10.1145/357073.357079. ISSN 0164-0925

  18. Nelson, G., Oppen, D.C.: Fast decision procedures based on congruence closure. J. ACM 27(2), 356–364 (1980). https://doi.org/10.1145/322186.322198. ISSN 0004-5411

  19. O’Hearn, P.W.: Resources, concurrency, and local reasoning. Theoret. Comput. Sci. 375(1), 271–307 (2007). https://doi.org/10.1016/j.tcs.2006.12.035

    Article  MathSciNet  Google Scholar 

  20. O’Hearn, P.W.: Separation logic. Commun. ACM 62(2), 86–95 (2019). https://doi.org/10.1145/3211968

    Article  Google Scholar 

  21. Reps, T.W., Sagiv, M., Wilhelm, R.: Shape analysis and applications. In: Srikant, Y.N., Shankar, P. (eds.) The Compiler Design Handbook: Optimizations and Machine Code Generation, 2nd edn, p. 12. CRC Press (2007)

    Google Scholar 

  22. Rueß, H., Shankar, N.: Deconstructing Shostak. In: Proceedings of the 16th Annual IEEE Symposium on Logic in Computer Science, Boston, Massachusetts, USA, 16–19 June 2001, pp. 19–28. IEEE Computer Society (2001). https://doi.org/10.1109/LICS.2001.932479

  23. Sagiv, S., Reps, T.W., Wilhelm, R.: Parametric shape analysis via 3-valued logic. ACM Trans. Program. Lang. Syst. 24(3), 217–298 (2002). https://doi.org/10.1145/514188.514190

    Article  Google Scholar 

  24. Seidl, H., Erhard, J., Tilscher, S., Schwarz, M.: Non-numerical weakly relational domains (2024). https://doi.org/10.48550/ARXIV.2401.05165

  25. Seidl, H., Vojdani, V., Vene, V.: A smooth combination of linear and Herbrand equalities for polynomial time must-alias analysis. In: Cavalcanti, A., Dams, D.R. (eds.) FM 2009. LNCS, vol. 5850, pp. 644–659. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-05089-3_41

    Chapter  Google Scholar 

  26. Shostak, R.E.: Deciding combinations of theories. J. ACM 31(1), 1–12 (1984). https://doi.org/10.1145/2422.322411

    Article  MathSciNet  Google Scholar 

  27. Singh, G., Püschel, M., Vechev, M.: Fast polyhedra abstract domain. In: Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages, POPL 2017, New York, NY, USA, pp. 46–59. Association for Computing Machinery (2017). https://doi.org/10.1145/3009837.3009885. ISBN 9781450346603

Download references

Acknowledgements

This work was supported in part by the Shota Rustaveli National Science Foundation of Georgia under the project FR-21-7973 and Deutsche Forschungsgemeinschaft (DFG) - 378803395/2428 ConVeY 2.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Helmut Seidl .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

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

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Seidl, H., Erhard, J., Schwarz, M., Tilscher, S. (2024). 2-Pointer Logic. In: Kiefer, S., Křetínský, J., Kučera, A. (eds) Taming the Infinities of Concurrency. Lecture Notes in Computer Science, vol 14660. Springer, Cham. https://doi.org/10.1007/978-3-031-56222-8_16

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-56222-8_16

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-56221-1

  • Online ISBN: 978-3-031-56222-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics