Implementation of inter-unit analysis for C and C++ languages in a source-based static code analyzer

The proliferation of automated testing capabilities arises a need for thorough testing of large software systems, including system inter-component interfaces. The objective of this research is to build a method for inter-procedural inter-unit analysis, which allows us to analyse large and complex so...

Full description

Bibliographic Details
Main Author: A. V. Sidorin
Format: Article
Language:Russian
Published: MGTU im. N.È. Baumana 2015-01-01
Series:Nauka i Obrazovanie
Subjects:
C++
Online Access:http://technomag.edu.ru/jour/article/view/185
id doaj-629047e88275422eb3f65908f9ed8206
record_format Article
spelling doaj-629047e88275422eb3f65908f9ed82062020-11-24T22:57:03ZrusMGTU im. N.È. BaumanaNauka i Obrazovanie1994-04082015-01-010914515910.7463/0915.0812271185Implementation of inter-unit analysis for C and C++ languages in a source-based static code analyzerA. V. Sidorin0Bauman Moscow State Technical University; Moscow Samsung Research CenterThe proliferation of automated testing capabilities arises a need for thorough testing of large software systems, including system inter-component interfaces. The objective of this research is to build a method for inter-procedural inter-unit analysis, which allows us to analyse large and complex software systems including multi-architecture projects (like Android OS) as well as to support complex assembly systems of projects. Since the selected Clang Static Analyzer uses source code directly as input data, we need to develop a special technique to enable inter-unit analysis for such analyzer. This problem is of special nature because of C and C++ language features that assume and encourage the separate compilation of project files. We describe the build and analysis system that was implemented around Clang Static Analyzer to enable inter-unit analysis and consider problems related to support of complex projects. We also consider the task of merging abstract source trees of translation units and its related problems such as handling conflicting definitions, complex build systems and complex projects support, including support for multi-architecture projects, with examples. We consider both issues related to language design and human-related mistakes (that may be intentional). We describe some heuristics that were used for this work to make the merging process faster. The developed system was tested using Android OS as the input to show it is applicable even for such complicated projects. This system does not depend on the inter-procedural analysis method and allows the arbitrary change of its algorithm.http://technomag.edu.ru/jour/article/view/185C++static code analysissymbolic executioninterprocedural analysisClang Static Analyzerinter-unit analysis
collection DOAJ
language Russian
format Article
sources DOAJ
author A. V. Sidorin
spellingShingle A. V. Sidorin
Implementation of inter-unit analysis for C and C++ languages in a source-based static code analyzer
Nauka i Obrazovanie
C++
static code analysis
symbolic execution
interprocedural analysis
Clang Static Analyzer
inter-unit analysis
author_facet A. V. Sidorin
author_sort A. V. Sidorin
title Implementation of inter-unit analysis for C and C++ languages in a source-based static code analyzer
title_short Implementation of inter-unit analysis for C and C++ languages in a source-based static code analyzer
title_full Implementation of inter-unit analysis for C and C++ languages in a source-based static code analyzer
title_fullStr Implementation of inter-unit analysis for C and C++ languages in a source-based static code analyzer
title_full_unstemmed Implementation of inter-unit analysis for C and C++ languages in a source-based static code analyzer
title_sort implementation of inter-unit analysis for c and c++ languages in a source-based static code analyzer
publisher MGTU im. N.È. Baumana
series Nauka i Obrazovanie
issn 1994-0408
publishDate 2015-01-01
description The proliferation of automated testing capabilities arises a need for thorough testing of large software systems, including system inter-component interfaces. The objective of this research is to build a method for inter-procedural inter-unit analysis, which allows us to analyse large and complex software systems including multi-architecture projects (like Android OS) as well as to support complex assembly systems of projects. Since the selected Clang Static Analyzer uses source code directly as input data, we need to develop a special technique to enable inter-unit analysis for such analyzer. This problem is of special nature because of C and C++ language features that assume and encourage the separate compilation of project files. We describe the build and analysis system that was implemented around Clang Static Analyzer to enable inter-unit analysis and consider problems related to support of complex projects. We also consider the task of merging abstract source trees of translation units and its related problems such as handling conflicting definitions, complex build systems and complex projects support, including support for multi-architecture projects, with examples. We consider both issues related to language design and human-related mistakes (that may be intentional). We describe some heuristics that were used for this work to make the merging process faster. The developed system was tested using Android OS as the input to show it is applicable even for such complicated projects. This system does not depend on the inter-procedural analysis method and allows the arbitrary change of its algorithm.
topic C++
static code analysis
symbolic execution
interprocedural analysis
Clang Static Analyzer
inter-unit analysis
url http://technomag.edu.ru/jour/article/view/185
work_keys_str_mv AT avsidorin implementationofinterunitanalysisforcandclanguagesinasourcebasedstaticcodeanalyzer
_version_ 1725652202585849856