Title :
ezContract: Using Marker Library and Bytecode Instrumentation to Support Design by Contract in Java
Author :
Cheng, Yu Chin ; Chen, Chien-Tsun ; Hsieh, Chin-Yun
Author_Institution :
Nat. Taipei Univ. of Technol., Taipei
Abstract :
Several approaches have been proposed to support Design by Contract in Java. In this paper, through the use of markers which are predefined dummy methods and attributes, a new approach to annotate contracts is presented. The annotated programs can be directly compiled by standard Java compilers. A bytecode instrumentor is developed to manipulate the bytecode to inject contract evaluation instructions and make the contracts executable at runtime. The marker approach avoids two primary problems found in the existing practices: source compatibility that depends on language extension and symbolic barrier that leaves contracts and their targets unrelated. It also facilitates streamlined integration with IDEs and improves readability as well as writability of the contract- annotated programs.
Keywords :
Java; contracts; program compilers; Java; Java compilers; annotate contracts; annotated programs; bytecode instrumentation; contract evaluation instructions; ezContract; marker library; source compatibility; streamlined integration; Code standards; Contracts; Instruments; Java; Libraries; Program processors; Programming; Runtime; Software engineering; Specification languages;
Conference_Titel :
Software Engineering Conference, 2007. APSEC 2007. 14th Asia-Pacific
Conference_Location :
Aichi
Print_ISBN :
0-7695-3057-5
DOI :
10.1109/ASPEC.2007.29