Client-aware checking and information hiding in interface specifications with JML/ajmlc

  • Authors:
  • Henrique Rebêlo;Gary T. Leavens;Ricardo Massa Lima

  • Affiliations:
  • Federal University of Pernambuco, Recife, Brazil;University of Central Florida, Orlando, FL, USA;Federal University of Pernambuco, Recife, Brazil

  • Venue:
  • Proceedings of the 2013 companion publication for conference on Systems, programming, & applications: software for humanity
  • Year:
  • 2013

Quantified Score

Hi-index 0.00

Visualization

Abstract

Information hiding controls which parts of a module are visible to different clients. This aids maintenance because hidden implementation details can be changed without affecting clients. The benefits of information hiding apply not only to code but also to other artifacts, such as specifications. In this demonstration we show how our client-aware checking (CAC) technique, which is implemented by our JML/ajmlc compiler and freely available online, use the privacy information in specifications to promote information hiding. We demonstrate the benefits of CAC over existing runtime assertion checkers (RACs) of contemporary interface specification languages. Client-aware checking allows runtime assertion checking and error reporting based solely on specifications visible to clients. This avoids exposing hidden implementation or specification details that cannot be understood by non-privileged clients. This demonstration will proceed by discussing the goals of the CAC technique by means of realistic examples. Attendees will mainly see JML specifications, including pre- and postconditions for methods. They will learn how to use the JML/ajmlc compiler, which also provides information hiding capabilities. In addition, they will learn how to use model fields to hide the actual field declarations in classes, and how model fields play an important role in achieving information hiding. We will conclude with pointers to ongoing work on design, implementation and runtime checking of Java programs with CAC-based JML/ajmlc.