Skip to main content

Control-Flow Analysis with SAT Solvers

  • Conference paper
Trends in Functional Programming (TFP 2013)

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

Included in the following conference series:

  • 511 Accesses

Abstract

Control-flow analyses statically determine the control-flow of programs. This is a nontrivial problem for higher-order programming languages. This work attempts to leverage the power of SAT solvers to answer questions regarding control-flow. A brief overview of a traditional control-flow analysis is presented. Then an encoding is given which has the property that any satisfying assignment will give a conservative approximation of the true control-flow, along with additional ideas to improve the precision and efficiency of the encoding. The results of the encodings are then compared to those of a traditional implementation on several example programs. This approach is competitive in some instances with hand-optimized implementations. Finally, the paper concludes with a discussion of the implications of these results and work that can build upon them.

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 PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 49.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

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Flanagan, C., Sabry, A., Duba, B.F., Felleisen, M.: The essence of compiling with continuations. In: PLDI 1993: Proceedings of the ACM SIGPLAN 1993 Conference on Programming Language Design and Implementation, pp. 237–247. ACM, New York (1993)

    Chapter  Google Scholar 

  2. Midtgaard, J., Van Horn, D.: Subcubic control flow analysis algorithms. Tech. rep., Roskilde Unversitet (2009)

    Google Scholar 

  3. Might, M.: Environment Analysis of Higher-Order Languages. PhD thesis, Georgia Institute of Technology (June 2007)

    Google Scholar 

  4. Might, M., Prabhu, T.: Interprocedural dependence analysis of higher-order programs via stack reachability. In: Proceedings of the 2009 Workshop on Scheme and Functional Programming, Boston, Massachussetts, USA (2009)

    Google Scholar 

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

    Google Scholar 

  6. Nielson, F., Nielson, H.R., Hankin, C.: Principles of Program Analysis, corrected ed. Springer (December 2004)

    Google Scholar 

  7. Prabhu, T., Ramalingam, S., Might, M., Hall, M.: EigenCFA: Accelerating flow analysis with GPUs. In: Proceedings of the 38th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, vol. 38, pp. 511–522. ACM Press, New York (2011)

    Google Scholar 

  8. Shivers, O.G.: Control-Flow Analysis of Higher-Order Languages. PhD thesis, Carnegie Mellon University, Pittsburgh, PA, USA (1991)

    Google Scholar 

  9. Van Horn, D., Mairson, H.G.: Relating complexity and precision in control flow analysis. In: ICFP 2007: Proceedings of the 12th ACM SIGPLAN International Conference on Functional Programming, pp. 85–96. ACM, New York (2007)

    Chapter  Google Scholar 

  10. Van Horn, D., Mairson, H.G.: Deciding k-CFA is complete for EXPTIME. In: ICFP 2008: Proceedings of the 13th ACM SIGPLAN International Conference on Functional Programming, pp. 275–282. ACM Press (2008)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Lyde, S., Might, M. (2014). Control-Flow Analysis with SAT Solvers. In: McCarthy, J. (eds) Trends in Functional Programming. TFP 2013. Lecture Notes in Computer Science, vol 8322. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-45340-3_8

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-45340-3_8

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-45339-7

  • Online ISBN: 978-3-642-45340-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics