XOgastan: XML-oriented gcc AST analysis and transformations

XOgastan: XML-oriented gcc AST analysis and transformations
复制标题

XOgastan:面向 XML 的 gcc AST 分析和转换

DOI:
10.1109/scam.2003.1238043
复制
发表时间:
2003
期刊:
Proceedings Third IEEE International Workshop on Source Code Analysis and Manipulation
影响因子:
--
通讯作者:
Umberto Villano
Umberto Villano
中科院分区:
--
文献类型:
--
作者:
G. Antoniol;M. D. Penta;Gianluca Masone;Umberto Villano

文献摘要

被引文献

相似文献

软件维护、程序分析和转换工具几乎总是依赖静态源代码分析作为收集信息的第一步和基本步骤。在过去,开发工具套件采用了两种不同的策略。有一些工具包含或实现源解析步骤,其中解析器位于工具包内部,使用它进行开发和维护。另一种方法是在已经可用的外部组件(如输出抽象语法树的编译器)之上构建工具,或者通过API使其可用。我们提出了一种方法和工具XOgastan,它是利用gcc/g++的能力开发的,可以将中间抽象语法树的表示保存到文件中。XOgastan将gcc/g++格式转换为图形交换语言表示,从而利用当前大量可用的XML工具用于后续分析阶段。对该工具进行了说明和设计,展示了其体系结构和主要实现选择。
Software maintenance, program analysis and transformation tools almost always rely on static source code analysis as the first and fundamental step to gather information. In the past, two different strategies have been adopted to develop tool suites. There are tools encompassing or implementing the source parse step, where the parser is internal to the toolkit, developed and maintained with it. A different approach builds tools on the top of external, already available, components such as compilers that output the abstract syntax tree, or make it available via an API. We present an approach and a tool, XOgastan, developed exploiting the gcc/g++ ability to save a representation of the intermediate abstract syntax tree into a file. XOgastan translates the gcc/g++ format into a graph exchange language representation, thus taking advantage of the high number of currently available XML tools for the subsequent analysis phases. The tool is illustrated and its design is discussed, showing its architecture and the main implementation choices.