Execution levels for aspect-oriented programming: Design, semantics, implementations and applications
Author
dc.contributor.author
Tanter, Éric Pierre
Author
dc.contributor.author
Figueroa, Ismael
es_CL
Author
dc.contributor.author
Tabareau, Nicolás
es_CL
Admission date
dc.date.accessioned
2014-12-29T20:21:48Z
Available date
dc.date.available
2014-12-29T20:21:48Z
Publication date
dc.date.issued
2014
Cita de ítem
dc.identifier.citation
Science of Computer Programming Volume 80, Part B, 1 February 2014, Pages 311–342
en_US
Identifier
dc.identifier.other
DOI: 10.1016/j.scico.2013.09.002
Identifier
dc.identifier.uri
https://repositorio.uchile.cl/handle/2250/126825
General note
dc.description
Artículo de publicación ISI
en_US
Abstract
dc.description.abstract
In aspect-oriented programming (AOP) languages, advice evaluation is usually considered as part of the base program evaluation. This is also the case for certain pointcuts, such as if pointcuts in AspectJ, or simply all pointcuts in higher-order aspect languages like AspectScheme. While viewing aspects as part of base level computation clearly distinguishes AOP from reflection, it also comes at a price: because aspects observe base level computation, evaluating pointcuts and advice at the base level can trigger infinite regression. To avoid these pitfalls, aspect languages propose ad-hoc mechanisms, which increase the complexity for programmers while being insufficient in many cases. After shedding light on the many facets of the issue, this paper proposes to clarify the situation by introducing levels of execution in the programming language, thereby allowing aspects to observe and run at specific, possibly different, levels. We adopt a defensive default that avoids infinite regression, and gives advanced programmers the means to override this default using level-shifting operators. We then study execution levels both in practice and in theory. First, we study the relevance of the issues addressed by execution levels in existing aspect-oriented programs. We then formalize the semantics of execution levels and prove that the default semantics is indeed free of a certain form of infinite regression, which we call aspect loops. Finally, we report on existing implementations of execution levels for aspect-oriented extensions of Scheme, JavaScript and Java, discussing their implementation techniques and current applications.