Skip to main content

Certify Once, Trust Anywhere: Modular Certification of Bytecode Programs for Certified Virtual Machine

  • Conference paper
Programming Languages and Systems (APLAS 2009)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 5904))

Included in the following conference series:

  • 667 Accesses

Abstract

Bytecodes and virtual machines (VM) are prevailing programming facilities in contemporary software industry due to their ease of portability across various platforms. Thus, it is critical to improve their trustworthiness. This paper addresses the interesting and challenging problem of certifying bytecode programs over certified VMs. Our solutions to this problem include: 1) A logical systems (CBP) for a bytecode machine is built to modularly certify bytecode programs with abstract control stacks and unstructured control flows, 2) and the corresponding stack-based virtual machine is implemented and certified, 3) a simulation relation between bytecode program and VM implementation is developed and proved to achieve the objective that once some safety property of a bytecode program is certified in CBP system, the property will be preserved on any certified VM. We prove the soundness and demonstrate its power by certifying some example programs with the Coq proof assistant. This work not only provides a solid theoretical foundation for reasoning about bytecode programs, but also gains insight into building proof-preserving compilers.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Similar content being viewed by others

References

  1. Appel, A.W.: Foundational proof-carrying code. In: Proc. 16th IEEE Symposium on Logic in Computer Science, pp. 247–258. IEEE Computer Society, Los Alamitos (2001)

    Chapter  Google Scholar 

  2. Bannwart, F., Müller, P.: A program logic for bytecode. In: Proceedings of Bytecode?5. Electronic Notes in Theoretical Computer Science, pp. 255–273. Elsevier, Amsterdam (2005)

    Google Scholar 

  3. Barthe, G., Grégoire, B., Kunz, C., Rezk, T.: Certificate translation for optimizing compilers. ACM Transactions on Programming Languages and Systems 31(5), 18:1–18:45 (2009)

    Google Scholar 

  4. Benton, N.: A typed, compositional logic for a stack-based abstract machine. In: Yi, K. (ed.) APLAS 2005. LNCS, vol. 3780, pp. 364–380. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  5. Chen, J., Hawblitzel, C., Perry, F., Emmi, M., Condit, J., Coetzee, D., Pratikaki, P.: Type-preserving compilation for large-scale optimizing object-oriented compilers. In: Prog. Lang. Design and Impl (PLDI 2008), pp. 183–192. ACM, New York (2008)

    Chapter  Google Scholar 

  6. Chlipala, A.: A certified type-preserving compiler from lambda calculus to assembly language. In: Prog. Lang. Design and Impl (PLDI 2007), pp. 54–65. ACM, New York (2007)

    Chapter  Google Scholar 

  7. Coq Development Team. The Coq proof assistant reference manual. Version 8.2 (2008)

    Google Scholar 

  8. ECMA. Standard ECMA-335 Common Language Infrastructure (2006)

    Google Scholar 

  9. Feng, X., Ni, Z., Shao, Z., Guo, Y.: An open framework for foundational proof-carrying code. In: Proc. 2007 Workshop on Types in Lang. Design and Impl., pp. 67–78 (2007)

    Google Scholar 

  10. Feng, X., Shao, Z., Vaynberg, A., Xiang, S., Ni, Z.: Modular verification of assembly code with stack-based control abstractions. In: Prog. Lang. Design and Impl (PLDI 2006), pp. 401–414. ACM Press, New York (2006)

    Chapter  Google Scholar 

  11. Hoare, C.A.R.: An axiomatic basis for computer programming. Communications of the ACM 26(1), 53–56 (1969)

    Article  Google Scholar 

  12. Lawton, K., Denney, B., Guarneri, N.D., Ruppert, V., Bothamy, C.: Bochs user manual (2008), http://bochs.sourceforge.net/

  13. League, C., Shao, Z., Trifonov, V.: Precision in practice: A type-preserving java compiler. In: Hedin, G. (ed.) CC 2003. LNCS, vol. 2622, pp. 106–120. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  14. Leinenbach, D., Paul, W., Petrova, E.: Towards the formal verification of a c0 compiler: Code generation and implementation correctnes. In: SEFM 2005: Proceedings of the Third IEEE International Conference on Software Engineering and Formal Methods, Washington, DC, USA, pp. 2–12. IEEE Computer Society, Los Alamitos (2005)

    Chapter  Google Scholar 

  15. Leroy, X.: A formally verified compiler back-end. Draft (2008), http://pauillac.inria.fr/~leroy/publi/compcert-backend.pdf

  16. Lindholm, T., Yellin, F.: The java virtual machine specification, 2nd edn. (1999)

    Google Scholar 

  17. Ni, Z., Shao, Z.: Certified assembly programming with embedded code pointers. In: POPL 2006, pp. 320–333 (2006)

    Google Scholar 

  18. Quigley, C.L.: A programming logic for java bytecode programs. In: Proc. of 16th Int. Conf. on Theorem Proving in Higher-Order Logics, pp. 41–54. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  19. Saabas, A., Uustalu, T.: Compositional type systems for stack-based low-level languages. In: Proc. of 12th Computing, Australasian Theory Symp., Australian, pp. 27–39 (2006)

    Google Scholar 

  20. Sun Microsystem. Top25 bugs (2009), http://bugs.sun.com/bugdatabase/top25_bugs.do/

  21. Tan, G., Appel, A.W.: A compositional logic for control flow. In: Emerson, E.A., Namjoshi, K.S. (eds.) VMCAI 2006. LNCS, vol. 3855, pp. 80–94. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  22. Vanderwaart, J.C., Crary, K.: A typed interface for garbage collection. In: Types in Lang. Design and Impl (TLDI 2003), pp. 109–122 (2003)

    Google Scholar 

  23. Weiss, M., de Ferrire, F., Delsart, B., Fabre, C., Hirsch, F., Johnson, E.A., Joloboff, V., Roy, F., Siebert, F., Spengler, X.: Turboj, a java bytecode-to-native compiler. In: Müller, F., Bestavros, A. (eds.) LCTES 1998. LNCS, vol. 1474, pp. 119–130. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2009 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Dong, Y., Ren, K., Wang, S., Zhang, S. (2009). Certify Once, Trust Anywhere: Modular Certification of Bytecode Programs for Certified Virtual Machine. In: Hu, Z. (eds) Programming Languages and Systems. APLAS 2009. Lecture Notes in Computer Science, vol 5904. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-10672-9_20

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-10672-9_20

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-10671-2

  • Online ISBN: 978-3-642-10672-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics