High-Fidelity C/C++ Code Transformation

被引:9
作者
Waddington, Daniel G. [1 ]
Yao, Bin [1 ]
机构
[1] Bell Labs, Lucent Technol, Holmdel, NJ 07733 USA
关键词
source transformation; high-fidelity; preprocessing;
D O I
10.1016/j.entcs.2005.04.037
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
As software systems become increasingly massive, the advantages of automated transformation tools are clearly evident. 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. Although there has been much academic work in software transformation, there still exists many hurdles in realising this technology in a commercial domain. From our own experience, there are two significant problems that must be addressed before transformation technology can be usefully applied in a commercial setting. These are: 1.) avoiding disruption of style (i.e. layout and commenting) and the introduction of any undesired modifications which occur as a side effect of the transformation process. 2.) correct handling of C preprocessing and the presentation of a semantically correct view of the program during transformation. Many existing automated transformation tools inherently disrupt style through the use of pretty printing and the need to perform preprocessing before any transformation. Some also require source to be modified so that it conforms to a subset of the grammar. In this paper we describe our own C/C++ transformation system, Proteus, that is able to meet the stringent criteria laid out by Lucent's own software developers.
引用
收藏
页码:35 / 56
页数:22
相关论文
共 16 条
[1]  
[Anonymous], 1999, 9899 ISOIEC
[2]   Handling preprocessor-conditioned declarations [J].
Aversano, L ;
Di Penta, M ;
Baxter, ID .
SCAM 2002: SECOND IEEE INTERNATIONAL WORKSHOP ON SOURCE CODE ANALYSIS MANIPULATION, PROCEEDINGS, 2002, :83-92
[3]  
BAXTER I, 2002, P INT WORKSH PRINC S, P48, DOI DOI 10.1145/512035.512047
[4]   Preprocessor conditional removal by simple partial evaluation [J].
Baxter, ID ;
Mehlich, M .
EIGHTH WORKING CONFERENCE ON REVERSE ENGINEERING, PROCEEDINGS, 2001, :281-290
[5]  
Cordy R., 1991, COMPUT LANG, V16, P97
[6]   Relocating XML elements from preprocessed to unprocessed code [J].
Cox, A ;
Clarke, C .
10TH INTERNATIONAL WORKSHOP ON PROGRAM COMPREHENSION, PROCEEDINGS, 2002, :229-238
[7]  
Garrido A., 2004, ACM SIGPLAN C PROGR
[8]  
*ISO IEC, 1998, 14882 ISOIEC
[9]   Processing software source text in automated design recovery and transformation [J].
Malton, A ;
Schneider, KA ;
Cordy, JR ;
Dean, TR ;
Cousineau, D ;
Reynolds, J .
9TH INTERNATIONAL WORKSHOP ON PROGRAM COMPREHENSION, PROCEEDINGS, 2001, :127-134
[10]  
Necula G., 2002, P C COMP CONSTR CC M