Skip to main content

Generating JML Specifications from Alloy Expressions

  • Conference paper

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

Abstract

Java Modeling Language (JML) is a specification language for Java programs, that follows the design by contract paradigm. However, it is not always easy to use JML, for example when specifying properties of linked data structures. Alloy, on the other hand, is a relational specification language with a built-in transitive closure operator, which makes it particularly suitable for writing concise specifications of linked data structures. This paper presents Alloy2JML, a tool that generates JML specifications from Alloy expression, in order to support both Alloy and JML specifications in the KeY verification engine. This translation allows Java programs with Alloy specifications to be fully verified for correctness. Moreover, Alloy2JML lets Alloy specifications be employed in a variety of tools that accept only JML as their specification language. Supporting Alloy has the additional advantage that users can validate the specifications beforehand using the Alloy Analyzer.

This work has been partially supported by GIF (grant No. 1131-9.6/2011).

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

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Becker, K., Leavens, G.T.: Class LinkedList, http://www.eecs.ucf.edu/~leavens/JML-release/javadocs/java/util/LinkedList.html

  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. Bruns, D., Mostowski, W., Ulbrich, M.: Implementation-level verification of algorithms with KeY. STTT, 1–16 (2013)

    Google Scholar 

  4. Burdy, L., Cheon, Y., Cok, D., Ernst, M., Kiniry, J., Leavens, G., Leino, R., Poll, E.: An overview of JML tools and applications. STTT 7(3), 212–232 (2005)

    Article  Google Scholar 

  5. Cataño, N., Wahls, T., Rueda, C., Rivera, V., Yu, D.: Translating B Machines to JML Specifications. In: 27th ACM Symp. on App. Comp., pp. 1271–1277 (2012)

    Google Scholar 

  6. 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)

    Chapter  Google Scholar 

  7. Dennis, G., Chang, F.S.-H., Jackson, D.: Modular verification of code with SAT. In: ISSTA, pp. 109–120. ACM (2006)

    Google Scholar 

  8. Dennis, G., Yessenov, K., Jackson, D.: Bounded verification of voting software. In: Shankar, N., Woodcock, J. (eds.) VSTTE 2008. LNCS, vol. 5295, pp. 130–145. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  9. El Ghazi, A.A., Taghdiri, M.: Relational reasoning via SMT solving. In: Butler, M., Schulte, W. (eds.) FM 2011. LNCS, vol. 6664, pp. 133–148. Springer, Heidelberg (2011)

    Chapter  Google Scholar 

  10. Filliâtre, J.-C., Marché, C.: The why/Krakatoa/Caduceus platform for deductive program verification. In: Damm, W., Hermanns, H. (eds.) CAV 2007. LNCS, vol. 4590, pp. 173–177. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  11. Galeotti, J.P., Rosner, N., Pombo, C.L., Frias, M.: Analysis of invariants for efficient bounded verification. In: ISSTA, pp. 25–36. ACM (2010)

    Google Scholar 

  12. Galeotti, J.P., Rosner, N., Pombo, C.G.L., Frias, M.F.: TACO: Efficient SAT-based bounded verification using symmetry breaking and tight bounds. IEEE Transactions on Software Engineering 39(9), 1283–1307 (2013)

    Article  Google Scholar 

  13. Garis, A.G., Cunha, A., Riesco, D.: Translating Alloy specifications to UML class diagrams annotated with OCL. SoSyM, 1–21 (2013)

    Google Scholar 

  14. El Ghazi, A.A., Ulbrich, M., Gladisch, C., Tyszberowicz, S., Taghdiri, M.: JKelloy: A proof assistant for relational specifications of java programs. In: Badger, J.M., Rozier, K.Y. (eds.) NFM 2014. LNCS, vol. 8430, pp. 173–187. Springer, Heidelberg (2014)

    Chapter  Google Scholar 

  15. Gladisch, C., Tyszberowicz, S.: Specifying a linked data structure in JML for formal verification and runtime checking. In: Iyoda, J., de Moura, L. (eds.) SBMF 2013. LNCS, vol. 8195, pp. 99–114. Springer, Heidelberg (2013)

    Google Scholar 

  16. Grunwald, D.: Translating Alloy specifications to JML. Master’s thesis, Karlsruhe Institute of Technology (December 2013), http://asa.iti.kit.edu/410.php

  17. Hanada, K., et al.: Implementation of a prototype bi-directional translation tool between OCL and JML. J. Informatics Society 5(2), 89–95 (2013)

    Google Scholar 

  18. Jackson, D.: Software Abstractions (revised edition). MIT Press (2012)

    Google Scholar 

  19. Jin, D., Yang, Z.: Strategies of Modeling from VDM-SL to JML. In: Advanced Language Processing and Web Information Technology, pp. 320–323 (2008)

    Google Scholar 

  20. Klein, G., Nipkow, T.: A machine-checked model for a Java-like language, virtual machine, and compiler. ACM Trans. Program. Lang. Syst, 619–695 (2006)

    Google Scholar 

  21. Leavens, G.T., et al.: JML Reference Manual (draft, revision 1.235) (June 2008), http://www.jmlspecs.org/

  22. Liu, T., Nagel, M., Taghdiri, M.: Bounded program verification using an SMT solver: A case study. In: ICST, pp. 101–110 (April 2012)

    Google Scholar 

  23. Marché, C., et al.: The KRAKATOA tool for certification of JAVA/JAVACARD programs annotated in JML. J. Log. Algebr. Program. 58(1-2), 89–106 (2004)

    Article  MATH  Google Scholar 

  24. Müller, P., et al.: Modular specification of frame properties in JML. Concurrency and Computation: Practice and Experience 15(2), 117–154 (2003)

    Article  MATH  Google Scholar 

  25. Vaziri, M.: Finding Bugs in Software with a Constraint Solver. PhD thesis, Massachusetts Institute of Technology (2004)

    Google Scholar 

  26. Weiß, B.: Deductive Verification of Object-Oriented Software. PhD thesis, Karlsruhe Institute of Technology (2011)

    Google Scholar 

  27. Yessenov, K.T.: A Lightweight Specification Language for Bounded Program Verification. Master’s thesis, Massachusetts Institute of Technology (2009)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Springer International Publishing Switzerland

About this paper

Cite this paper

Grunwald, D., Gladisch, C., Liu, T., Taghdiri, M., Tyszberowicz, S. (2014). Generating JML Specifications from Alloy Expressions. In: Yahav, E. (eds) Hardware and Software: Verification and Testing. HVC 2014. Lecture Notes in Computer Science, vol 8855. Springer, Cham. https://doi.org/10.1007/978-3-319-13338-6_9

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-13338-6_9

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-13337-9

  • Online ISBN: 978-3-319-13338-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics