Checking Well-Formedness of Pure-Method Specifications

  • Authors:
  • Arsenii Rudich;Ádám Darvas;Peter Müller

  • Affiliations:
  • ETH Zurich, Switzerland;ETH Zurich, Switzerland;Microsoft Research, USA

  • Venue:
  • FM '08 Proceedings of the 15th international symposium on Formal Methods
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

Contract languages such as JML and Spec# specify invariants and pre- and postconditions using side-effect free expressions of the programming language, in particular, pure methods. For such contracts to be meaningful, they must be well-formed: First, they must respect the partiality of operations, for instance, the preconditions of pure methods used in the contract. Second, they must enable a consistent encoding of pure methods in a program logic, which requires that their specifications are satisfiable and that recursive specifications are well-founded.This paper presents a technique to check well-formedness of contracts. We give proof obligations that are sufficient to guarantee the existence of a model for the specification of pure methods. We improve over earlier work by providing a systematic solution including a soundness result and by supporting more forms of recursive specifications. Our technique has been implemented in the Spec# programming system.