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 条
  • [21] Compiler-Assisted Selection of Hardware Acceleration Candidates from Application Source Code
    Zacharopoulos, Georgios
    Ferretti, Lorenzo
    Ansaloni, Giovanni
    Di Guglielmo, Giuseppe
    Carloni, Luca
    Pozzi, Laura
    2019 IEEE 37TH INTERNATIONAL CONFERENCE ON COMPUTER DESIGN (ICCD 2019), 2019, : 129 - 137
  • [22] What Makefile? Detecting Compiler Information Without Source Using The Code Property Graph
    Deaton, Sean
    2022 IEEE 4TH INTERNATIONAL CONFERENCE ON TRUST, PRIVACY AND SECURITY IN INTELLIGENT SYSTEMS, AND APPLICATIONS, TPS-ISA, 2022, : 258 - 265
  • [23] SOURCE LANGUAGE ANALYSIS IN THE ECSSL HYBRID COMPILER.
    Leiva, C.A.
    Chai, A.S.
    1978, : 211 - 213
  • [24] FBI source convicted of hacking
    不详
    COMPUTERS & SECURITY, 2000, 19 (03) : 204 - 205
  • [25] Source code analysis dataset
    Gelman, Ben
    Obayomi, Banjo
    Moore, Jessica
    Slater, David
    Data in Brief, 2019, 27
  • [26] An alternative source code analysis
    Kimble, JE
    White, LJ
    INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, PROCEEDINGS, 2000, : 64 - 75
  • [27] Source code analysis dataset
    Gelman, Ben
    Obayomi, Banjo
    Moore, Jessica
    Slater, David
    DATA IN BRIEF, 2019, 27
  • [28] Source code analysis and manipulation
    Harman, M
    Munro, M
    Hu, L
    Zhang, XY
    INFORMATION AND SOFTWARE TECHNOLOGY, 2002, 44 (13) : 717 - 720
  • [29] Source code analysis and manipulation
    Oliveto, Rocco
    Hindle, Abram
    Lawrie, Dawn J.
    JOURNAL OF SYSTEMS AND SOFTWARE, 2017, 129 : 58 - 59
  • [30] Source code analysis with LDA
    Binkley, David
    Heinz, Daniel
    Lawrie, Dawn
    Overfelt, Justin
    JOURNAL OF SOFTWARE-EVOLUTION AND PROCESS, 2016, 28 (10) : 893 - 920