2007 | OriginalPaper | Buchkapitel
A Compilation Model for Aspect-Oriented Polymorphically Typed Functional Languages
verfasst von : Kung Chen, Shu-Chun Weng, Meng Wang, Siau-Cheng Khoo, Chung-Hsin Chen
Erschienen in: Static Analysis
Verlag: Springer Berlin Heidelberg
Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.
Wählen Sie Textabschnitte aus um mit Künstlicher Intelligenz passenden Patente zu finden. powered by
Markieren Sie Textabschnitte, um KI-gestützt weitere passende Inhalte zu finden. powered by
Introducing aspect orientation to a polymorphically typed functional language strengthens the importance of
type-scoped advices
; i.e., advices with their effects harnessed by type constraints. As types are typically treated as compile time entities, it is highly desirable to be able to perform
static weaving
to determine at compile time the
chaining
of type-scoped advices to their associated join points. In this paper, we describe a compilation model, as well as its implementation, that supports static type inference and static weaving of programs in an aspect-oriented polymorphically typed lazy functional language,
AspectFun
. We present a type-directed weaving scheme that coherently weaves type-scoped advices into the base program at compile time. We state the correctness of the static weaving with respect to the operational semantics of
AspectFun
. We also demonstrate how control-flow based pointcuts (such as
cflowbelow
) are compiled away, and highlight several type-directed optimization strategies that can improve the efficiency of woven code.