Polyspace is a static code analysis tool for large-scale analysis by
abstract interpretation
In computer science, abstract interpretation is a theory of sound approximation of the semantics of computer programs, based on monotonic functions over ordered sets, especially lattices. It can be viewed as a partial execution of a computer prog ...
to detect, or prove the absence of, certain run-time errors in source code for the
C,
C++
C++ (pronounced "C plus plus") is a high-level general-purpose programming language created by Danish computer scientist Bjarne Stroustrup as an extension of the C programming language, or "C with Classes". The language has expanded significan ...
, and
Ada
Ada may refer to:
Places
Africa
* Ada Foah, a town in Ghana
* Ada (Ghana parliament constituency)
* Ada, Osun, a town in Nigeria
Asia
* Ada, Urmia, a village in West Azerbaijan Province, Iran
* Ada, Karaman, a village in Karaman Province, ...
programming languages. The tool also checks source code for adherence to appropriate code standards.
Common uses
Polyspace examines the source code to determine where potential run-time errors such as
arithmetic overflow
Arithmetic () is an elementary part of mathematics that consists of the study of the properties of the traditional operations on numbers—addition, subtraction, multiplication, division, exponentiation, and extraction of roots. In the 19th cen ...
,
buffer overrun
In information security and programming, a buffer overflow, or buffer overrun, is an anomaly whereby a program, while writing data to a buffer, overruns the buffer's boundary and overwrites adjacent memory locations.
Buffers are areas of memor ...
,
division by zero
In mathematics, division by zero is division (mathematics), division where the divisor (denominator) is 0, zero. Such a division can be formally expression (mathematics), expressed as \tfrac, where is the dividend (numerator). In ordinary ari ...
, and others could occur. Software developers and quality assurance managers use this information to identify which parts of the code are faulty or proven to be reliable. Other parts of the code are marked for unproven checks and deserve individual review.
Code standards or guidelines such as
MISRA C
MISRA C is a set of software development guidelines for the C programming language developed by The MISRA Consortium. Its aims are to facilitate code safety, security, portability and reliability in the context of embedded systems, specifically ...
attempt to address code quality, portability, and reliability. The product checks C and C++ source code for conformance to a subset of rules in these coding standards.
Capabilities
The product family consists of Polyspace Code Prover and Polyspace Bug Finder. The Code Prover module annotates source code with a color-coding scheme to indicate the status of each element in the code. It uses
formal methods
In computer science, formal methods are mathematically rigorous techniques for the specification, development, and verification of software and hardware systems. The use of formal methods for software and hardware design is motivated by the expec ...
-based static code analysis to verify program execution at the language level.
The tool checks each code instruction by taking into account all possible values of every variable at every point in the code, providing a formal diagnostic for each operation in the code under both normal and abnormal usage conditions.
The Bug Finder module identifies software bugs by performing static program analysis on source code. It finds defects such as numerical computation, programming, memory, and other errors. It also produces software metrics such as Comment density of a source file, Cyclomatic complexity, Number of lines, parameters, call levels, etc. in a function, Identified run-time errors in the software.
See also
*
List of tools for static code analysis
This is a list of notable tools for static program analysis (program analysis is a synonym for code analysis).
Static code analysis tools
Languages
Ada
*
*
*
*
*
*
*
*
*
*
*
C, C++
*
*
*
*
*
*
*
*
*
*
*
* ...
References
External links
* {{Official website
Static program analysis tools
Software testing tools
Abstract interpretation