High-fidelity Source Code Transformation for C/C++

01 January 2005

New Image

Automated transformation tools are the next advance in software engineering. These tools allow the machine to both reason about and manipulate high-level source code. They enable off-loading of mundane and laborious programming tasks from human developer to machine, thereby reducing cost and development timeframes. To ensure developer acceptance of automated transformation tools, it is absolutely crucial that developer programming styles - specifically those affecting layout (spacing), commenting and the use of preprocessing directives - are not disrupted by the transformation process. Many existing automated transformation tools inherently disrupt style through the use of pretty printing (affecting layout and commenting) and the need to perform preprocessing before any transformation. In this paper we describe how our own C/C++ source code transformation system, Proteus, avoids the problem of style disruption through careful engineering of source code parsing, transformation and reconstruction.