SharpChecker: Static analysis tool for C# programs


Cite item

Full Text

Open Access Open Access
Restricted Access Access granted
Restricted Access Subscription Access

Abstract

This paper considers various aspects of static analysis of C# programs in order to detect the maximum number of software bugs in an acceptable time. A complete cycle of software static analysis is described with the main focus being placed on the specifics of the C# language. Some methods are discussed that take into account popular features of C# at all levels of analysis: call graph and control flow graph construction, dataflow analysis, as well as context- and path-sensitive interprocedural analysis. A symbolic execution method is proposed, which is based on the works devoted to the Bounded Model Checking (BMC) and the Saturn Software Analysis Project. A memory model is described that enables an accurate intraprocedural analysis and allows one to create compact representations of error conditions associated with functions, which are essential for interprocedural analysis. A special attention is paid to the optimizations that occur during path-sensitive analysis of error conditions. The conditions need to be optimized in terms of size, because path-sensitive interprocedural analysis requires saving a large number of conditions for each analyzed function. The conditions are resolved using advanced SMT solvers (such as the Microsoft Z3 Prover). This paper also considers various approaches to modeling the behavior of library functions: based on a summary containing a set of properties required for analysis, or based on simplified implementations in C#. All the discussed solutions are implemented in the SharpChecker static analysis tool and are tested on a number of open-source projects from 1.5 thousand to 1.35 million lines of code.

About the authors

V. K. Koshelev

Institute for System Programming

Author for correspondence.
Email: vedun@ispras.ru
Russian Federation, ul. Solzhenitsyna 25, Moscow

V. N. Ignatiev

Institute for System Programming

Email: vedun@ispras.ru
Russian Federation, ul. Solzhenitsyna 25, Moscow

A. I. Borzilov

Institute for System Programming

Email: vedun@ispras.ru
Russian Federation, ul. Solzhenitsyna 25, Moscow

A. A. Belevantsev

Institute for System Programming; Moscow State University

Email: vedun@ispras.ru
Russian Federation, ul. Solzhenitsyna 25, Moscow; Moscow


Copyright (c) 2017 Pleiades Publishing, Ltd.

This website uses cookies

You consent to our cookies if you continue to use our website.

About Cookies