Skip to main content

Lifting Numeric Relational Domains to Algebraic Data Types

  • Conference paper
  • First Online:
Static Analysis (SAS 2022)

Abstract

We present RAND, an input-output relational abstract domain that expresses relations between values of non-recursive algebraic data types (ADTs), and numeric relations between their scalar parts. RAND is parametrised on a user-provided numeric relational domain, that we lift to pairs of variables and projection paths. It is constructed as a disjunctive completion of a reduced product of domains for numeric relations, for equalities, and for cases of variant constructors. Using RAND, we define a modular, inter-procedural, input-output relational analysis for a while language with ADTs and function calls. The analysis computes function summaries, that describe relations between the inputs of programs and their outputs.

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
eBook
USD 59.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 79.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

Similar content being viewed by others

References

  1. Andreescu, O.F., Jensen, T., Lescuyer, S., Montagu, B.: Inferring frame conditions with static correlation analysis. POPL (2019). https://doi.org/10.1145/3290360

    Article  Google Scholar 

  2. Bautista, S., Jensen, T., Montagu, B.: Numeric domains meet algebraic data types. NSAD (2020). https://doi.org/10.1145/3427762.3430178

    Article  Google Scholar 

  3. Bautista, S., Jensen, T., Montagu, B.: Artifact for the “Lifting Numeric Relational Domains to Algebraic Data Types” article of the SAS 2022 symposium (2022). https://doi.org/10.5281/zenodo.6977156

  4. Bautista, S., Jensen, T., Montagu, B.: Lifting Numeric Relational Domains to Algebraic Data Types (extended version) (2022). https://hal.inria.fr/hal-03765357

  5. Boutonnet, R., Halbwachs, N.: Disjunctive relational abstract interpretation for interprocedural program analysis. VMCAI (2019). https://doi.org/10.1007/978-3-030-11245-5_7

    Article  MATH  Google Scholar 

  6. Chang, B.Y.E., Rival, X.: Modular construction of shape-numeric analyzers. Festschrift for Dave Schmidt (2013). https://hal.inria.fr/hal-00926948

  7. Comon, H., et al.: Tree Automata Techniques and Applications (2008). https://hal.inria.fr/hal-03367725

  8. Cousot, P.: Constructive design of a hierarchy of semantics of a transition system by abstract interpretation (extended abstract). MFPS (1997). https://doi.org/10.1016/s1571-0661(05)80168-9

    Article  MATH  Google Scholar 

  9. Cousot, P.: Principles of Abstract Interpretation. The MIT Press, Cambridge (2021)

    Google Scholar 

  10. Cousot, P., Cousot, R.: Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: POPL (1977). https://doi.org/10.1145/512950.512973

  11. Cousot, P., Cousot, R.: Modular static program analysis. In: Horspool, R.N. (ed.) CC 2002. LNCS, vol. 2304, pp. 159–179. Springer, Heidelberg (2002). https://doi.org/10.1007/3-540-45937-5_13

    Chapter  Google Scholar 

  12. Dimovski, A.S.: Lifted static analysis using a binary decision diagram abstract domain. In: GPCE (2019). https://doi.org/10.1145/3357765.3359518

  13. Dimovski, A.S., Apel, S., Legay, A.: Several lifted abstract domains for static analysis of numerical program families. Sci. Comput. Program. 213 (2022). https://doi.org/10.1016/j.scico.2021.102725

  14. Farzan, A., Kincaid, Z.: Compositional recurrence analysis. In: FMCAD (2015). https://doi.org/10.1109/FMCAD.2015.7542253

  15. Filliâtre, J.-C., Paskevich, A.: Why3 — where programs meet provers. In: Felleisen, M., Gardner, P. (eds.) ESOP 2013. LNCS, vol. 7792, pp. 125–128. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-37036-6_8

    Chapter  Google Scholar 

  16. Genet, T., Le Gall, T., Legay, A., Murat, V.: A completion algorithm for lattice tree automata. In: Konstantinidis, S. (ed.) CIAA 2013. LNCS, vol. 7982, pp. 134–145. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-39274-0_13

    Chapter  MATH  Google Scholar 

  17. Genet, T., Le Gall, T., Legay, A., Murat, V.: Tree regular model checking for lattice-based automata. In: CIAA (2013). https://hal.inria.fr/hal-00924849

  18. Haudebourg, T., Genet, T., Jensen, T.P.: Regular language type inference with term rewriting. In: ICFP (2020). https://doi.org/10.1145/3408994

  19. Illous, H., Lemerre, M., Rival, X.: A relational shape abstract domain. In: NASA Formal Methods (2017). https://doi.org/10.1007/978-3-319-57288-8_15

  20. Illous, H., Lemerre, M., Rival, X.: Interprocedural shape analysis using separation logic-based transformer summaries. In: Pichardie, D., Sighireanu, M. (eds.) SAS 2020. LNCS, vol. 12389, pp. 248–273. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-65474-0_12

    Chapter  MATH  Google Scholar 

  21. Jeannet, B.: The BDDAPRON logico-numerical abstract domains library (2009). https://pop-art.inrialpes.fr/~bjeannet/bjeannet-forge/bddapron/

  22. Jeannet, B.: Relational interprocedural verification of concurrent programs. Softw. Syst. Model. 12 (2013). https://doi.org/10.1007/s10270-012-0230-7

  23. Jeannet, B., Loginov, A., Reps, T., Sagiv, M.: A relational approach to interprocedural shape analysis. In: Giacobazzi, R. (ed.) SAS 2004. LNCS, vol. 3148, pp. 246–264. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-27864-1_19

    Chapter  MATH  Google Scholar 

  24. Jeannet, B., Miné, A.: Apron: a library of numerical abstract domains for static analysis. CAV (2009). https://doi.org/10.1007/978-3-642-02658-4_52

    Article  Google Scholar 

  25. Journault, M.: Precise and modular static analysis by abstract interpretation for the automatic proof of program soundness and contracts inference. (Analyse statique modulaire précise par interprétation abstraite pour la preuve automatique de correction de programmes et pour l’inférence de contrats.). Ph.D. thesis, Sorbonne University, France (2019). https://tel.archives-ouvertes.fr/tel-02947214

  26. Journault, M., Miné, A., Ouadjaout, A.: An abstract domain for trees with numeric relations. In: Caires, L. (ed.) ESOP 2019. LNCS, vol. 11423, pp. 724–751. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-17184-1_26

    Chapter  Google Scholar 

  27. Kim, S., Rival, X., Ryu, S.: A theoretical foundation of sensitivity in an abstract interpretation framework. In: TOPLAS (2018). https://doi.org/10.1145/3230624

  28. Kincaid, Z., Breck, J., Boroujeni, A.F., Reps, T.: Compositional recurrence analysis revisited. In: PLDI (2017). https://doi.org/10.1145/3062341.3062373

  29. Klein, G., et al.: seL4: Formal verification of an OS kernel. In: SOSP (2009). https://doi.org/10.1145/1629575.1629596

  30. Kobayashi, N., Tabuchi, N., Unno, H.: Higher-order multi-parameter tree transducers and recursion schemes for program verification. In: POPL (2010). https://doi.org/10.1145/1706299.1706355

  31. Kozen, D.: Kleene algebra with tests. In: TOPLAS (1997). https://doi.org/10.1145/256167.256195

  32. Li, H., Berenger, F., Evan Chang, B., Rival, X.: Semantic-directed clumping of disjunctive abstract states. In: POPL (2017). https://doi.org/10.1145/3009837.3009881

  33. Liu, J., Rival, X.: Abstraction of optional numerical values. In: Feng, X., Park, S. (eds.) APLAS 2015. LNCS, vol. 9458, pp. 146–166. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-26529-2_9

    Chapter  Google Scholar 

  34. Miné, A.: The octagon abstract domain. High. Order Symb. Comput. 19 (2006). https://doi.org/10.1007/s10990-006-8609-1

  35. Miné, A.: Tutorial on static inference of numeric invariants by abstract interpretation. Found. Trends Program. Lang. 4 (2017). https://doi.org/10.1561/2500000034

  36. Müller-Olm, M., Seidl, H.: Analysis of modular arithmetic. In: TOPLAS (2007). https://doi.org/10.1145/1275497.1275504

  37. Ong, C.L., Ramsay, S.J.: Verifying higher-order functional programs with pattern-matching algebraic data types. In: POPL (2011). https://doi.org/10.1145/1926385.1926453

  38. Pierce, B.: Advanced Topics in Types and Programming Languages. MIT Press, Cambridge (2005)

    MATH  Google Scholar 

  39. Pierce, B.C.: Types and Programming Languages. MIT Press, Cambridge (2002)

    MATH  Google Scholar 

  40. Rival, X., Yi, K.: Introduction to Static Analysis: An Abstract Interpretation Perspective. The MIT Press, Cambridge (2020)

    Google Scholar 

  41. Schrammel, P., Jeannet, B.: Logico-numerical abstract acceleration and application to the verification of data-flow programs. In: Yahav, E. (ed.) SAS 2011. LNCS, vol. 6887, pp. 233–248. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-23702-7_19

    Chapter  Google Scholar 

  42. Sharma, T., Reps, T.: A new abstraction framework for affine transformers. Formal Methods Syst. Des. 54(1), 110–143 (2018). https://doi.org/10.1007/s10703-018-0325-z

    Article  MATH  Google Scholar 

  43. Sotin, P., Jeannet, B.: Precise Interprocedural Analysis in the Presence of Pointers to the Stack. In: Barthe, G. (ed.) ESOP 2011. LNCS, vol. 6602, pp. 459–479. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-19718-5_24

    Chapter  Google Scholar 

  44. Tarski, A.: On the calculus of relations. J. Symbol. Logic 6 (1941). https://doi.org/10.2307/2268577

  45. Venet, A.: Abstract cofibered domains: application to the alias analysis of untyped programs. In: Cousot, R., Schmidt, D.A. (eds.) SAS 1996. LNCS, vol. 1145, pp. 366–382. Springer, Heidelberg (1996). https://doi.org/10.1007/3-540-61739-6_53

    Chapter  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Santiago Bautista .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 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

Bautista, S., Jensen, T., Montagu, B. (2022). Lifting Numeric Relational Domains to Algebraic Data Types. In: Singh, G., Urban, C. (eds) Static Analysis. SAS 2022. Lecture Notes in Computer Science, vol 13790. Springer, Cham. https://doi.org/10.1007/978-3-031-22308-2_6

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-22308-2_6

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-22307-5

  • Online ISBN: 978-3-031-22308-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics