CoqJVM: An Executable Specification of the Java Virtual Machine Using Dependent Types

  • Robert Atkey
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4941)


We describe an executable specification of the Java Virtual Machine (JVM) within the Coq proof assistant. The principal features of the development are that it is executable, meaning that it can be tested against a real JVM to gain confidence in the correctness of the specification; and that it has been written with heavy use of dependent types, this is both to structure the model in a useful way, and to constrain the model to prevent spurious partiality. We describe the structure of the formalisation and the way in which we have used dependent types.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Aspinall, D., Sevcík, J.: Formalising Java’s Data Race Free Guarantee. In: Schneider, K., Brandt, J. (eds.) TPHOLs 2007. LNCS, vol. 4732, pp. 22–37. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  2. 2.
    Barthe, G., Dufay, G., Jakubiec, L., Serpette, B., de Sousa, S.M.: A Formal Executable Semantics of the JavaCard Platform. In: Sands, D. (ed.) ESOP 2001. LNCS, vol. 2028, pp. 302–319. Springer, Heidelberg (2001)Google Scholar
  3. 3.
    Bertot, Y., Castéran, P.: Interactive Theorem Proving and Program Development: Coq’Art: The Calculus of Inductive Constructions. Springer, Heidelberg (2004)zbMATHGoogle Scholar
  4. 4.
    Klein, G., Nipkow, T.: A machine-checked model for a Java-like language, virtual machine and compiler. ACM Transactions on Programming Languages and Systems 28(4), 619–695 (2006)CrossRefGoogle Scholar
  5. 5.
    Lee, D.K., Crary, K., Harper, R.: Towards a Mechanized Metatheory of Standard ML. In: POPL 2007: Proceedings of the 34th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pp. 173–184. ACM Press, New York (2007)CrossRefGoogle Scholar
  6. 6.
    Leroy, X.: Formal certification of a compiler back-end or: programming a compiler with a proof assistant. In: POPL 2006: Conference record of the 33rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pp. 42–54. ACM Press, New York (2006)CrossRefGoogle Scholar
  7. 7.
    Liang, S., Bracha, G.: Dynamic class loading in the Java virtual machine. In: OOPSLA 1998: Proceedings of the 13th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, pp. 36–44. ACM Press, New York (1998)CrossRefGoogle Scholar
  8. 8.
    Lindholm, T., Yellin, F.: The Java Virtual Machine Specification, 2nd edn. Addison-Wesley, Reading (1999)Google Scholar
  9. 9.
    Liu, H., Moore, J.S.: Executable JVM model for analytical reasoning: A study. Sci. Comput. Program. 57(3), 253–274 (2005)CrossRefMathSciNetzbMATHGoogle Scholar
  10. 10.
    Manson, J., Pugh, W., Adve, S.V.: The Java memory model. In: POPL 2005: Proceedings of the 32nd ACM SIGPLAN-SIGACT symposium on Principles of Programming Languages, pp. 378–391. ACM Press, New York (2005)CrossRefGoogle Scholar
  11. 11.
    The Coq development team. The Coq proof assistant reference manual. LogiCal Project, Version 8.0 (2004)Google Scholar
  12. 12.
    Necula, G.C.: Proof-carrying code. In: Proceedings of POPL 1997 (January 1997)Google Scholar
  13. 13.
    Stärk, R., Schmid, J., Börger, E.: Java and the Java Virtual Machine – Definition, Verification, Validation. Springer, Heidelberg (2001)zbMATHGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2008

Authors and Affiliations

  • Robert Atkey
    • 1
  1. 1.LFCS, School of InformaticsUniversity of EdinburghEdinburghUK

Personalised recommendations