Skip to main content

Demand Control-Flow Analysis

Part of the Lecture Notes in Computer Science book series (LNTCS,volume 11388)

Abstract

Points-to analysis manifests in a functional setting as control-flow analysis. Despite the ubiquity of demand points-to analyses, there are no analogous demand control-flow analyses for functional languages in general. We present demand 0CFA, a demand control-flow analysis that offers clients in a functional setting the same pricing model that demand points-to analysis clients enjoy in an imperative setting. We establish demand 0CFA’s correctness via an intermediary exact semantics, demand evaluation, that can potentially support demand variants of more-precise analyses.

This is a preview of subscription content, access via your institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • DOI: 10.1007/978-3-030-11245-5_11
  • Chapter length: 21 pages
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
eBook
USD   79.99
Price excludes VAT (USA)
  • ISBN: 978-3-030-11245-5
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
Softcover Book
USD   99.99
Price excludes VAT (USA)
Fig. 1.
Fig. 2.
Fig. 3.
Fig. 4.
Fig. 5.
Fig. 6.
Fig. 7.
Fig. 8.
Fig. 9.
Fig. 10.
Fig. 11.

References

  1. Ashley, J.M., Dybvig, R.K.: A practical and flexible flow analysis for higher-order languages. ACM Trans. Program. Lang. Syst. 20, 845–868 (1998)

    CrossRef  Google Scholar 

  2. Biswas, S.K.: A demand-driven set-based analysis. In: Proceedings of the 24th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 1997. ACM (1997)

    Google Scholar 

  3. Darais, D., Labich, N., Nguyen, P.C., Van Horn, D.: Abstracting definitional interpreters (functional pearl). Proc. ACM Program. Lang. 1(ICFP), 12 (2017)

    CrossRef  Google Scholar 

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

    CrossRef  Google Scholar 

  5. 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 

  6. Germane, K., Might, M.: Demand control-flow analysis. Technical report, January 2019. http://kimball.germane.net/germane-dcfa-techreport.pdf

  7. Gilray, T., Lyde, S., Adams, M.D., Might, M., Van Horn, D.: Pushdown control-flow analysis for free. In: Proceedings of the 43rd Annual ACM SIGPLAN Symposium on Principles of Programming Languages, POPL 2016. ACM (2016)

    Google Scholar 

  8. Heintze, N., McAllester, D.: Linear-time subtransitive control flow analysis. In: Proceedings of the ACM SIGPLAN 1997 Conference on Programming Language Design and Implementation, PLDI 1997. ACM Press (1997)

    Google Scholar 

  9. Heintze, N., Tardieu, O.: Demand-driven pointer analysis. In: ACM SIGPLAN Notices, vol. 36, pp. 24–34. ACM (2001)

    Google Scholar 

  10. Johnson, J.I., Van Horn, D.: Abstracting abstract control. In: Proceedings of the 10th ACM Symposium on Dynamic Languages. ACM (2014)

    Google Scholar 

  11. Midtgaard, J., Jensen, T.: A calculational approach to control-flow analysis by abstract interpretation. In: Alpuente, M., Vidal, G. (eds.) SAS 2008. LNCS, vol. 5079, pp. 347–362. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-69166-2_23

    CrossRef  MATH  Google Scholar 

  12. Might, M., Smaragdakis, Y., Van Horn, D.: Resolving and exploiting the k-CFA paradox: illuminating functional vs. object-oriented program analysis. In: Proceedings of the 2010 ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2010. ACM Press (2010)

    Google Scholar 

  13. Nielson, F., Nielson, H.R.: Infinitary control flow analysis: a collecting semantics for closure analysis. In: Proceedings of the 24th ACM SIGPLAN Symposium on Principles of Programming Languages, POPL 1997. ACM Press (1997)

    Google Scholar 

  14. Nielson, F., Nielson, H.R., Hankin, C.: Principles of Program Analysis. Springer, Heidelberg (1999). https://doi.org/10.1007/978-3-662-03811-6

    CrossRef  MATH  Google Scholar 

  15. Palmer, Z., Smith, S.F.: Higher-order demand-driven program analysis. In: 30th European Conference on Object-Oriented Programming (2016)

    Google Scholar 

  16. Palsberg, J.: Closure analysis in constraint form. ACM Trans. Program. Lang. Syst. 17(1), 47–62 (1995)

    MathSciNet  CrossRef  Google Scholar 

  17. Shivers, O.: Control-flow analysis of higher-order languages. Ph.D. thesis, Carnegie Mellon University (1991)

    Google Scholar 

  18. Sridharan, M., Bodík, R.: Refinement-based context-sensitive points-to analysis for Java. In: Proceedings of the 27th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2006, pp. 387–400. ACM, New York (2006)

    Google Scholar 

  19. Sridharan, M., Gopan, D., Shan, L., Bodík, R.: Demand-driven points-to analysis for Java. In: Proceedings of the 20th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2005, pp. 59–76. ACM, New York (2005)

    Google Scholar 

  20. Van Horn, D., Mairson, H.G.: Flow analysis, linearity, and PTIME. In: Alpuente, M., Vidal, G. (eds.) SAS 2008. LNCS, vol. 5079, pp. 255–269. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-69166-2_17

    CrossRef  MATH  Google Scholar 

  21. Van Horn, D., Might, M.: Abstracting abstract machines. In: Proceedings of the 15th ACM International Conference on Functional Programming, ICFP 2010, pp. 51–62. ACM, New York (2010)

    Google Scholar 

  22. Vardoulakis, D., Shivers, O.: CFA2: a context-free approach to control-flow analysis. Logical Methods Comput. Sci. (2011)

    Google Scholar 

  23. Wei, G., Decker, J., Rompf, T.: Refunctionalization of abstract abstract machines: bridging the gap between abstract machines and abstract definitional interpreters (functional pearl). Proc. ACM Program. Lang. 2(ICFP), 105:1–105:28 (2018)

    CrossRef  Google Scholar 

Download references

Acknowledgement

This material is partially based on research sponsored by DARPA under agreement number AFRL FA8750-15-2-0092 and by NSF under CAREER grant 1350344. The U.S. Government is authorized to reproduce and distribute reprints for Governmental purposes notwithstanding any copyright notation thereon.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Kimball Germane .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and Permissions

Copyright information

© 2019 Springer Nature Switzerland AG

About this paper

Verify currency and authenticity via CrossMark

Cite this paper

Germane, K., McCarthy, J., Adams, M.D., Might, M. (2019). Demand Control-Flow Analysis. In: Enea, C., Piskac, R. (eds) Verification, Model Checking, and Abstract Interpretation. VMCAI 2019. Lecture Notes in Computer Science(), vol 11388. Springer, Cham. https://doi.org/10.1007/978-3-030-11245-5_11

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-11245-5_11

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-11244-8

  • Online ISBN: 978-3-030-11245-5

  • eBook Packages: Computer ScienceComputer Science (R0)