Skip to main content

Verification of Java’s AbstractCollection Class: A Case Study

  • Conference paper
  • First Online:
Book cover Mathematics of Program Construction (MPC 2002)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2386))

Included in the following conference series:

Abstract

This paper presents the specification and (modular) verification of Java’s AbstractCollection class. This work is done as a case study within the LOOP project (at the university of Nijmegen). It is the first major verification within the project using the theorem prover Isabelle. The class AbstractCollection is automatically translated into a series of Isabelle theories. The specifications, written in the Java Modeling Language (JML), give rise to appropriate proof obligations. The paper explains how the specifications are constructed and verified. When working on this case study, it became clear that there is a problem that is not documented in the informal documentation: when a collection contains a reference to itself it has unexpected behaviour. It is discussed how the specifications are adapted to overcome this problem.

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

Access this chapter

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

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. P. America. Designing an object-oriented programming language with behavioural subtyping. In J.W. de Bakker, W.P. de Roever, and G. Rozenberg, editors, Foundations of Object-Oriented Languages, number 489 in LNCS, pages 60–90. Springer, 1990.

    Chapter  Google Scholar 

  2. K. Arnold, J. Gosling, and D. Holmes. The Java Programming Language. Addison-Wesley, 3nd edition, 2000.

    Google Scholar 

  3. J. van den Berg, M. Huisman, B. Jacobs, and E. Poll. A type-theoretic memory model for verification of sequential Java programs. In D. Bert, C. Choppy, and P.D. Mosses, editors, Recent Trends in Algebraic Development Techniques, number 1827 in LNCS, pages 1–21. Springer, 2000.

    Google Scholar 

  4. J. van den Berg and B. Jacobs. The LOOP compiler for Java and JML. In T. Mar-garia and W. Yi, editors, Tools and Algorithms for the Construction and Analysis of Systems (TACAS 2001), number 2031 in LNCS, pages 299–312. Springer, 2001.

    Chapter  Google Scholar 

  5. J. van den Berg, B. Jacobs, and E. Poll. Formal Specification and Verification of JavaCard’s Application Identifier Class. In Java on Smart Cards: Programming and Security, number 2041 in LNCS, pages 137–150. Springer, 2001.

    Chapter  Google Scholar 

  6. C. Breunesse, B. Jacobs, and J. van den Berg. Specifying and Verifying an Example: a decimal representation in Java for smartcards, 2002. Manuscript.

    Google Scholar 

  7. T. Budd. Understanding Object-oriented programming with Java-updated edition. Addison-Wesley, 2000.

    Google Scholar 

  8. N. Cataño and M. Huisman. Formal specification of Gemplus’ electronic purse case study. In Formal Methods Europe (FME’02), LNCS. Springer, 2002. To appear.

    Google Scholar 

  9. S. Drossopoulou and S. Eisenbach. Java is type safe-probably. In M. Aksit, editor, European Conference on Object-Oriented Programming, number 1241 in LNCS, pages 389–418. Springer, 1997.

    Google Scholar 

  10. ESC/Java specifications for the JavaCard API. http://www.cs.kun.nl/~erikpoll/publications/jc211_specs.html.

  11. J. Guttag, J. Horning, and J. Wing. The Larch family of specification languages. IEEE Software, 2(5):24–36, 1985.

    Article  Google Scholar 

  12. C.A.R. Hoare. Proof of correctness of data representations. Acta Informatica, 1:271–281, 1972.

    Article  MATH  Google Scholar 

  13. M. Huisman. Specifications of Java’s Collection class. http://www-sop.inria.fr/lemme/Marieke.Huisman/collection.html.

  14. M. Huisman. Reasoning about Java programs in higher order logic using PVS and Isabelle. PhD thesis, Computing Science Institute, University of Nijmegen, 2001.

    Google Scholar 

  15. M. Huisman and B. Jacobs. Java program verification via a Hoare logic with abrupt termination. In T. Maibaum, editor, Fundamental Approaches to Software Engineering (FASE 2000), number 1783 in LNCS, pages 284–303. Springer, 2000.

    Chapter  Google Scholar 

  16. M. Huisman, B. Jacobs, and J. van den Berg. A Case Study in Class Library Verification: Java’s Vector Class. Software Tools for Technology Transfer, 3/3:332–352, 2001.

    Google Scholar 

  17. K. Huizing and R. Kuiper. Reinforcing fragile base classes. In Proceedings of Workshop on Formal Techniques for Java Programs (FTfJP), 2001.

    Google Scholar 

  18. B. Jacobs and E. Poll. A logic for the Java Modeling Language JML. In H. Hussmann, editor, Fundamental Approaches to Software Engineering (FASE 2001), number 2029 in LNCS, pages 284–299. Springer, 2001.

    Chapter  Google Scholar 

  19. Java™ 2 platform, standard edition, version 1.3 API specification. http://www.java.sun.com/j2se/1.3/docs/api/index.html.

  20. G.T. Leavens, A.L. Baker, and C. Ruby. Preliminary design of JML: A behavioral interface specification language for Java. Technical Report 98-06, Iowa State University, Department of Computer Science, 1998.

    Google Scholar 

  21. K.R.M. Leino. Toward Reliable Modular Programs. PhD thesis, California Inst. of Techn., 1995.

    Google Scholar 

  22. K.R.M. Leino, G. Nelson, and J. B. Saxe. ESC/Java User’s Manual. Technical Report SRC 2000-002, Compaq System Research Center, 2000.

    Google Scholar 

  23. B.H. Liskov and J.M. Wing. A behavioral notion of subtyping. ACM Trans. on Progr. Lang. and Systems, 16(1):1811–1841, 1994.

    Article  Google Scholar 

  24. The LOOP project. http://www.cs.kun.nl/~bart/LOOP/index.html.

  25. B. Meyer. Object-Oriented Software Construction. Prentice Hall, 2nd rev. edition, 1997.

    Google Scholar 

  26. D. von Oheimb and T. Nipkow. Machine-checking the Java specification: Proving type-safety. In J. Alves-Foss, editor, Formal Syntax and Semantics of Java, number 1523 in LNCS, pages 119–156. Springer, 1999.

    Chapter  Google Scholar 

  27. S. Owre, J. Rushby, N. Shankar, and F von Henke. Formal verification for fault-tolerant architectures: Prolegomena to the design of PVS. IEEE Transactions on Software Engineering, 21(2):107–125, 1995.

    Article  Google Scholar 

  28. L.C. Paulson. Isabelle-a generic theorem prover. Number 828 in LNCS. Springer, 1994. With contributions by Tobias Nipkow.

    MATH  Google Scholar 

  29. D. Syme. Proving Java type soundness. In J. Alves-Foss, editor, Formal Syntax and Semantics of Java, number 1523 in LNCS, pages 83–118. Springer, 1999.

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2002 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Huisman, M. (2002). Verification of Java’s AbstractCollection Class: A Case Study. In: Boiten, E.A., Möller, B. (eds) Mathematics of Program Construction. MPC 2002. Lecture Notes in Computer Science, vol 2386. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45442-X_11

Download citation

  • DOI: https://doi.org/10.1007/3-540-45442-X_11

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-43857-1

  • Online ISBN: 978-3-540-45442-7

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics