Visit the National Instruments web site

Source-code-analysis tool detects Ada errors

An Adacore product story
More from this company More from this category
Edited by the Electronicstalk editorial team Jan 14, 2010

Adacore has released Codepeer, a source-code-analysis tool that detects run-time and logic errors in Ada programs.

Codepeer identifies constructs that are likely to lead to run-time errors, such as buffer overflows, and flags legal but suspect code typical of logic errors.

The tool also produces a detailed analysis of each subprogram, including pre- and postconditions.

If the implicit specification deduced by Codepeer does not match the component's requirements, a reviewer is alerted immediately to a likely logic error.

The tool can be used during system development to prevent errors from being introduced, or as part of a systematic code-review process, and retrospectively on existing code to detect and remove latent bugs.

Codepeer can be used as a standalone tool or fully integrated into the GNAT Pro Ada development environment.

It is highly flexible, with performance that can be tuned based on the memory and speed available on the developer's machine, and can efficiently exploit multi-core CPUs.

It can be run on partially complete programs and does not require stubs or drivers.

Codepeer analyses programs for a range of flaws, including use of uninitialised data, pointer misuse, buffer overflow, numeric overflow, division by zero, dead code and concurrency faults.

It identifies errors statically, without running the program, and determines where the failure could occur and where the bad values originate.

The tool also looks for code that is performing a suspect computation, such as an assignment to a variable that is never subsequently referenced, or a conditional test that always evaluates to the same true or false value.

Internally, Codepeer uses static control-flow, data-flow and value-propagation techniques to identify possible errors.

It mathematically analyses every line of code without executing the program, considering all combinations of program input across all paths within the program.

It automatically generates human-readable and machine-readable component specifications in the form of preconditions, postconditions, inputs, outputs and heap allocations, which - along with the error messages - can be displayed graphically or as in-line comments in the source-code listing.

In a multi-threaded system, Codepeer identifies where race conditions might occur.

To increase performance and usability it internally maintains a historical error database, which allows it to highlight the new coding problems and track trends across multiple analyses.

Not what you're looking for? Search the site.

Back to top Back to top

Google Ads

 

Contact Adacore

Contact Adacore

Related Stories

Contact Adacore

 

Newsletter sign up

Request your free weekly copy of the Electronicstalk email newsletter ...

Visit the National Instruments web site

Browse by category

All suppliers A - Z

A Pro-talk Publication

A Pro-talk publication