Zero-Overhead Composable Aspects for .NET [chapter]

Rasmus Johansen, Peter Sestoft, Stephan Spangenberg
2008 Lecture Notes in Computer Science  
We present a new static aspect weaver for C#. The weaver, which is called Yiihaw, works by transforming a program's bytecode and types, stored in so-called assemblies, and performs extensive checks at weave-time to ensure correctness of the resulting woven assembly. The design makes four contributions: (a) Application of generic advice is typesafe; (b) application of "around" advice incurs no runtime overhead; (c) woven assemblies can be further woven; and (d) advice can itself be woven before
more » ... eing applied to target code -in effect advice can be composed. These contributions are achieved by minimal means, basing much of the type checking on the bytecode's generic type system. Yiihaw's aspects are less expressive than those of AspectJ: an aspect does not have an identity of its own; only static join points are supported; and the pointcut language does not allow logical combinations of join points. However, Yiihaw is sufficiently expressive for many purposes, and for these purposes it provides statically typesafe weaving and highly efficient woven code.
doi:10.1007/978-3-540-89762-0_7 fatcat:63srkhlczzfhhi6brer3mhyeoe