Jose: Aspects for Design by Contract80-89

  • Authors:
  • Yishai A. Feldman;Ohad Barzilay;Shmuel Tyszberowicz

  • Affiliations:
  • The Interdisciplinary Center, Israel;Tel Aviv University, Israel;The Academic College The Academic College, Israel

  • Venue:
  • SEFM '06 Proceedings of the Fourth IEEE International Conference on Software Engineering and Formal Methods
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

Design by contract is a practical methodology for evolving code together with its specification. The contract has important methodological implications on the design of the program. In addition, tools that instrument the code to check for contract violations help the development process by catching errors close to their sources. This is complicated by several factors, such as the need to collect preconditions from supertypes. There are two issues involved in the implementation of such a tool: the correct enforcement of the theoretical principles, and the instrumentation of the code. Most previous tools tackle both issues, but have subtle failures in one or the other. This paper describes Jose, a tool for design by contract in Java, which uses AspectJ, an aspect-oriented extension of Java, to instrument the program. This allows us to leverage the expertise of the AspectJ developers in instrumenting Java programs, and concentrate on the correct implementation of the designby- contract principles. This approach has the added benefit that it can be generalized to other object-oriented languages that have aspect-oriented extensions. We describe the design decisions made in the implementation of Jose, and the features of AspectJ that helped or hindered this implementation.