On the interplay between the semantics of Java's finally clauses and the JML run-time checker

  • Authors:
  • M. Huisman

  • Affiliations:
  • University of Twente Netherlands

  • Venue:
  • Proceedings of the 11th International Workshop on Formal Techniques for Java-like Programs
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

Abstract

This paper discusses how a subtle interaction between the semantics of Java and the implementation of the JML runtime checker can cause the latter to fail to report errors. This problem is due to the well-known capability of finally clauses to implicitly override exceptions. We give some simple examples of annotation violations that are not reported by the run-time checker because the errors are caught within the program text; even without any explicit reference to them. We explain this behaviour, based on the official Java Language Specification. We also discuss what are the consequences of this problem, and we sketch different solutions to the problem (by adapting the implementation of the JML run-time checker, or by adopting a slightly different semantics for Java).