Verifying the reflective visitor pattern

  • Authors:
  • Ben Horsfall;Nathaniel Charlton;Bernhard Reus

  • Affiliations:
  • University of Sussex;University of Sussex;University of Sussex

  • Venue:
  • Proceedings of the 14th Workshop on Formal Techniques for Java-like Programs
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

Computational reflection allows a program to inspect and manipulate the structure or behaviour of itself at runtime. Often this means that it is possible to create more generic or adaptable programs in an elegant way. However, there is little support for specification and automatic verification of reflective programs. We address this problem by implementing, specifying, and verifying a reflective library using a Hoare-logic for a simple language with stored procedures. The latter is important since reflective metadata is modelled on the heap, thus method objects will be realised as stored procedures. We verify memory safety as well as functional correctness of an instance of the reflective visitor pattern, including the reflective library. The entire verification is carried out in our (semi-)automatic verification tool Crowfoot.