Preview

Proceedings of the Institute for System Programming of the RAS (Proceedings of ISP RAS)

Advanced search

Analyzing C/C++ code entities and relations for program understanding

https://doi.org/10.15514/ISPRAS-2015-27(2)-4

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.

About the Authors

A. . Belevantsev
ISP RAS
Russian Federation


E. . Velesevich
ISP RAS
Russian Federation


References

1. The LLVM Compiler Infrastructure. http://LLVM.org/

2. Clang compiler. http://clang.llvm.org

3. The Understand tool. https://scitools.com/

4. The Imagix4D tool. http://www.imagix.com/products/source-code-analysis.html

5. A. Avetisyan, A. Belevantsev, A. Borodin, V. Nesov. Ispol'zovanie staticheskogo analiza dlya poiska uyazvimostej i kriticheskikh oshibok v iskhodnom kode program [The usage of static analysis for searching vulnerabilities and critical errors in source code]. Trudy ISP RАN [The Proceedings of ISP RAS], vol. 21, 2011. pp. 23-38 (in Russian)

6. V. Ivannikov, A. Belevantsev, A. Borodin, V. Ignatiev, D. Zhurikhin, A. Avetisyan, M. Leonov. Staticheskij analizator Svace dlya poiska defektov v iskhodnom kode program [Svace: static analyzer for detecting of defects in program source code]. Trudy ISP RАN [The Proceedings of ISP RAS], vol 26, issue 1, 2014, pp. 231-250 (in Russian)

7. The GNU Binutils package. http://www.gnu.org/software/binutils/


Review

For citations:


Belevantsev A., Velesevich E. Analyzing C/C++ code entities and relations for program understanding. Proceedings of the Institute for System Programming of the RAS (Proceedings of ISP RAS). 2015;27(2):53-64. (In Russ.) https://doi.org/10.15514/ISPRAS-2015-27(2)-4



Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 License.


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