SlideShare a Scribd company logo
Comparing PVS-Studio with other code
analyzers
Author: Evgeniy Ryzhkov

Date: 14.10.2009


Abstract
The article discusses comparison of PVS-Studio code analyzer with other solutions in this sphere. As PVS-
Studio contains modules for diagnosing 64-bit and parallel errors, it is compared to various types of
tools.


The approach to comparison
Programmers-users and developers of static code analyzers know how difficult it is to compare tools of
this type. For besides different classes of diagnosed errors, it is often very difficult to formalize diagnosis
of errors of even one type to "yes/no" estimate. However, such a comparison may be needed to make it
possible to select from several tools a solution fit for some particular task best.

In this article, we compare PVS-Studio code analyzer developed by OOO "Program Verification Systems"
with similar solutions. The article is intended for those users of the tool who want to have a basis for
choosing a code analyzer for their tasks.


What is compared to what?
The comparison is based on other articles by our authors where it is described more thoroughly what
had been compared and in what way. The readers who would like to make out the comparison methods
and principles may see additional materials.

We will single out two types of errors:

    •   "64-bit errors" - errors occurring when migrating from 32-bit systems to 64-bit ones or when
        developing new 64-bit applications;
    •   "parallel errors" - parallel programming errors occurring when using OpenMP technology
        incorrectly.

In the category "64-bit errors", the following four solutions participate: PVS-Studio (Viva64), PC-Lint,
C++-test, /Wp64 switch of Visual C++ or diagnostics emitted by Visual C++ x64 compiler. The choice is
explained by the fact that only these solutions have special support of diagnosing 64-bit errors described
in the documentation.

In the category "parallel errors", two solutions are compared: PVS-Studio (VivaMP) and Intel Parallel
Studio (Parallel Lint). These two tools allow diagnosing parallel errors when using OpenMP technology
on Windows-systems.

All the tools listed perform diagnosis of errors in C/C++ code.
Comparison of the tools was performed in the following way. For each group of errors (64-bit and
parallel errors) we created a base of patterns of errors described in the documentation for the tools
being compared. The tools to be compared were tested on the ability to detect errors of each type. The
results are given in the articles providing detailed comparisons of the tools. Proceeding from the results,
we gave a total estimate for each tool. This was done in the following way. If an error had been
diagnosed fully, the tool got 1 point; if partly, 0.5; if the error had not been diagnosed at all, 0 points.
Then a total estimate was calculated in per cent: 100% - all the error patterns had been detected; 0% -
no error patterns had been detected.


Diagnosis of 64-bit errors




                    Figure 1 - Results of comparing the tools for 64-bit error diagnosis

Here is an article providing a description of the base of error patterns and a detailed description of
comparison: "Comparison of analyzers' diagnostic possibilities at checking 64-bit code".

Let's explain the comparison results. It is not that some code analyzer is better and some other is worse.
But when diagnosing a particular type of errors ("64-bit errors") the analyzers show different results
and, fortunately, we can make our choice objectively.

We should specially mention the compiler switch /Wp64 in Visual Studio environment. Although this
switch is not a code analysis tool unlike other solutions mentioned here, it participated in the
comparison as well. Yet, its abilities of diagnosing 64-bit errors are very limited and this explains its low
total estimate. To learn more about it see the article "64 bits, Wp64, Visual Studio 2008, Viva64 and all
the rest...".


Diagnosis of parallel errors




              Figure 2 - Results of comparing the tools for OpenMP parallel error diagnosis

Here is an article with a description of the base of error patterns and a detailed description of
comparison:"An unsuccessful attempt to compare PVS-Studio (VivaMP) and Intel C/C++ ("Parallel Lint")".

This kind of comparison is much more incorrect than comparison in the sphere of 64-bit error diagnosis.
The point is that the number of error patterns diagnosed in Intel Parallel Studio is rather large. But
documentation on these patterns is too poor. Ideally, the base of patterns should be enlarged with the
errors diagnosed by Intel Parallel Studio but we cannot do this yet. That is why Intel Parallel Studio got
few points. This situation is described more thoroughly in the article with the detailed description of
comparison.


Comparison results
This article's point was not to try to show weak points of other developers' tools. We just tried to show
those tasks at which PVS-Studio is good. There are two such tasks:

    •   diagnosis of 64-bit errors;
    •   diagnosis of parallel OpenMP errors.

What these two tasks is concerned, our tool surpasses other similar solutions. For other tasks, it is
reasonable to use more suitable tools.


References
    1. Andrey Karpov. Comparison of analyzers' diagnostic possibilities at checking 64-bit code.
       http://www.viva64.com/art-1-2-914146540.html
