Proceedings of ISP RAS


Analyzing C/C++ Code Entities and Relations for Program Understanding

A. Belevantsev (ISP RAS, Moscow), E. Velesevich (ISP RAS, Moscow)

Abstract

This paper describes the static analysis tool for finding program entities, their metrics, and relations between entities. Program entities are files/directories (physical structure) and classes/functions/methods/global variables (logical structure). Relations are connections between entities, such as calls, inheritance, aggregation, reading/writing, inclusion. We describe the methods for developing such a tool for C/C++ languages based on open source components: LLVM/Clang compiler infrastructure, GNU Binutils linker and archiver. We are sketching the changes that were required to be made in the Clang compiler, and we discuss the analysis methods implemented in the LLVM analyzer. We briefly present the results of testing our tool on Android OS.

Keywords

program understanding; LLVM compiler; static analysis; code metrics

Edition

Proceedings of the Institute for System Programming, vol. 27, issue 2, 2015, pp. 53-64.

ISSN 2220-6426 (Online), ISSN 2079-8156 (Print).

DOI: 10.15514/ISPRAS-2015-27(2)-4

Full text of the paper in pdf (in Russian) Back to the contents of the volume