background preloader

Code Analysis

Facebook Twitter

SonarQube. PVS-Studio: Static Code Analyzer for C/C++/C++11. PVS-Studio is a static analyzer that detects errors in source code of C/C++/C++11 applications.

PVS-Studio: Static Code Analyzer for C/C++/C++11

There are sets of rules included into PVS-Studio: To learn more about each type of diagnosis, visit the corresponding pages. The methodology of static code analysis we employ has significant advantages over other types of analysis since it allows you to cover the whole program code. The procedure of code check cannot damage the code itself in any way. The analysis process is completely controlled by person and it is the programmer who decides if it needs modification. You can see or download a presentation about PVS-Studio. Integration with Microsoft Visual Studio and Embarcadero RAD Studio PVS-Studio Features PVS-Studio Advantages Easy-to-download! Supported languages and dialects PVS-Studio can only run under Windows. Read about bugs which were found in well-known projects by PVS-Studio Read about the comparison of PVS-Studio with other tools.

Comparing the general static analysis in Visual Studio 2010 and PVS-Studio by examples of errors detected in five open source projects. Abstract The article demonstrates errors detected with the static code analyzer integrated into Visual Studio 2010.

Comparing the general static analysis in Visual Studio 2010 and PVS-Studio by examples of errors detected in five open source projects

The research was performed on five open source projects. The same projects were also checked with PVS-Studio. Results of comparing these two tools are presented at the end of the article. Introduction The article "Difficulties of comparing code analyzers, or don't forget about usability" [1] tells that it is not so easy to compare two tools as it may seem because the parameter of usability is also highly significant besides the technical characteristics proper.

Still we cannot do without comparing tools by errors they can detect. We checked five random open source projects with the static analyzer integrated into Visual Studio 2010 Premium. Here is a list of projects which participated in the research: Let's go! eMule Plus The total number of messages generated by the Visual Studio static analyzer is 237, 4 of them being real errors.

Abstract interpretation. Its main concrete application is formal static analysis, the automatic extraction of information about the possible executions of computer programs; such analyses have two main usages: Abstract interpretation was formalized by Patrick Cousot and Radhia Cousot in the late 1970s. [1] [2] Intuition[edit] This article illustrates abstract interpretation by means of real-world, non-computing examples.

Abstract interpretation

Consider the people in a conference room. Assume a unique identifier for each person in the room, like a social security number in the United States. However it is possible that only the names of attendees were registered. If we are only interested in some specific information, say, "was there a person of age n in the room? " In the case of computing, concrete, precise information is in general not computable within finite time and memory (see Rice's theorem and the halting problem). Abstract interpretation of computer programs[edit] Formalization[edit] Let L1, L2, L′1 and L′2 be ordered sets. John-Carmack. Static Code Analysis.

The most important thing I have done as a programmer in recent years is to aggressively pursue static code analysis.

John-Carmack. Static Code Analysis

Even more valuable than the hundreds of serious bugs I have prevented with it is the change in mindset about the way I view software reliability and code quality. It is important to say right up front that quality isn’t everything, and acknowledging it isn’t some sort of moral failing. Value is what you are trying to produce, and quality is only one aspect of it, intermixed with cost, features, and other factors. There have been plenty of hugely successful and highly regarded titles that were filled with bugs and crashed a lot; pursuing a Space Shuttle style code development process for game development would be idiotic. Still, quality does matter. I have always cared about writing good code; one of my important internal motivations is that of the craftsman, and I always want to improve.

Coverity Initially, I contacted Coverity and signed up for a demo run. PVS-Studio.