Supporting Design by Contract in Java

نویسندگان

  • Martin Lackner
  • Andreas Krall
  • Franz Puntigam
چکیده

Design by Contract is a valuable design method for trusted software components. Eiffel shows how to provide appropriate language support for it. However, no such concepts currently exist in Java. Full integration of them into Java may help to improve and guarantee the quality of Java classes. We briefly compare several approaches to extend Java in this way and present our model and a compiler that translates extended Java code into JVM byte code. Our Java extension integrates preconditions, postconditions, and invariants as in Eiffel while respecting the characteristics of Java. The evaluation shows that Design by Contract can be added efficiently to Java while keeping compatibility.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Static and Dynamic Contract Verifiers For Java

Design By Contract (DBC) is a systematic approach to specifying and implementing object-oriented software systems. DBC has been proved to greatly benefit software development. However, Java does not natively support DBC. We have developed a comprehensive solution to bring DBC into Java. The static and dynamic contract verifier is the most crucial part of the solution. We have developed a toolse...

متن کامل

jContractor: A Reflective Java Library to Support Design by Contract

jContractor is a purely library based approach to support Design By Contract specifications such as preconditions, postconditions, class invariants, and recovery and exception handling in Java. jContractor uses an intuitive naming convention, and standard Java syntax to instrument Java classes and enforce Design By Contract constructs. The designer of a class specifies a contract by providing c...

متن کامل

Contract4J for Design by Contract in Java: Design Pattern-Like Protocols and Aspect Interfaces

Recent trends in Aspect-oriented Design (AOD) have emphasized interface-based modularity constructs that support noninvasive advising of components by aspects in a robust and flexible way. We show how the AspectJ-based tool Contract4J supports Design by Contract in Java using two different forms of a design patternlike protocol, one based on Java 5 annotations and the other based on a JavaBeans...

متن کامل

Contracts for Java: A Practical Framework for Contract Programming

This report introduces Contracts for Java (Cofoja), a new framework for contract programming in Java, and the successor to Johannes Rieken’s Modern Jass. Based on the same standard Java technologies such as annotation processing and bytecode instrumentation, it improves upon the stub-based separate compilation strategy of its predecessor. Contracts for Java promotes a minimalistic yet expressiv...

متن کامل

An Aspect-Oriented Infrastructure for Design by Contract in Java

Design by Contract was first introduced in the Eiffel programming language to address the reliability concern in Object-Oriented Software Development, namely on module interaction. On the other hand, Aspect-Oriented Software Development aims at providing a means to identify, modularise and compose cross-cutting concerns, which classical approaches for software development can not modularise. Th...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • Journal of Object Technology

دوره 1  شماره 

صفحات  -

تاریخ انتشار 2002