Skip to main content

Relative Store Fragments for Singleton Abstraction

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

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 10422))

Included in the following conference series:

Abstract

A singleton abstraction occurs in a program analysis when some results of the analysis are known to be exact: an abstract binding corresponds to a single concrete binding. In this paper, we develop a novel approach to constructing singleton abstractions via relative store fragments. Each store fragment is a locally exact store abstraction in that it contains only those abstract variable bindings necessary to address a particular question at a particular program point; it is relative to that program point and the point of view may be shifted. We show how an analysis incorporating relative store fragments achieves flow-, context-, path- and must-alias sensitivity, and can be used as a basis for environment analysis, without any machinery put in place for those specific aims. We build upon recent advances in demand-driven higher-order program analysis to achieve this construction as it is fundamentally tied to demand-driven lookup of variable values.

Facchinetti is supported by a CAPES Fellowship, process number 13477/13-7.

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

Access this chapter

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

Notes

  1. 1.

    https://github.com/JHU-PL-Lab/odefa/tree/sas2017-drsf.

  2. 2.

    regex is a regular expression engine using derivatives; rsa performs the RSA encryption algorithm; primtest is the Fermat primality testing algorithms; and deriv performs symbolic derivation of an equation.

  3. 3.

    sat is a SAT solver, which stresses path- and context-sensitivity; cpstak is the TAK micro-benchmark in continuation-passing style, which stresses nested function calls and non-local lookups; and church tests the distributive property of multiplication over addition on Church numerals which includes polymorphic recursive functions and a massive number of function calls, stressing the function-wiring part of the analysis.

  4. 4.

    Intel(R) Xeon(R) CPU E31220 @ 3.10 GHz, 8 GB of RAM, Debian GNU/Linux 8.8.

