Specifying java iterators with JML and Esc/Java2

  • Authors:
  • David R. Cok

  • Affiliations:
  • Eastman Kodak Company, NY

  • Venue:
  • Proceedings of the 2006 conference on Specification and verification of component-based systems
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

The 2006 SAVCBS Workshop has posed a Challenge Problem on the topic of specifying iterators. This note provides a specification in the Java Modeling Language (JML) [1, 2] for the Java interfaces Iterator and Iterable that captures the interactions between these two interfaces. An example program that uses these interfaces is checked using Esc/Java2 [3, 4, 5], demonstrating by example that the Esc/Java2 tool checks that the interfaces are used only as required by the specifications. The concluding section contains some observations on the limitations of JML for this specification task.