Declarative aspect-oriented programming

Author
Ralf Lämmel

Abstract
Aspect-oriented programming addresses the problem that the implementation of some properties such as error handling and optimization tends to cross-cut the basic functionality. To overcome that problem special languages are used to specify such properties---the so-called aspects---in isolation. The software application is obtained by weaving the aspect code and the implementation of properties corresponding to basic functionality---the so-called components. This paper investigates the suitability of functional meta-programs to specify aspects and to perform weaving. The proposal focuses on the declarative paradigm (logic programming, attribute grammars, natural semantics, constructive algebraic specification etc.) as far as components are concerned, whereas aspects are represented by program transformations. Weaving is regarded as a program composition returning a combination of the components satisfying all the aspects. The computational behaviour of the components is preserved during weaving. The proposal improves reusability of declarative programs. The approach is generic in the sense that it is applicable to several representatives of the declarative paradigm. Several roles of aspect code are defined and analysed.

Bibtex entry
@INPROCEEDINGS{Laemmel99a,
 AUTHOR = "Ralf L{\"a}mmel",
 TITLE = "{Declarative aspect-oriented programming}",
 PAGES = "131--146",
 EDITOR = "Olivier Danvy",
 BOOKTITLE = "{Proceedings PEPM'99, 1999 ACM SIGPLAN Workshop on Partial
               Evaluation and Semantics-Based Program Manipulation PEPM'99,
               San Antonio (Texas), BRICS Notes Series NS-99-1}",
 YEAR = 1999,
 MONTH = Jan
}

Download
[.ps], [.pdf]