References

  1. Agesen, O.: The cartesian product algorithm. In: Tokoro, M., Pareschi, R. (eds.) ECOOP 1995. LNCS, vol. 952, pp. 2–26. Springer, Heidelberg (1995). doi:10.1007/3-540-49538-X_2

    Google Scholar 

  2. Bodík, R., Anik, S.: Path-sensitive value-flow analysis. In: POPL (1998)

    Google Scholar 

  3. Bouajjani, A., Esparza, J., Maler, O.: Reachability analysis of pushdown automata: application to model-checking. In: Mazurkiewicz, A., Winkowski, J. (eds.) CONCUR 1997. LNCS, vol. 1243, pp. 135–150. Springer, Heidelberg (1997). doi:10.1007/3-540-63141-0_10

    Chapter  Google Scholar 

  4. Besson, F.: CPA beats \(\infty \)-CFA. In: Proceedings of the 11th International Workshop on Formal Techniques for Java-like Programs (2009)

    Google Scholar 

  5. Bergstrom, L., Fluet, M., Le, M., Reppy, J., Sandler, N.: Practical and effective higher-order optimizations. In: ICFP (2014)

    Google Scholar 

  6. Bourdoncle, F.: Abstract interpretation by dynamic partitioning. J. Funct. Program 2, 407–423 (1992)

    Article  MathSciNet  Google Scholar 

  7. Cousot, P., Cousot, R.: Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: POPL (1977)

    Google Scholar 

  8. Chase, D.R., Wegman, M., Zadeck, F.K.: Analysis of pointers and structures. In: PLDI (1990)

    Google Scholar 

  9. Duesterwald, E., Gupta, R., Soffa, M.L.: A practical framework for demand-driven interprocedural data flow analysis. ACM Trans. Program. Lang. Syst. 19(6), 992–1030 (1997)

    Article  Google Scholar 

  10. Das, M., Lerner, S., Mark Seigle, E.S.P.: Path-sensitive program verification in polynomial time. In: PLDI (2002)

    Google Scholar 

  11. Darais, D., Might, M., Van Horn, D.: Galois transformers and modular abstract interpreters. In: OOPSLA (2015)

    Google Scholar 

  12. Earl, C., Might, M., Van Horn, D.: Pushdown control-flow analysis of higher-order programs. In: Workshop on Scheme and Functional Programming (2010)

    Google Scholar 

  13. Fähndrich, M., Rehof, J., Das, M.: Scalable context-sensitive flow analysis using instantiation constraints. In: PLDI (2000)

    Google Scholar 

  14. Flanagan, C., Sabry, A., Duba, B.F., Felleisen, M.: The essence of compiling with continuations. In: PLDI (1993)

    Google Scholar 

  15. Gilray, T., Lyde, S., Adams, M.D., Might, M., Van Horn, D.: Pushdown control-flow analysis for free. In: POPL (2016)

    Google Scholar 

  16. Germane, K., Might, M.: A posteriori environment analysis with pushdown Delta CFA. In: POPL (2017)

    Google Scholar 

  17. Handjieva, M., Tzolovski, S.: Refining static analyses by trace-based partitioning using control flow. In: Static Analysis Symposium (1998)

    Google Scholar 

  18. Heintze, N., Tardieu, O.: Demand-driven pointer analysis. In: PLDI (2001)

    Google Scholar 

  19. Johnson, J.I., Labich, N., Might, M., Van Horn, D.: Optimizing abstract abstract machines. In: ICFP (2013)

    Google Scholar 

  20. Johnson, J.I., Sergey, I., Earl, C., Might, M., Van Horn, D.: Pushdown flow analysis with abstract garbage collection. In: JFP (2014)

    Google Scholar 

  21. Jagannathan, S., Thiemann, P., Weeks, S., Wright, A.K.: Single and loving it: must-alias analysis for higher-order languages. In: POPL (1998)

    Google Scholar 

  22. Midtgaard, J.: Control-flow analysis of functional programs. ACM Comput. Surv. 44, 10:1–10:33 (2012)

    Google Scholar 

  23. Might, M.: Environment analysis of higher-order languages. PhD thesis, Georgia Institute of Technology (2007)

    Google Scholar 

  24. Might, M.: Abstract interpreters for free. In: Proceedings of the 17th International Conference on Static Analysis (2010)

    Google Scholar 

  25. Might, M.: Shape analysis in the absence of pointers and structure. In: Barthe, G., Hermenegildo, M. (eds.) VMCAI 2010. LNCS, vol. 5944, pp. 263–278. Springer, Heidelberg (2010). doi:10.1007/978-3-642-11319-2_20

    Chapter  Google Scholar 

  26. Might, M., Shivers, O.: Environment analysis via \(\Delta \)CFA. In: POPL (2006)

    Google Scholar 

  27. Might, M., Shivers, O.: Improving flow analyses via \(\Gamma \)CFA: abstract garbage collection and counting. In: ICFP, Portland, Oregon (2006)

    Google Scholar 

  28. Nielson, F., Nielson, H.R., Hankin, C.: Principles of Program Analysis. Springer, New York (1999)

    Book  MATH  Google Scholar 

  29. Palmer, Z., Facchinetti, L.: DDPA implementation. https://github.com/JHU-PL-Lab/odefa/tree/sas2017-ddpa (2016)

  30. Palmer, Z., Smith, S.: Higher-order demand-driven program analysis. In: ECOOP (2016)

    Google Scholar 

  31. Reps, T.: Demand interprocedural program analysis using logic databases. In: Application of Logic Databases (1994)

    Google Scholar 

  32. Reynolds, J.: Separation logic: a logic for shared mutable data structures. In: LICS (2002)

    Google Scholar 

  33. Rehof, J., Fähndrich, M.: Type-base flow analysis: from polymorphic subtyping to CFL-reachability. In: POPL. Springer, New York (2001)

    Google Scholar 

  34. Späth, J., Do, L.N.Q., Ali, K., Bodden, E.: Demand-driven flow- and context-sensitive pointer analysis for Java. In: ECOOP, Boomerang (2016)

    Google Scholar 

  35. Sergey, I., Devriese, D., Might, M., Midtgaard, J., Darais, D., Clarke, D., Piessens, F.: Monadic abstract interpreters. In: PLDI (2013)

    Google Scholar 

  36. Shivers, O.: Control-flow analysis of higher-order languages. PhD thesis, Carnegie-Mellon University (1991). TR CMU-CS-91-145

    Google Scholar 

  37. Saha, D., Ramakrishnan, C.R.: Incremental and demand-driven points-to analysis using logic programming. In: PPDP (2005)

    Google Scholar 

  38. Steckler, P.A., Wand, M.: Lightweight closure conversion. ACM Trans. Program. Lang. Syst. 19, 48–86 (1997)

    Article  Google Scholar 

  39. Tobin-Hochstadt, S., Felleisen, M.: Logical types for untyped languages. In: ICFP (2010)

    Google Scholar 

  40. Van Horn, D. Might, M.: Abstracting abstract machines. In: ICFP (2010)

    Google Scholar 

  41. Vardoulakis, D., Shivers, O.: CFA2: a context-free approach to control-flow analysis. In: European Symposium on Programming (2010)

    Google Scholar 

  42. Xie, Y., Chou, A., Engler, D.: Using symbolic, path-sensitive analysis to detect memory access errors. In: ESEC/FSE, Archer (2003)

    Google Scholar 

Download references

Acknowledgments

The authors thank the anonymous reviewers for helpful suggestions which improved the final version of the paper.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Zachary Palmer .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2017 Springer International Publishing AG

About this paper

Cite this paper

Facchinetti, L., Palmer, Z., Smith, S.F. (2017). Relative Store Fragments for Singleton Abstraction. In: Ranzato, F. (eds) Static Analysis. SAS 2017. Lecture Notes in Computer Science(), vol 10422. Springer, Cham. https://doi.org/10.1007/978-3-319-66706-5_6

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-66706-5_6

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-66705-8

  • Online ISBN: 978-3-319-66706-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics