Understanding code containing preprocessor constructs
Panos E. Livadas, Deanna Small · 2002
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.>
Cited by 45 works. doi:10.1109/wpc.1994.341255
Authors
References
- Interprocedural slicing using dependence graphs
- Programmers use slices when debugging
- Software maintenance management
- Integrating non-intering versions of programs
- Software Maintenance Management
- Practical strategies for developing large software systems
- An integrated program representation and toolkit for the maintenance of C programs
- System dependence graphs based on parse trees and their use in software maintenance
- A new algorithm for the calculation of transitive dependences