Specifying and checking method call sequences of Java programs

  • Authors:
  • Yoonsik Cheon;Ashaveena Perumandla

  • Affiliations:
  • Department of Computer Science, The University of Texas at El Paso, El Paso, USA 79968;Department of Computer Science, The University of Texas at El Paso, El Paso, USA 79968

  • Venue:
  • Software Quality Control
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

In a pre and postcondition-style specification, it is difficult to specify the allowed sequences of method calls, referred to as protocols. The protocols are essential properties of reusable object-oriented classes and application frameworks, and the approaches based on the pre and postconditions, such as design by contracts (DBC) and formal behavioral interface specification languages (BISL), are being accepted as a practical and effective tool for describing precise interfaces of (reusable) program modules. We propose a simple extension to the Java Modeling Language (JML), a BISL for Java, to specify protocol properties in an intuitive and concise manner. The key idea of our approach is to separate protocol properties from functional properties written in pre and post-conditions and to specify them in a regular expression-like notation. The semantics of our extension is formally defined and provides a foundation for implementing runtime checks. Case studies have been performed to show the effectiveness our approach. We believe that our approach can be adopted by other BISLs.