TY - JOUR
T1 - Type-directed weaving of aspects for polymorphically typed functional languages
AU - Chen, Kung
AU - Weng, Shu-Chun
AU - Wang, Meng
AU - Khoo, Siau-Cheng
AU - Chen, Chung-Hsin
PY - 2010
Y1 - 2010
N2 - Incorporating aspect-oriented paradigm to a polymorphically typed functional language enables the declaration of type-scoped advice, in which the effect of an aspect can be harnessed by introducing possibly polymorphic type constraints to the aspect. The amalgamation of aspect orientation and functional programming enables quick behavioral adaption of functions, clear separation of concerns and expressive type-directed programming. However, proper static weaving of aspects in polymorphic languages with a type-erasure semantics remains a challenge. In this paper, we describe a type-directed static weaving strategy, as well as its implementation, that supports static type inference and static weaving of programs written in an aspect-oriented polymorphically typed functional language, AspectFun. We show examples of type-scoped advice, identify the challenges faced with compile-time weaving in the presence of type-scoped advice, and demonstrate how various advanced aspect features can be handled by our techniques. Finally, we prove the correctness of the static weaving strategy with respect to the operational semantics of AspectFun.
AB - Incorporating aspect-oriented paradigm to a polymorphically typed functional language enables the declaration of type-scoped advice, in which the effect of an aspect can be harnessed by introducing possibly polymorphic type constraints to the aspect. The amalgamation of aspect orientation and functional programming enables quick behavioral adaption of functions, clear separation of concerns and expressive type-directed programming. However, proper static weaving of aspects in polymorphic languages with a type-erasure semantics remains a challenge. In this paper, we describe a type-directed static weaving strategy, as well as its implementation, that supports static type inference and static weaving of programs written in an aspect-oriented polymorphically typed functional language, AspectFun. We show examples of type-scoped advice, identify the challenges faced with compile-time weaving in the presence of type-scoped advice, and demonstrate how various advanced aspect features can be handled by our techniques. Finally, we prove the correctness of the static weaving strategy with respect to the operational semantics of AspectFun.
KW - Aspect-oriented programming
KW - Type-scoped advice
KW - Static weaving
KW - Polymorphically typed functional language
U2 - doi.org/10.1016/j.scico.2010.04.001
DO - doi.org/10.1016/j.scico.2010.04.001
M3 - Article (Academic Journal)
VL - 75
SP - 1048
EP - 1076
JO - Science of Computer Programming
JF - Science of Computer Programming
SN - 0167-6423
IS - 11
ER -