Overivew
This page describes the initial (partial) release of the CrossCutting C Compiler(C4) toolkit. This toolkit is intended to bring Aspect-Oriented Software Development (AOSD) techniques to the C language. The toolkit consists of three source-to-source transformation tools: C4 weaver, C4 unweaver, and a C4-to-C compiler of C code extended with AOSD feature.
The C4-to-C compiler, based on the xtc compiler framework, has been used to introduce aspects into linux-2.6.12. Moreover, we have tested that the kernel properly compiles and runs. The weaver and unweaver tools are still under development --- mostly hampered by the nastiness of dealing with CPP. The figure below illustrates how the toolkit is intended to fit into a programmer's development process.
The weaver/unweaver tools are intended to eliminate the need for programmers to learn anything out of the ordinary for defining aspect advice for C code. Advice is defined inline with simple syntatic sugar that any C programmer can learn within seconds --- we call this the woven C4 view of an aspect. This woven C4 code is an extension on top of the C language that lets developers define an aspect with before, after, and around advice. The advice can instrument on function, struct/union, and global. After defining an aspect in this way a programmer can use the unweaver tool to extract such inline code from the C code and place it in a separate C4 aspect file using a grammar based upon AspectC. Concrete examples of this are presented below. Conversely, the weaver will read such C4 aspect files and source-to-source rewrite the C code to which the advice applies.
The C4-to-C compiler translates the woven C4 code into conventional C code. The result can then be compiled by an optimizing backend compiler, such as gcc, to produce a binary. For the C4 syntax please refer to C4Syntax. If you want to test out C4, head to C4Usage to see how to run C4 on woven-c source files.
Publications
On the feasibility of an AOSD approach to Linux kernel extensions.
By Alison Reynolds, Marc E. Fiuczynski, and Robert Grimm. In Proceedings of the 7th Workshop on Aspects, Components, and Patterns for Infrastructure Software, 6 pages, Brussels, Belgiumm, March 2008.
Making extensibility of system software practical with the C4 toolkit.
By Marco Yuen, Marc Fiuczysnki, Robert Grimm, Yvonne Coady, and David Walker. In 2006 AOSD Workshop on Software Engineering Properties of Languages and Aspect Technologies, 6 pages, Bonn, Germany, March 2006.
HEY... You got your Paradigm in my Operating System!
By Chris Matthews, Owen Stampflee, Yvonne Coady, Jonathan Appavoo, Marc E. Fiuczynski, and Robert Grimm. In Proceedings of the 2nd ECOOP Workshop on Programming Languages and Operating Systems, Glasgow, UK, July 2005.
By Marc E. Fiuczynski, Robert Grimm, Yvonne Coady, and David Walker. In Proceedings of the 10th Workshop on Hot Topics in Operating Systems, Santa Fe, New Mexico, June 2005.
Managing Variability in Systems: Oh What a Tangled OS We Weave.
By Stuart Bray, Marco Yuen, Yvonne Coady, and Marc E. Fiuczynski. In MVCDC Workshop, OOPSLA, 2004.
C4 Repository
C4 repository can be accessed at http://c4.cs.princeton.edu/svn/c4

