skip to main content
10.1145/1706299.1706313acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
research-article

Verified just-in-time compiler on x86

Published:17 January 2010Publication History

ABSTRACT

This paper presents a method for creating formally correct just-in-time (JIT) compilers. The tractability of our approach is demonstrated through, what we believe is the first, verification of a JIT compiler with respect to a realistic semantics of self-modifying x86 machine code. Our semantics includes a model of the instruction cache. Two versions of the verified JIT compiler are presented: one generates all of the machine code at once, the other one is incremental i.e. produces code on-demand. All proofs have been performed inside the HOL4 theorem prover.

References

  1. HOL4 proof scripts, verified x86 code and other supporting material: http://www.cl.cam.ac.uk/~mom22/jit/.Google ScholarGoogle Scholar
  2. Andrew W. Appel. Foundational proof-carrying code. In Logic in Computer Science (LICS). IEEE, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. John Aycock. A brief history of just-in-time. ACM Computing Surveys, 35:97--113, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. R. S. Boyer and J S. Moore. Proving theorems about pure LISP functions. JACM, 22(1):129--144, 1975. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Robert S. Boyer and Yuan Yu. Automated proofs of object code for a widely used microprocessor. J. ACM, 43(1):166--192, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Hongxu Cai, Zhong Shao, and Alexander Vaynberg. Certified selfmodifying code. In Jeanne Ferrante and Kathryn S. McKinley, editors, Programming Language Design and Implementation (PLDI), pages 66--77. ACM, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Maulik A. Dave. Compiler verification: a bibliography. SIGSOFT Softw. Eng. Notes, 28(6):2--2, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. R. Gerth. Formal verification of self modifying code. In Int. Conf. for Young Computer Scientists, pages 305--313. International Academic Publishers, China, 1991.Google ScholarGoogle Scholar
  9. Michael J. C. Gordon. Mechanizing programming logics in higher order logic. In Current Trends in Hardware Verification and Automated Theorem Proving. Springer, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. David S. Hardin, Eric W. Smith, and William D. Young. A robust machine code proof framework for highly secure applications. In Panagiotis Manolios and Matthew Wilding, editors, Proceedings of the Sixth International Workshop on the ACL2 Theorem Prover and Its Applications, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. C. A. R. Hoare. An axiomatic basis for computer programming. Communications of the ACM, 12(10):576--580, 1969. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Intel. Intel 64 and IA-32 Architectures Software Developers Manual. Intel Corporation, March 2009.Google ScholarGoogle Scholar
  13. Xavier Leroy. Formal certification of a compiler back-end, or: programming a compiler with a proof assistant. In Principles of Programming Languages (POPL), pages 42--54. ACM Press, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. John Matthews, J. Strother Moore, Sandip Ray, and Daron Vroon. Verification condition generation via theorem proving. In Logic Programming and Automated Reasoning (LPAR), volume 4246 of LNCS, pages 362--376. Springer, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. John McCarthy. Recursive functions of symbolic expressions and their computation by machine, part I. Communications of the ACM, 1960. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Andrew McCreight, Zhong Shao, Chunxiao Lin, and Long Li. A general framework for certifying garbage collectors and their mutators. In Jeanne Ferrante and Kathryn S. McKinley, editors, Proceedings of the Conference on Programming Language Design and Implementation (PLDI), pages 468--479. ACM, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. J Strother Moore. Symbolic simulation: An ACL2 approach. In Ganesh Gopalakrishnan and Phillip J. Windley, editors, Formal Methods in Computer-Aided Design (FMCAD), pages 334--350, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. J. Gregory Morrisett, DavidWalker, Karl Crary, and Neal Glew. From System F to typed assembly language. In Principles of Programming Languages (POPL), pages 85--97. ACM Press, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Magnus O. Myreen. Formal verification of machine-code programs. PhD thesis, University of Cambridge, 2009.Google ScholarGoogle Scholar
  20. Magnus O. Myreen and Michael J.C. Gordon. Verified LISP implementations on ARM, x86 and PowerPC. In Stefan Berghofer, Tobias Nipkow, Christian Urban, and MakariusWenzel, editors, Theorem Proving in Higher Order Logics (TPHOLs), LNCS. Springer, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Magnus O. Myreen, Konrad Slind, and Michael J. C. Gordon. Machine-code verification for multiple architectures -- An application of decompilation into logic. In Alessandro Cimatti and Robert B. Jones, editors, Formal Methods in Computer Aided Design (FMCAD). IEEE, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Magnus O. Myreen, Konrad Slind, and Michael J.C. Gordon. Extensible proof-producing compilation. In Michael I. Schwartzbach Oege de Moor, editor, Compiler Construction (CC), LNCS. Springer, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. George C. Necula. Proof-carrying code. In Principles of Programming Languages (POPL), pages 106--119. ACM, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. John Reynolds. Separation logic: A logic for shared mutable data structures. In Proceedings of Logic in Computer Science (LICS). IEEE Computer Society, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Susmit Sarkar, Pater Sewell, Francesco Zappa Nardelli, Scott Owens, Tom Ridge, Thomas Braibant Magnus O. Myreen, and Jade Alglave. The semantics of x86-CC multiprocessor machine code. In Principles of Programming Languages (POPL). ACM, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Konrad Slind and Michael Norrish. A brief overview of HOL4. In Otmane Aït Mohamed, César Muñoz, and Sofiène Tahar, editors, Theorem Proving in Higher Order Logics (TPHOLs), LNCS, pages 28--32. Springer, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Gang Tan and Andrew W. Appel. A compositional logic for control flow. In E. Allen Emerson and Kedar S. Namjoshi, editors, Proceedings of Verification, Model Checking and Abstract Interpretation (VMCAI), LNCS. Springer, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Paul Tyma. Why are we using Java again? Commun. ACM, 41(6):38--42, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Dachuan Yu, Nadeem A. Hamid, and Zhong Shao. Building certified libraries for PCC: Dynamic storage allocation. Science of Computer Programming, 50(1-3):101--127, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Verified just-in-time compiler on x86

                    Recommendations

                    Comments

                    Login options

                    Check if you have access through your login credentials or your institution to get full access on this article.

                    Sign in
                    • Published in

                      cover image ACM Conferences
                      POPL '10: Proceedings of the 37th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
                      January 2010
                      520 pages
                      ISBN:9781605584799
                      DOI:10.1145/1706299
                      • cover image ACM SIGPLAN Notices
                        ACM SIGPLAN Notices  Volume 45, Issue 1
                        POPL '10
                        January 2010
                        500 pages
                        ISSN:0362-1340
                        EISSN:1558-1160
                        DOI:10.1145/1707801
                        Issue’s Table of Contents

                      Copyright © 2010 ACM

                      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

                      Publisher

                      Association for Computing Machinery

                      New York, NY, United States

                      Publication History

                      • Published: 17 January 2010

                      Permissions

                      Request permissions about this article.

                      Request Permissions

                      Check for updates

                      Qualifiers

                      • research-article

                      Acceptance Rates

                      Overall Acceptance Rate824of4,130submissions,20%

                      Upcoming Conference

                      POPL '25

                    PDF Format

                    View or Download as a PDF file.

                    PDF

                    eReader

                    View online with eReader.

                    eReader