2. Andrey Karpov. 64 bits, Wp64, Visual Studio 2008, Viva64 and all the rest...
   http://www.viva64.com/art-1-2-621693540.html
3. Andrey Karpov. An unsuccessful attempt to compare PVS-Studio (VivaMP) and Intel C/C++
   ("Parallel Lint"). http://www.viva64.com/art-3-2-1186541094.html

More Related Content

PDF
How we test the code analyzer
PDF
How we test the code analyzer
PDF
Why I Dislike Synthetic Tests
PDF
PVS-Studio advertisement - static analysis of C/C++ code
PDF
Regular use of static code analysis in team development
PDF
Regular use of static code analysis in team development
PDF
Regular use of static code analysis in team development
PDF
What's the Difference Between Static Analysis and Compiler Warnings?
How we test the code analyzer
How we test the code analyzer
Why I Dislike Synthetic Tests
PVS-Studio advertisement - static analysis of C/C++ code
Regular use of static code analysis in team development
Regular use of static code analysis in team development
Regular use of static code analysis in team development
What's the Difference Between Static Analysis and Compiler Warnings?

What's hot (20)

PDF
Testing parallel programs
PDF
Static analysis as part of the development process in Unreal Engine
PPTX
AspectMock
PPTX
Vs c# lecture6
PDF
Comparing static analysis in Visual Studio 2012 (Visual C++ 2012) and PVS-Studio
PDF
Automatic Test Case Generation
PPT
.Net Debugging Techniques
PDF
Model-based Testing using Microsoft’s Spec Explorer Tool: A Case Study
PDF
Lesson 7. The issues of detecting 64-bit errors
PPTX
Why to choose HP UFT: Automation testing tool
PDF
Automated Test Case Generation and Execution from Models
PDF
Static and Dynamic Code Analysis
PDF
PVS-Studio Has Finally Got to Boost
PDF
150412 38 beamer methods of binary analysis
PPTX
Unit tests & TDD
PPTX
Unit Tests And Automated Testing
PDF
Analysis of PascalABC.NET using SonarQube plugins: SonarC# and PVS-Studio
PPTX
Error handling and debugging in vb
Testing parallel programs
Static analysis as part of the development process in Unreal Engine
AspectMock
Vs c# lecture6
Comparing static analysis in Visual Studio 2012 (Visual C++ 2012) and PVS-Studio
Automatic Test Case Generation
.Net Debugging Techniques
Model-based Testing using Microsoft’s Spec Explorer Tool: A Case Study
Lesson 7. The issues of detecting 64-bit errors
Why to choose HP UFT: Automation testing tool
Automated Test Case Generation and Execution from Models
Static and Dynamic Code Analysis
PVS-Studio Has Finally Got to Boost
150412 38 beamer methods of binary analysis
Unit tests & TDD
Unit Tests And Automated Testing
Analysis of PascalABC.NET using SonarQube plugins: SonarC# and PVS-Studio
Error handling and debugging in vb
Ad

Viewers also liked (20)

PDF
VivaMP, system of detecting errors in the code of parallel C++ programs using...
PDF
Case Study: Porting a set of point cloud and triangle mesh processing C++ lib...
PDF
Interview with Issam Lahlali, one of the CppDepend tool creators
PDF
Difficulties of comparing code analyzers, or don't forget about usability
PDF
Lesson 24. Phantom errors
PDF
Lesson 17. Pattern 9. Mixed arithmetic
PDF
Viva64: working up of 64-bit applications
PDF
Development of a static code analyzer for detecting errors of porting program...
PDF
64-bit Loki
PDF
Lesson 11. Pattern 3. Shift operations
PDF
Lesson 23. Pattern 15. Growth of structures' sizes
PDF
Mobile CRM Webinar: 6 Steps to Mobile ROI for Government Agencies
PDF
Interview with Dmitriy Vyukov - the author of Relacy Race Detector (RRD)
PDF
Traps detection during migration of C and C++ code to 64-bit Windows
PDF
Intel IPP Samples for Windows - error correction
PDF
Debugging and optimization of multi-thread OpenMP-programs
PDF
Optimization in the world of 64-bit errors
PDF
Lesson 21. Pattern 13. Data alignment
PDF
Some examples of the 64-bit code errors
PPTX
PVS-Studio, a solution for developers of modern resource-intensive applications
VivaMP, system of detecting errors in the code of parallel C++ programs using...
Case Study: Porting a set of point cloud and triangle mesh processing C++ lib...
Interview with Issam Lahlali, one of the CppDepend tool creators
Difficulties of comparing code analyzers, or don't forget about usability
Lesson 24. Phantom errors
Lesson 17. Pattern 9. Mixed arithmetic
Viva64: working up of 64-bit applications
Development of a static code analyzer for detecting errors of porting program...
64-bit Loki
Lesson 11. Pattern 3. Shift operations
Lesson 23. Pattern 15. Growth of structures' sizes
Mobile CRM Webinar: 6 Steps to Mobile ROI for Government Agencies
Interview with Dmitriy Vyukov - the author of Relacy Race Detector (RRD)
Traps detection during migration of C and C++ code to 64-bit Windows
Intel IPP Samples for Windows - error correction
Debugging and optimization of multi-thread OpenMP-programs
Optimization in the world of 64-bit errors
Lesson 21. Pattern 13. Data alignment
Some examples of the 64-bit code errors
PVS-Studio, a solution for developers of modern resource-intensive applications
Ad

