๐”– Bobbio Scriptorium
โœฆ   LIBER   โœฆ

A framework for preprocessor-aware C source code analyses

โœ Scribed by Greg J. Badros; David Notkin


Publisher
John Wiley and Sons
Year
2000
Tongue
English
Weight
206 KB
Volume
30
Category
Article
ISSN
0038-0644

No coin nor oath required. For personal study only.

โœฆ Synopsis


Analyses of C source code usually ignore the C preprocessor because of its complexity. Instead, these analyses either define their own approximate parser or scanner, or else they require that their input already be preprocessed. Neither approach is entirely satisfactory: the first gives up accuracy (or incurs large implementation costs), while the second loses the preprocessor-based abstractions. We describe a framework that permits analyses to be expressed in terms of both preprocessing and parsing actions, allowing the implementer to focus on the analysis. We discuss an implementation of such a framework that embeds a C preprocessor, a parser, and a Perl interpreter for the action 'hooks'. Many common software engineering analyses can be written surprisingly easily using our implementation, replacing numerous adhoc tools. The framework's integration of the preprocessor and the parser further enables some analyses that otherwise would be especially difficult to perform.


๐Ÿ“œ SIMILAR VOLUMES


A preprocessor for FORTRAN source code p
โœ Toshiaki Kaneko; Setsuya Kawabata ๐Ÿ“‚ Article ๐Ÿ“… 1989 ๐Ÿ› Elsevier Science ๐ŸŒ English โš– 532 KB

For Estimating total cross sections and various spectra for complicated processes in high energy physics, the most time consuming part is numerical integration over the phase volume. When a FORTRAN source code for the integrand is produced by REDUCE, often it is not only too long but is not enough r