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.
Access provided by Autonomous University of Puebla. Download to read the full chapter text
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
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)
Midtgaard, J., Van Horn, D.: Subcubic control flow analysis algorithms. Tech. rep., Roskilde Unversitet (2009)
Might, M.: Environment Analysis of Higher-Order Languages. PhD thesis, Georgia Institute of Technology (June 2007)
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)
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)
Nielson, F., Nielson, H.R., Hankin, C.: Principles of Program Analysis, corrected ed. Springer (December 2004)
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)
Shivers, O.G.: Control-Flow Analysis of Higher-Order Languages. PhD thesis, Carnegie Mellon University, Pittsburgh, PA, USA (1991)
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)
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)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)