Similar to Comparing PVS-Studio with other code analyzers (20)

PDF
PVS-Studio advertisement - static analysis of C/C++ code
PDF
Difficulties of comparing code analyzers, or don't forget about usability
PDF
Difficulties of comparing code analyzers, or don't forget about usability
PDF
PVS-Studio for Visual C++
PDF
Static analysis is most efficient when being used regularly. We'll tell you w...
PDF
What do static analysis and search engines have in common? A good "top"!
PDF
64 bits, Wp64, Visual Studio 2008, Viva64 and all the rest...
PDF
Comparison of static code analyzers: CppCat, Cppcheck, PVS-Studio and Visual ...
PDF
Diving into VS 2015 Day2
PDF
Static analysis is most efficient when being used regularly. We'll tell you w...
PDF
How PVS-Studio does the bug search: methods and technologies
PDF
Comparing Functionalities of PVS-Studio and CppCat Static Code Analyzers
PDF
PVS-Studio and CppCat: An Interview with Andrey Karpov, the Project CTO and D...
PDF
Static Analysis: From Getting Started to Integration
PDF
A Long-Awaited Check of Unreal Engine 4
PDF
Searching for bugs in Mono: there are hundreds of them!
PDF
How the PVS-Studio analyzer began to find even more errors in Unity projects
PDF
Viva64: What Is It, and Who Is It for?
PDF
How to Improve Visual C++ 2017 Libraries Using PVS-Studio
PDF
VivaMP - a tool for OpenMP
PVS-Studio advertisement - static analysis of C/C++ code
Difficulties of comparing code analyzers, or don't forget about usability
Difficulties of comparing code analyzers, or don't forget about usability
PVS-Studio for Visual C++
Static analysis is most efficient when being used regularly. We'll tell you w...
What do static analysis and search engines have in common? A good "top"!
64 bits, Wp64, Visual Studio 2008, Viva64 and all the rest...
Comparison of static code analyzers: CppCat, Cppcheck, PVS-Studio and Visual ...
Diving into VS 2015 Day2
Static analysis is most efficient when being used regularly. We'll tell you w...
How PVS-Studio does the bug search: methods and technologies
Comparing Functionalities of PVS-Studio and CppCat Static Code Analyzers
PVS-Studio and CppCat: An Interview with Andrey Karpov, the Project CTO and D...
Static Analysis: From Getting Started to Integration
A Long-Awaited Check of Unreal Engine 4
Searching for bugs in Mono: there are hundreds of them!
How the PVS-Studio analyzer began to find even more errors in Unity projects
Viva64: What Is It, and Who Is It for?
How to Improve Visual C++ 2017 Libraries Using PVS-Studio
VivaMP - a tool for OpenMP

Recently uploaded (20)

PDF
Electronic commerce courselecture one. Pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Spectroscopy.pptx food analysis technology
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Machine learning based COVID-19 study performance prediction
PPT
Teaching material agriculture food technology
PDF
KodekX | Application Modernization Development
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Review of recent advances in non-invasive hemoglobin estimation
Electronic commerce courselecture one. Pdf
Unlocking AI with Model Context Protocol (MCP)
Spectroscopy.pptx food analysis technology
Network Security Unit 5.pdf for BCA BBA.
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
20250228 LYD VKU AI Blended-Learning.pptx
Programs and apps: productivity, graphics, security and other tools
MIND Revenue Release Quarter 2 2025 Press Release
“AI and Expert System Decision Support & Business Intelligence Systems”
Chapter 3 Spatial Domain Image Processing.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Mobile App Security Testing_ A Comprehensive Guide.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Machine learning based COVID-19 study performance prediction
Teaching material agriculture food technology
KodekX | Application Modernization Development
Reach Out and Touch Someone: Haptics and Empathic Computing
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Review of recent advances in non-invasive hemoglobin estimation

