OpenJML: JML for Java 7 by Extending OpenJDK

  • David R. Cok
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6617)


The Java Modeling Language is a widely used specification language for Java. However, the tool support has not kept pace with advances in the Java language. This paper describes OpenJML, an implementation of JML tools built by extending the OpenJDK Java tool set. OpenJDK has a readily extendible architecture, though its details could be revised to further facilitate extension. The result is a suite of JML tools for Java 7 that provides static analysis, specification documentation, and runtime checking, an API that is used for other tools, uses Eclipse as an IDE, and can be extended for further research. In addition, OpenJML can leverage the community effort devoted to OpenJDK.


OpenJML JML specification verification OpenJDK ESC/Java2 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Barnett, M., Leino, K.R.M., Schulte, W.: The Spec# programming system: An overview. In: Barthe, G., Burdy, L., Huisman, M., Lanet, J.-L., Muntean, T. (eds.) CASSIS 2004. LNCS, vol. 3362, pp. 49–69. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  2. 2.
    Beckert, B., Hähnle, R., Schmitt, P.H. (eds.): Verification of Object-Oriented Software. LNCS (LNAI), vol. 4334. Springer, Heidelberg (2007)Google Scholar
  3. 3.
    Burdy, L., Cheon, Y., Cok, D.R., Ernst, M.D., Kiniry, J.R., Leavens, G.T., Leino, K.R.M., Poll, E.: An overview of JML tools and applications. In: Arts, T., Fokkink, W. (eds.) Eighth International Workshop on Formal Methods for Industrial Critical Systems (FMICS 2003). ENTCS, vol. 80, pp. 73–89. Elsevier, Amsterdam (2003)Google Scholar
  4. 4.
    Chalin, P., Robby, James, P., Lee, J., Karabotsos, G.: Towards an industrial grade IVE for Java and next generation research platform for JML. STTT 12, 429–446 (2010) 10.1007/s10009-010-0164-8CrossRefGoogle Scholar
  5. 5.
    Cheon, Y., Leavens, G.T.: A runtime assertion checker for the Java Modeling Language (JML). In: Arabnia, H.R., Mun, Y. (eds.) Proceedings of the International Conference on Software Engineering Research and Practice (SERP 2002), Las Vegas, Nevada, USA, June 24-27, pp. 322–328. CSREA Press (2002)Google Scholar
  6. 6.
    Cochran, D., Kiniry, J.R.: Votail: A Formally Specified and Verified Ballot Counting System for Irish PR-STV Elections. In: FoVeOOS 2010 (2010)Google Scholar
  7. 7.
    Cok, D.: Improved usability and performance of SMT solvers for debugging specifications. STTT 12, 467–481 (2010)CrossRefGoogle Scholar
  8. 8.
    Cok, D.R., Kiniry, J.R.: ESC/Java2: Uniting eSC/Java and JML. In: Barthe, G., Burdy, L., Huisman, M., Lanet, J.-L., Muntean, T. (eds.) CASSIS 2004. LNCS, vol. 3362, pp. 108–128. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  9. 9.
    Dietl, W., Dietzel, S., Ernst, M.D., Muşlu, K., Schiller, T.: Building and using pluggable type-checkers. In: Proceedings of the 33rd International Conference on Software Engineering, ICSE 2011, Waikiki, Hawaii, USA, May 25–27 (2011)Google Scholar
  10. 10.
  11. 11.
    Ernst, M.D., Perkins, J.H., Guo, P.J., McCamant, S., Pacheco, C., Tschantz, M.S., Xiao, C.: The Daikon system for dynamic detection of likely invariants. Science of Computer Programming 69(1–3), 35–45 (2007)CrossRefzbMATHGoogle Scholar
  12. 12.
    Fähndrich, M., Barnett, M., Logozzo, F.: Embedded contract languages. In: Proceedings of the 2010 ACM Symposium on Applied Computing, SAC 2010, pp. 2103–2110. ACM, New York (2010)Google Scholar
  13. 13.
    Flanagan, C., Leino, K.R.M.: Houdini, an annotation assistant for eSC/Java. In: Oliveira, J.N., Zave, P. (eds.) FME 2001. LNCS, vol. 2021, pp. 500–517. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  14. 14.
    Leavens, G.T., Baker, A.L., Ruby, C.: JML: A notation for detailed design. In: Kilov, H., Rumpe, B., Simmonds, I. (eds.) Behavioral Specifications of Businesses and Systems, pp. 175–188. Kluwer Academic Publishers, Boston (1999)CrossRefGoogle Scholar
  15. 15.
    Leavens, G.T., Kiniry, J.R., Poll, E.: A JML tutorial: Modular specification and verification of functional behavior for Java. In: Damm, W., Hermanns, H. (eds.) CAV 2007. LNCS, vol. 4590, Springer, Heidelberg (2007)Google Scholar
  16. 16.
    Gary, T.: Leavens, Erik Poll, Curtis Clifton, Yoonsik Cheon, Clyde Ruby, David R. Cok, Peter Müller, Joseph Kiniry, Patrice Chalin, and Daniel M. Zimmerman. JML reference manual (September 2009),
  17. 17.
    Rustan, K., Leino, M.: Greg Nelson, and James B. Saxe. ESC/Java user’s manual. Technical note, Compaq Systems Research Center (October 2000)Google Scholar
  18. 18.
  19. 19.
  20. 20.
    Taylor, K.B., Rieken, J., Leavens, G.T.: Adapting the Java Modeling Language (JML) for Java 5 annotations. Technical Report 08-06, Department of Computer Science, Iowa State University, 226 Atanasoff Hall, Ames, Iowa 50011 (April 2008)Google Scholar
  21. 21.
    Zimmerman, D.M., Nagmoti, R.: JMLUnit: The Next Generation. In: Beckert, B., Marché, C. (eds.) FoVeOOS 2010. LNCS, vol. 6528, pp. 183–197. Springer, Heidelberg (2011), CrossRefGoogle Scholar
  22. 22.
    Why web site,

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • David R. Cok
    • 1
  1. 1.GrammaTech, Inc.IthacaUSA

Personalised recommendations