Verification rules for exception handling in eiffel

  • Authors:
  • Emil Sekerinski;Tian Zhang

  • Affiliations:
  • McMaster University, Hamilton, ON, Canada;McMaster University, Hamilton, ON, Canada

  • Venue:
  • SBMF'12 Proceedings of the 15th Brazilian conference on Formal Methods: foundations and applications
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

The Eiffel exception mechanism supports two methodological aspects. First, a method specification by a pre- and postcondition also determines when the method exits exceptionally, namely when the stated postcondition cannot be satisfied. Secondly, the rescue and retry statements combine catching an exception with a loop structure, thus requiring a dedicated form of correctness reasoning. We present verification rules for total correctness that take these two aspects into account. The rules handle normal loops and retry loop structures in an analogous manner. They also allow the Eiffel's mechanism to be slightly generalized. The verification rules are derived from a definition of statements by higher-order predicate transformers and have been checked with a theorem prover.