Comparing PVS-Studio with other code analyzers

  • 1. Comparing PVS-Studio with other code analyzers Author: Evgeniy Ryzhkov Date: 14.10.2009 Abstract The article discusses comparison of PVS-Studio code analyzer with other solutions in this sphere. As PVS- Studio contains modules for diagnosing 64-bit and parallel errors, it is compared to various types of tools. The approach to comparison Programmers-users and developers of static code analyzers know how difficult it is to compare tools of this type. For besides different classes of diagnosed errors, it is often very difficult to formalize diagnosis of errors of even one type to "yes/no" estimate. However, such a comparison may be needed to make it possible to select from several tools a solution fit for some particular task best. In this article, we compare PVS-Studio code analyzer developed by OOO "Program Verification Systems" with similar solutions. The article is intended for those users of the tool who want to have a basis for choosing a code analyzer for their tasks. What is compared to what? The comparison is based on other articles by our authors where it is described more thoroughly what had been compared and in what way. The readers who would like to make out the comparison methods and principles may see additional materials. We will single out two types of errors: • "64-bit errors" - errors occurring when migrating from 32-bit systems to 64-bit ones or when developing new 64-bit applications; • "parallel errors" - parallel programming errors occurring when using OpenMP technology incorrectly. In the category "64-bit errors", the following four solutions participate: PVS-Studio (Viva64), PC-Lint, C++-test, /Wp64 switch of Visual C++ or diagnostics emitted by Visual C++ x64 compiler. The choice is explained by the fact that only these solutions have special support of diagnosing 64-bit errors described in the documentation. In the category "parallel errors", two solutions are compared: PVS-Studio (VivaMP) and Intel Parallel Studio (Parallel Lint). These two tools allow diagnosing parallel errors when using OpenMP technology on Windows-systems. All the tools listed perform diagnosis of errors in C/C++ code.
  • 2. Comparison of the tools was performed in the following way. For each group of errors (64-bit and parallel errors) we created a base of patterns of errors described in the documentation for the tools being compared. The tools to be compared were tested on the ability to detect errors of each type. The results are given in the articles providing detailed comparisons of the tools. Proceeding from the results, we gave a total estimate for each tool. This was done in the following way. If an error had been diagnosed fully, the tool got 1 point; if partly, 0.5; if the error had not been diagnosed at all, 0 points. Then a total estimate was calculated in per cent: 100% - all the error patterns had been detected; 0% - no error patterns had been detected. Diagnosis of 64-bit errors Figure 1 - Results of comparing the tools for 64-bit error diagnosis Here is an article providing a description of the base of error patterns and a detailed description of comparison: "Comparison of analyzers' diagnostic possibilities at checking 64-bit code". Let's explain the comparison results. It is not that some code analyzer is better and some other is worse. But when diagnosing a particular type of errors ("64-bit errors") the analyzers show different results and, fortunately, we can make our choice objectively. We should specially mention the compiler switch /Wp64 in Visual Studio environment. Although this switch is not a code analysis tool unlike other solutions mentioned here, it participated in the comparison as well. Yet, its abilities of diagnosing 64-bit errors are very limited and this explains its low
  • 3. total estimate. To learn more about it see the article "64 bits, Wp64, Visual Studio 2008, Viva64 and all the rest...". Diagnosis of parallel errors Figure 2 - Results of comparing the tools for OpenMP parallel error diagnosis Here is an article with a description of the base of error patterns and a detailed description of comparison:"An unsuccessful attempt to compare PVS-Studio (VivaMP) and Intel C/C++ ("Parallel Lint")". This kind of comparison is much more incorrect than comparison in the sphere of 64-bit error diagnosis. The point is that the number of error patterns diagnosed in Intel Parallel Studio is rather large. But documentation on these patterns is too poor. Ideally, the base of patterns should be enlarged with the errors diagnosed by Intel Parallel Studio but we cannot do this yet. That is why Intel Parallel Studio got few points. This situation is described more thoroughly in the article with the detailed description of comparison. Comparison results This article's point was not to try to show weak points of other developers' tools. We just tried to show those tasks at which PVS-Studio is good. There are two such tasks: • diagnosis of 64-bit errors; • diagnosis of parallel OpenMP errors. What these two tasks is concerned, our tool surpasses other similar solutions. For other tasks, it is reasonable to use more suitable tools. References 1. Andrey Karpov. Comparison of analyzers' diagnostic possibilities at checking 64-bit code. http://www.viva64.com/art-1-2-914146540.html
  • 4. 2. Andrey Karpov. 64 bits, Wp64, Visual Studio 2008, Viva64 and all the rest... http://www.viva64.com/art-1-2-621693540.html 3. Andrey Karpov. An unsuccessful attempt to compare PVS-Studio (VivaMP) and Intel C/C++ ("Parallel Lint"). http://www.viva64.com/art-3-2-1186541094.html