TinyC2: Towards building a dynamic weaving aspect language for C

The runtime behaviors of software systems are often subject to alteration or intervention after their development cycles for various reasons such as performance profiling, debugging, code specialization, and more. There are two separate domains related to the instrumentation of software systems, one being various performance measurement and instrumentation tools, the other the new aspect oriented programming (AOP) paradigm. This paper describes TinyC language, a language approach which experiments with the idea of implementing an aspect oriented language based upon existing system instrumentation techniques. Like other aspect oriented languages, TinyC uses new language constructs to allow programmers to intentionally compose systems in the dimensions of both components and aspects. In this paper, we discuss both the grammatical features and the compiler architecture of the TinyC language. Through the TinyC implementation, we demonstrate that a language approach can well bridge the gap between the AOP paradigm and the existing system instrumentation technologies. It greatly simplifies code instrumentation effort and provides runtime optimization at the application level.