Compiler hacking for source code analysis

被引:9
|
作者
Antoniol, G
Di Penta, M
Masone, G
Villano, U
机构
[1] Univ Sannio, Res Ctr Software Technol, Dept Engn, I-82100 Benevento, Italy
[2] Telsey Telecommun SpA, I-82100 Benevento, Italy
关键词
source code analysis tools; gcc; XML; GXL;
D O I
10.1023/B:SQJO.0000039794.29432.7e
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页码:383 / 406
页数:24
相关论文
共 50 条
  • [31] Source Code Analysis - An Overview
    Kirkov, Radoslav
    Agre, Gennady
    CYBERNETICS AND INFORMATION TECHNOLOGIES, 2010, 10 (02) : 60 - 77
  • [32] Polyhedral Source-to-Source Compiler
    Adamski, Dominik
    Jablonski, Grzegorz
    Perek, Piotr
    Napieralski, Andrzej
    PROCEEDINGS OF THE 23RD INTERNATIONAL CONFERENCE ON MIXED DESIGN OF INTEGRATED CIRCUITS AND SYSTEMS (MIXDES 2016), 2016, : 458 - 463
  • [33] State hacking at the edge of code, capitalism and culture
    Follis, Luca
    Fish, Adam
    INFORMATION COMMUNICATION & SOCIETY, 2022, 25 (02) : 242 - 257
  • [34] A study of source-level compiler algorithms for automatic construction of pre-execution code
    Kim, D
    Yeung, D
    ACM TRANSACTIONS ON COMPUTER SYSTEMS, 2004, 22 (03): : 326 - 379
  • [35] Executable source code and non-executable source code: analysis and relationships
    Robles, G
    Gonzalez-Barahona, JM
    FOURTH IEEE INTERNATIONAL WORKSHOP ON SOURCE CODE ANALYSIS AND MANIPULATION, PROCEEDINGS, 2004, : 149 - 157
  • [36] Source-Level Debugging of Compiler-Optimised Code: Ill-Posed, but Not Impossible
    Kell, Stephen
    Stinnett, J. Ryan
    PROCEEDINGS OF THE 2024 ACM SIGPLAN INTERNATIONAL SYMPOSIUM ON NEW IDEAS, NEW PARADIGMS, AND REFLECTIONS ON PROGRAMMING AND SOFTWARE, ONWARD! 2024, 2024, : 38 - 53
  • [37] Compiler-assisted Code Randomization
    Koo, Hyungjoon
    Chen, Yaohui
    Lu, Long
    Kemerlis, Vasileios P.
    Polychronakis, Michalis
    2018 IEEE SYMPOSIUM ON SECURITY AND PRIVACY (SP), 2018, : 461 - 477
  • [38] FPGA Code Accelerators - The Compiler Perspective
    Najjar, Walid
    Villarreal, Jason
    2013 50TH ACM / EDAC / IEEE DESIGN AUTOMATION CONFERENCE (DAC), 2013,
  • [39] Neuroevolutionary Compiler Control for Code Optimization
    Heckel, Kade
    PROCEEDINGS OF THE 2023 GENETIC AND EVOLUTIONARY COMPUTATION CONFERENCE COMPANION, GECCO 2023 COMPANION, 2023, : 2362 - 2365
  • [40] Code Generation in the Columbia Esterel Compiler
    Edwards, Stephen A.
    Zeng, Jia
    EURASIP JOURNAL ON EMBEDDED SYSTEMS, 2007, (01)