A framework for preprocessor-aware C source code analyses

A framework for preprocessor-aware C source code analyses
复制标题

用于预处理器感知的 C 源代码分析的框架

DOI:
--
复制
发表时间:
2000
期刊:
Software, Practice & Experience
影响因子:
--
通讯作者:
D. Notkin
D. Notkin
中科院分区:
--
文献类型:
--
作者:
Greg J. Badros;D. Notkin

文献摘要

被引文献

相似文献

C源代码的分析通常会因为其复杂性而忽略C预处理器,因此这些分析要么是自己的近似解析器或扫描仪,否则他们要求他们的输入已经完全满足。或产生大量的实施成本),而第二个失去了基于预处理器的摘要。预处理和解析动作,允许实施者专注于分析。轻松地使用我们的实施,替换框架的整合预处理和解析器的集成,进一步可以使一些分析尤其可以执行。
Analyses of C source code usually ignore the C preprocessor because of its complexity. Instead, these analyses either dene their own approximate parser or scanner or else they require that their input already be preprocessed. Neither approach is entirely satisfactory: the rst 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 ad-hoc tools. The framework’s integration of the preprocessor and the parser further enables some analyses that otherwise would be especially dicult to perform.