Academia.eduAcademia.edu

Outline

Gillian, Part I: A Multi-language Platform for Symbolic Execution

2020, Artifact Digital Object Group

https://doi.org/10.1145/3395646

Abstract

We introduce Gillian, a platform for developing symbolic analysis tools for programming languages. Here, we focus on the symbolic execution engine at the heart of Gillian, which is parametric on the memory model of the target language. We give a formal description of the symbolic analysis and a modular implementation that closely follows this description. We prove a parametric soundness result, introducing restriction on abstract states, which generalises path conditions used in classical symbolic execution. We instantiate Gillian to obtain trusted symbolic testing tools for JavaScript and C, and use these tools to find bugs in real-world code, thus demonstrating the viability of our parametric approach. CCS Concepts: • Theory of computation → Program analysis; Program semantics; • Software and its engineering → Formal language definitions.

References (66)

  1. R. Baldoni, E. Coppa, D. Cono D'Elia, C. Demetrescu, and I. Finocchi. 2018. A Survey of Symbolic Execution Techniques. ACM Computing Surveys 51, 3 (2018), 50:1ś50:39.
  2. A. Banerjee and D. A. Naumann. 2002. Secure Information Flow and Pointer Confinement in a Java-like Language. In CSFW.
  3. J. Berdine, C. Calcagno, and P. W. O'Hearn. 2005. Symbolic Execution with Separation Logic. In APLAS. 52ś68.
  4. F. Besson, S. Blazy, and P. Wilke. 2017. CompCertS: A Memory-Aware Verified C Compiler Using Pointer as Integer Semantics. In ITP.
  5. M. Bodin, P. Gardner, T. Jensen, and A. Schmitt. 2019. Skeletal Seman- tics and their Interpretations. PACMPL 3, POPL (2019), 44:1ś44:31.
  6. D. Bogdanas and G. Rosu. 2015. K-Java: A Complete Semantics of Java. In POPL.
  7. J. Bornholt and E. Torlak. 2018. Finding Code that Explodes under Symbolic Evaluation. PACMPL 2, OOPSLA (2018), 149:1ś149:26.
  8. M. Botinčan, D. Distefano, M. Dodds, R. Grigore, D. Naudžiūnienė, and M. J. Parkinson. 2011. coreStar: The Core of jStar. In Boogie.
  9. S. Bucur, J. Kinder, and G. Candea. 2014. Prototyping Symbolic Execu- tion Engines for Interpreted Languages. In ASPLOS.
  10. C. Cadar, D. Dunbar, and D. R. Engler. 2008. KLEE: Unassisted and Automatic Generation of High-Coverage Tests for Complex Systems Programs.. In OSDI.
  11. C. Cadar, V. Ganesh, P. M. Pawlowski, D. L. Dill, and D. R. Engler. 2008. EXE: Automatically Generating Inputs of Death. ACM Transactions on Information and System Security 12, 2 (2008), 10:1ś10:38.
  12. C. Cadar, P. Godefroid, S. Khurshid, C. S. Păsăreanu, K. Sen, N. Till- mann, and W. Visser. 2011. Symbolic Execution for Software Testing in Practice: Preliminary Assessment. In ICSE.
  13. C. Cadar and K. Sen. 2013. Symbolic Execution for Software Testing: Three Decades Later. Commun. ACM 56 (2013), 82ś90.
  14. C. Calcagno and D. Distefano. 2011. Infer: An Automatic Program Verifier for Memory Safety of C Programs. In NASA Formal Methods Symposium.
  15. C. Calcagno, D. Distefano, P. W. O'Hearn, and H. Yang. 2011. Compo- sitional Shape Analysis by Means of Bi-Abduction. JACM 58 (2011), 26:1ś26:66.
  16. P. Cousot and R. Cousot. 1977. Abstract Interpretation: A Unified Lattice Model for Static Analysis of Programs by Construction or Approximation of Fixpoints. In POPL.
  17. D. Darais, M. Might, and D. Van Horn. 2015. Galois transformers and modular abstract interpreters: reusable metatheory for program analysis. In OOPSLA.
  18. R. Dockins, A. Foltzer, J. Hendrix, B. Huffman, D. McNamee, and A. Tomb. 2016. Constructing Semantic Models of Programs with the Software Analysis Workbench. In VSSTE.
  19. ECMA TC39. 2017. Test262 Test Suite. https://github.com/tc39/test262.
  20. D. Engler and D. Dunbar. 2007. Under-constrained Execution: Making Automatic Code Destruction Easy and Scalable. In ISSTA.
  21. R. B. Findler, M. Klein, B. Fetscher, and M. Felleisen. 2018. Redex: Practical Semantics Engineering. Technical Report.
  22. G. Roşu and T. Florin Şerbănuţă . 2010. An Overview of the K Semantic Framework. Journal of Logic and Algebraic Programming 79, 6 (2010), 397ś434.
  23. P. Godefroid, N. Klarlund, and K. Sen. 2005. DART: Directed Automated Random Testing. In ACM Sigplan Notices.
  24. P. Godefroid, M. Y. Levin, and D. A. Molnar. 2008. Automated Whitebox Fuzz Testing. In NDSS.
  25. P. Godefroid, A. V. Nori, S. K. Rajamani, and S. Tetali. 2010. Composi- tional May-must Program Analysis: Unleashing the Power of Alterna- tion. In POPL.
  26. C. Hathhorn, C. Ellison, and G. Rosu. 2015. Defining the undefinedness of C. In PLDI.
  27. E. Hildenbrandt, M. Saxena, N. Rodrigues, X. Zhu, P. Daian, D. Guth, B. M. Moore, D. Park, Y. Zhang, A. Stefanescu, and G. Rosu. 2018. KEVM: A Complete Formal Semantics of the Ethereum Virtual Ma- chine. In CSF.
  28. D. Van Horn and M. Might. 2010. Abstracting Abstract Machines. In ICFP.
  29. D. Van Horn and Matthew Might. 2012. Systematic Abstraction of Abstract Machines. J. Funct. Program. 22, 4-5 (2012), 705ś746.
  30. T. Kapus and C. Cadar. 2019. A Segmented Memory Model for Symbolic Execution. In ESEC/FSE.
  31. F. Kirchner, N. Kosmatov, V. Prevosto, J. Signoles, and B. Yakobowski. 2015. Frama-C: A software analysis perspective. Formal Aspects of Computing 27, 3 (2015), 573ś609.
  32. D. Kroening and M. Tautschnig. 2014. CBMC ś C Bounded Model Checker. In TACAS.
  33. S. Lau, V. B. F. Gomes, K. Memarian, J. Pichon-Pharabod, and Sewell P. 2019. Cerberus-BMC: A Principled Reference Semantics and Explo- ration Tool for Concurrent and Sequential C. In CAV.
  34. X. Leroy, A. W. Appel, S. Blazy, and G. Stewart. 2012. The CompCert Memory Model, Version 2. Research Report RR-7987. INRIA. 26 pages.
  35. G. Li, E. Andreasen, and I. Ghosh. 2014. SymJS: Automatic Symbolic Testing of JavaScript Web Applications. In FSE.
  36. B. Loring, D. Mitchell, and J. Kinder. 2019. Sound Regular Expression Semantics for Dynamic Symbolic Execution of JavaScript. In PLDI.
  37. M. Might. 2010. Abstract Interpreters for Free. In SAS.
  38. P. Müller, M. Schwerhoff, and A. J. Summers. 2016. Viper: A Verification Infrastructure for Permission-Based Reasoning. In VMCAI.
  39. P. Müller, M. Schwerhoff, and A. J. Summers. 2017. Viper: A Verification Infrastructure for Permission-Based Reasoning. In Dependable Software Systems Engineering.
  40. D. P. Mulligan, S. Owens, K. E. Gray, T. Ridge, and P. Sewell. 2014. Lem: Reusable Engineering of Real-World Semantics. In ICFP.
  41. L. Nelson, J. Bornholt, R. Gu, A. Baumann, E. Torlak, and X. Wang. 2019. Scaling Symbolic Evaluation for Automated Verification of Systems Code with Serval. In SOSP.
  42. npm, Inc. 2018. npm, a Package Manager for JavaScript. https://www. npmjs.com.
  43. Peter W. O'Hearn. 2020. Incorrectness logic. PACMPL 4, POPL (2020), 10:1ś10:32.
  44. D. Park, A. Stefanescu, and G. Rosu. 2015. KJS: a Complete Formal Semantics of JavaScript. In PLDI.
  45. D. Park, Y. Zhang, M. Saxena, P. Daian, and G. Rosu. 2018. A Formal Verification Tool for Ethereum VM Bytecode. In FSE.
  46. Y. Phang Khoo, B.-Y. E. Chang, and J. S. Foster. 2010. Mixing type checking and symbolic execution. In PLDI.
  47. Racket. 2017. The Racket Programming Language. racket-lang.org.
  48. D. A. Ramos and D. R. Engler. 2015. Under-Constrained Symbolic Execution: Correctness Checking for Real Code. In USENIX Security Symposium.
  49. M. Raza and P. Gardner. 2009. Footprints in Local Reasoning. Logical Methods in Computer Science 5, 2 (2009).
  50. J. C. Reynolds. 2002. Separation Logic: A Logic for Shared Mutable Data Structures. In LICS.
  51. S. Panić. 2014. Collections-C: A Library of Generic Data Structures. https://github.com/srdja/Collections-C.
  52. J. Fragoso Santos, P. Maksimović, S.-É. Ayoun, and P. Gardner. 2020. Gillian: Compositional Symbolic Execution for All. arXiv:2001.05059
  53. J. Fragoso Santos, P. Maksimovic, T. Grohens, J. Dolby, and P. Gardner. 2018. Symbolic Execution for JavaScript. In PPDP.
  54. J. Fragoso Santos, P. Maksimovic, D. Naudziuniene, T. Wood, and P. Gardner. 2018. JaVerT: JavaScript Verification Toolchain. PACMPL 2, POPL (2018), 50:1ś50:33.
  55. J. Fragoso Santos, P. Maksimovic, G. Sampaio, and P. Gardner. 2019. JaVerT 2.0: Compositional Symbolic Execution for JavaScript. PACMPL 3, POPL (2019), 66:1ś66:31.
  56. M. Santos. 2016. Buckets-JS: A JavaScript Data Structure Library. https://github.com/mauriciosantos/Buckets-JS.
  57. P. Saxena, D. Akhawe, S. Hanna, F. Mao, S. McCamant, and D. Song. 2010. A Symbolic Execution Framework for JavaScript. In S&P.
  58. D. A. Schmidt. 1995. Natural-Semantics-Based Abstract Interpretation (Preliminary Version). In SAS.
  59. I. Sergey, D. Devriese, M. Might, J. Midtgaard, D. Darais, D. Clarke, and F. Piessens. 2013. Monadic Abstract Interpreters. In PLDI.
  60. P. Sewell, F. Zappa Nardelli, S. Owens, G. Peskine, T. Ridge, S. Sarkar, and R. Strnisa. 2010. Ott: Effective Tool Support for the Working Semanticist. Funct. Program. 20, 1 (2010), 71ś122.
  61. A. Stefanescu, D. Park, S. Yuwen, Y. Li, and G. Rosu. 2016. Semantics- based Program Verifiers for All Languages. In OOPSLA.
  62. The Gillian Team. 2020. Gillian on GitHub. https://github.com/ GillianPlatform/Gillian.
  63. The Gillian Team. 2020. The Official Gillian Website. https:// gillianplatform.github.io.
  64. E. Torlak and R. Bodík. 2013. Growing Solver-aided Languages with Rosette. In Onward!
  65. E. Torlak and R. Bodík. 2014. A Lightweight Symbolic Virtual Machine for Solver-Aided Host Languages. In PLDI.
  66. E. Wittern, A. T. T. Ying, Y. Zheng, J. Dolby, and J. Alain Laredo. 2017. Statically checking web API requests in JavaScript. In ICSE.