Reasoning about function objects

  • Authors:
  • Martin Nordio;Cristiano Calcagno;Bertrand Meyer;Peter Müller;Julian Tschannen

  • Affiliations:
  • ETH Zurich, Switzerland;Monoidics Ltd and Imperial College, London, UK;ETH Zurich, Switzerland;ETH Zurich, Switzerland;ETH Zurich, Switzerland

  • Venue:
  • TOOLS'10 Proceedings of the 48th international conference on Objects, models, components, patterns
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

Modern object-oriented languages support higher-order implementations through function objects such as delegates in C#, agents in Eiffel, or closures in Scala. Function objects bring a new level of abstraction to the object-oriented programming model, and require a comparable extension to specification and verification techniques. We introduce a verification methodology that extends function objects with auxiliary side-effect free (pure) methods to model logical artifacts: preconditions, postconditions and modifies clauses. These pure methods can be used to specify client code abstractly, that is, independently from specific instantiations of the function objects. To demonstrate the feasibility of our approach, we have implemented an automatic prover, which verifies several non-trivial examples.