Title :
Understanding code containing preprocessor constructs
Author :
Livadas, Panos E. ; Small, David T.
Author_Institution :
Dept. of Comput. & Inf. Sci., Florida Univ., Gainesville, FL, USA
Abstract :
Understanding, debugging, and maintaining software is a costly and difficult task. The difficulties are exacerbated in programs written to take advantage of preprocessing facilities. This paper examines problems associated with source code containing preprocessor constructs-i.e. included files, conditional compilation and macros. We define the useful mappings from tokens in the preprocessor´s output to the source file(s), and propose that by capturing these correspondences, an internal program representation can be built which allows for the use of maintenance techniques including program slicing, ripple analysis and dicing. The method presented is generic; to illustrate that the technique is feasible, we discuss ANSI C preprocessor constructs-in particular, macro substitution-and explain the modus developed to handle them in GHINSU-an integrated maintenance environment for ANSI C programs
Keywords :
macros; program debugging; programming environments; reverse engineering; software maintenance; ANSI C preprocessor constructs; GHINSU; code understanding; conditional compilation; debugging; dicing; included files; integrated maintenance environment; internal program representation; macro substitution; preprocessor constructs; program slicing; ripple analysis; software maintenance; source file; tokens; Costs; Embedded system; Life estimation; Lifetime estimation; Productivity; Programming profession; Software debugging; Software maintenance; Software testing; Software tools;
Conference_Titel :
Program Comprehension, 1994. Proceedings., IEEE Third Workshop on
Conference_Location :
Washington, DC
Print_ISBN :
0-8186-5647-6
DOI :
10.1109/WPC.1994.341255