Modular Reasoning in Aspect-Oriented Languages from a Substitution Perspective

TitleModular Reasoning in Aspect-Oriented Languages from a Substitution Perspective
Publication TypeJournal Article
Year of Publication2015
AuthorsMolderez, T, Janssens D
JournalTransactions on Aspect-Oriented Software Development
VolumeXII
Date Published03/2015
Abstract

In object-oriented languages, a notion of behavioural subtyping is needed to enable modular reasoning. This is no longer sufficient when such languages are extended with aspects. In general, all aspects need to be inspected in order to understand the behaviour of a single method or proceed call, which complicates reasoning about aspect-oriented programs. In this paper, we present an approach to modular reasoning that consists of two parts. First, the advice substitution principle, based on behavioural subtyping, identifies when it is possible to remain unaware of an advice while preserving modular reasoning. Second, in cases where it is undesired or impossible to be unaware of an advice, a simple specification clause can be used to restore modular reasoning and to become aware of this advice. We show that our approach effectively enables modular reasoning about pre- and postconditions in a minimal aspect-oriented language called ContractAJ. To ensure the approach is used correctly, we also provide a runtime contract enforcement algorithm that is specified in ContractAJ, and implemented in AspectJ.

AttachmentSize
Molderez2014TAOSD.pdf843.66 KB