首页 | 官方网站   微博 | 高级检索  
     


Compiler Hacking for Source Code Analysis
Authors:G Antoniol  M Di Penta  G Masone  U Villano
Affiliation:1. RCOST – Research Centre on Software Technology, University of Sannio, Department of Engineering, Palazzo ex Poste, Via Traiano, 82100, Benevento, Italy
2. RCOST – Research Centre on Software Technology, University of Sannio, Department of Engineering, Palazzo ex Poste, Via Traiano, 82100, Benevento, Italy
3. Telsey Telecommunications S.p.A., Viale Mellusi 68, 82100, Benevento, Italy
4. Department of Engineering, University of Sannio, Palazzo Bosco Lucarelli, Piazza Roma, 82100, Benevento, Italy
Abstract:Many activities related to software quality assessment and improvement, such as empirical model construction, data flow analysis, testing or reengineering, rely on static source code analysis as the first and fundamental step for gathering the necessary input 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, and is developed and maintained with it. A different approach builds tools on the top of external already-available components such as compilers that output the program abstract syntax tree, or that make it available via an API.This paper discusses techniques, issues and challenges linked to compiler patching or wrapping for analysis purposes. In particular, different approaches for accessing the compiler parsing information are compared, and the techniques used to decouple the parsing front end from the analysis modules are discussed.Moreover, the paper presents an approach and a tool, XOgastan, developed exploiting the gcc/g++ ability to save a representation of the intermediate abstract syntax tree. XOgastan translates the gcc/g++ dumped abstract syntax tree format into a Graph eXchange Language representation, which makes it possible to take advantage of currently available XML tools for any subsequent analysis step. The tool is illustrated and its design discussed, showing its architecture and the main implementation choices made.
Keywords:source code analysis tools  gcc  XML  GXL
本文献已被 SpringerLink 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司    京ICP备09084417号-23

京公网安备 11010802026262号