Title

On The Interplay Of Exception Handling And Design By Contract: An Aspect-Oriented Recovery Approach

Abstract

Design by Contract (DbC) is a technique for developing and improving functional software correctness through definition of "contracts" between client classes and their suppliers. Such contracts are enforced during runtime and if any of them is violated a runtime error should occur. Runtime assertions checkers (RACs) are a well-known technique that enforces such contracts. Although they are largely used to implement the DbC technique in contemporary languages, like Java, studies have shown that characteristics of contemporary exception handling mechanisms can discard contract violations detected by RACs. As a result, a contract violation may not be reflected in a runtime error, breaking the supporting hypothesis of DbC. This paper presents an error recovery technique for RACs that tackles such limitations. This technique relies on aspect-oriented programming in order to extend the functionalities of existing RACs stopping contract violations from being discarded. We applied the recovery technique on top of five Java-based contemporary RACs (i.e., JML/jml, JML/ajml, JContractor, CEAP, and Jose). Preliminary results have shown that the proposed technique could actually prevent the contract violations from being discarded regardless of the characteristics of the exception handling code of the target application. Copyright 2011 ACM.

Publication Date

12-1-2011

Publication Title

ECOOP 2011 Workshop Proceedings - 13th Workshop on Formal Techniques for Java-Like Programs, FTfJP 2011

Number of Pages

-

Document Type

Article; Proceedings Paper

Personal Identifier

scopus

DOI Link

https://doi.org/10.1145/2076674.2076681

Socpus ID

84855707709 (Scopus)

Source API URL

https://api.elsevier.com/content/abstract/scopus_id/84855707709

This document is currently not available here.

Share

COinS