Advertisement

Relative Store Fragments for Singleton Abstraction

  • Leandro Facchinetti
  • Zachary Palmer
  • Scott F. Smith
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10422)

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.

Notes

Acknowledgments

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

References

  1. [Age95]
    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. [BA98]
    Bodík, R., Anik, S.: Path-sensitive value-flow analysis. In: POPL (1998)Google Scholar
  3. [BEM97]
    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 CrossRefGoogle Scholar
  4. [Bes09]
    Besson, F.: CPA beats \(\infty \)-CFA. In: Proceedings of the 11th International Workshop on Formal Techniques for Java-like Programs (2009)Google Scholar
  5. [BFL+14]
    Bergstrom, L., Fluet, M., Le, M., Reppy, J., Sandler, N.: Practical and effective higher-order optimizations. In: ICFP (2014)Google Scholar
  6. [Bou92]
    Bourdoncle, F.: Abstract interpretation by dynamic partitioning. J. Funct. Program 2, 407–423 (1992)MathSciNetCrossRefGoogle Scholar
  7. [CC77]
    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. [CWZ90]
    Chase, D.R., Wegman, M., Zadeck, F.K.: Analysis of pointers and structures. In: PLDI (1990)Google Scholar
  9. [DGS97]
    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)CrossRefGoogle Scholar
  10. [DLS02]
    Das, M., Lerner, S., Mark Seigle, E.S.P.: Path-sensitive program verification in polynomial time. In: PLDI (2002)Google Scholar
  11. [DMH15]
    Darais, D., Might, M., Van Horn, D.: Galois transformers and modular abstract interpreters. In: OOPSLA (2015)Google Scholar
  12. [EMH10]
    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. [FRD00]
    Fähndrich, M., Rehof, J., Das, M.: Scalable context-sensitive flow analysis using instantiation constraints. In: PLDI (2000)Google Scholar
  14. [FSDF93]
    Flanagan, C., Sabry, A., Duba, B.F., Felleisen, M.: The essence of compiling with continuations. In: PLDI (1993)Google Scholar
  15. [GLA+16]
    Gilray, T., Lyde, S., Adams, M.D., Might, M., Van Horn, D.: Pushdown control-flow analysis for free. In: POPL (2016)Google Scholar
  16. [GM17]
    Germane, K., Might, M.: A posteriori environment analysis with pushdown Delta CFA. In: POPL (2017)Google Scholar
  17. [HT98]
    Handjieva, M., Tzolovski, S.: Refining static analyses by trace-based partitioning using control flow. In: Static Analysis Symposium (1998)Google Scholar
  18. [HT01]
    Heintze, N., Tardieu, O.: Demand-driven pointer analysis. In: PLDI (2001)Google Scholar
  19. [JLMVH13]
    Johnson, J.I., Labich, N., Might, M., Van Horn, D.: Optimizing abstract abstract machines. In: ICFP (2013)Google Scholar
  20. [JSE+14]
    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. [JTWW98]
    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. [Mid12]
    Midtgaard, J.: Control-flow analysis of functional programs. ACM Comput. Surv. 44, 10:1–10:33 (2012)Google Scholar
  23. [Mig07]
    Might, M.: Environment analysis of higher-order languages. PhD thesis, Georgia Institute of Technology (2007)Google Scholar
  24. [Mig10a]
    Might, M.: Abstract interpreters for free. In: Proceedings of the 17th International Conference on Static Analysis (2010)Google Scholar
  25. [Mig10b]
    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 CrossRefGoogle Scholar
  26. [MS06a]
    Might, M., Shivers, O.: Environment analysis via \(\Delta \)CFA. In: POPL (2006)Google Scholar
  27. [MS06b]
    Might, M., Shivers, O.: Improving flow analyses via \(\Gamma \)CFA: abstract garbage collection and counting. In: ICFP, Portland, Oregon (2006)Google Scholar
  28. [NNH99]
    Nielson, F., Nielson, H.R., Hankin, C.: Principles of Program Analysis. Springer, New York (1999)CrossRefzbMATHGoogle Scholar
  29. [PF16]
    Palmer, Z., Facchinetti, L.: DDPA implementation. https://github.com/JHU-PL-Lab/odefa/tree/sas2017-ddpa (2016)
  30. [PS16]
    Palmer, Z., Smith, S.: Higher-order demand-driven program analysis. In: ECOOP (2016)Google Scholar
  31. [Rep94]
    Reps, T.: Demand interprocedural program analysis using logic databases. In: Application of Logic Databases (1994)Google Scholar
  32. [Rey02]
    Reynolds, J.: Separation logic: a logic for shared mutable data structures. In: LICS (2002)Google Scholar
  33. [RF01]
    Rehof, J., Fähndrich, M.: Type-base flow analysis: from polymorphic subtyping to CFL-reachability. In: POPL. Springer, New York (2001)Google Scholar
  34. [SDAB16]
    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. [SDM+13]
    Sergey, I., Devriese, D., Might, M., Midtgaard, J., Darais, D., Clarke, D., Piessens, F.: Monadic abstract interpreters. In: PLDI (2013)Google Scholar
  36. [Shi91]
    Shivers, O.: Control-flow analysis of higher-order languages. PhD thesis, Carnegie-Mellon University (1991). TR CMU-CS-91-145Google Scholar
  37. [SR05]
    Saha, D., Ramakrishnan, C.R.: Incremental and demand-driven points-to analysis using logic programming. In: PPDP (2005)Google Scholar
  38. [SW97]
    Steckler, P.A., Wand, M.: Lightweight closure conversion. ACM Trans. Program. Lang. Syst. 19, 48–86 (1997)CrossRefGoogle Scholar
  39. [THF10]
    Tobin-Hochstadt, S., Felleisen, M.: Logical types for untyped languages. In: ICFP (2010)Google Scholar
  40. [VHM10]
    Van Horn, D. Might, M.: Abstracting abstract machines. In: ICFP (2010)Google Scholar
  41. [VS10]
    Vardoulakis, D., Shivers, O.: CFA2: a context-free approach to control-flow analysis. In: European Symposium on Programming (2010)Google Scholar
  42. [XCE03]
    Xie, Y., Chou, A., Engler, D.: Using symbolic, path-sensitive analysis to detect memory access errors. In: ESEC/FSE, Archer (2003)Google Scholar

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  • Leandro Facchinetti
    • 1
  • Zachary Palmer
    • 2
  • Scott F. Smith
    • 1
  1. 1.Department of Computer ScienceThe Johns Hopkins UniversityBaltimoreUSA
  2. 2.Department of Computer ScienceSwarthmore CollegeSwarthmoreUSA

Personalised recommendations