Abstract
A tool for the static analysis of programs that can detect entities in C and C++ programs, their metrics, and relations between them is considered. The program entities are files, functions, classes, methods, etc., and relations are calls, inheritance, read/write operations of global variables, file inclusion, and aggregation. Methods for the development of such a tool based on the open compiler infrastructure LLVM [1], including the necessary modifications in the Clang compiler [2], and the developed analyzer are described. Results of the tool testing on the Android code are presented.
Similar content being viewed by others
References
The LLVM Compiler Infrastructure. http://LLVM. org.
Clang compiler. http://clang.llvm.org.
The Tool Understand. https://scitools.com.
The Tool Imagix4D. http://www.imagix.com/products/source-code-analysis.html.
Avetisyan, A.I., Belevantsev, A.A., Borodin, A.E., and Nesov, V.S., The use of static analysis for detecting vulnerabilities and critical bugs in source code, Tr. Inst. Sistemnogo Program. Ross. Akad. Nauk, 2011, vol. 21, pp. 23–38.
Ivannikov, V.P., Belevantsev, A.A., Borodin, A.E., Ignat’ev, V.N., Zhurikhin, D.M., Avetisyan, A.I., and Leonov, M.I., The static analyzer Svace for detecting defects in source codes, Tr. Inst. Sist. Program. Ross. Akad. Nauk, 2014, vol. 26, no. 1, pp. 231–250.
GNU Binutils. http://www.gnu.org/software/binutils.
Author information
Authors and Affiliations
Corresponding author
Additional information
Original Russian Text © A.A. Belevantsev, E.A. Veselevich, V.P. Ivannikov, 2016, published in Trudy Instituta Sistemnogo Programmirovaniya, 2015, Vol. 27, No. 2.
Rights and permissions
About this article
Cite this article
Belevantsev, A.A., Veselevich, E.A. & Ivannikov, V.P. Analysis of entities in C and C++ programs and relations between them for program understanding. Program Comput Soft 42, 49–53 (2016). https://doi.org/10.1134/S0361768816010023
Received:
Published:
Issue Date:
DOI: https://doi.org/10.1134/S0361768816010023