Are You Using More Than One Software Analysis Tool?

June 11, 2009
Actually, a better question for many embedded developers is whether they’re using even one code analysis tool. In many cases, the number of static or dynamic analysis tools used by a programmer is zero. At the same time, the goal that se

Actually, a better question for many embedded developers is whether they’re using even one code analysis tool. In many cases, the number of static or dynamic analysis tools used by a programmer is zero. At the same time, the goal that seems to be on top of everyone’s list is getting bug-free software done on time. Unfortunately, this can be a challenge when you aren’t using these tools.

Most developers know that finding and fixing bugs early is less costly by orders of magnitude as code moves progressively away from its creator. The cost in time and money of fixing a bug found only a week later is significantly higher than one found the same day that the code was written or modified. The cost gets progressively higher as it moves through Q&A and out into the field. In many cases, especially for embedded devices, the cost of fixing deployed products isn’t even considered unless liability concerns mandate a fix.

Still, getting programmers and managers to utilize static and dynamic analysis tools is a challenge. I ran into a similar problem almost 20 years ago working at NuMega Technologies on a tool called BoundsChecker. It is now part of Compuware’s DevPartner for Visual C++ Bounds- Checker, but it started as a tool to check the parameters passed to the Windows operating system.

Even then, Windows had a massive number of interfaces associated with it, and there was little error checking on the operating-system side. Passing a negative number where a pointer was required could often result in a system crash, so it pays to pass parameters that are expected. Unfortunately, you run into an array of myths while selling a tool like BoundsChecker, from “I don’t make those kinds of mistakes” to “It generates false positives.”

These myths persist today even though the tools are more robust and varied. In fact, those in the know often use more than one tool, and analysis tool suites frequently include a range of static and dynamic analysis tools (see “The Latest Static And Dynamic Code Analysis Tools”).

Part of the issue is understanding what each tool does and how it works. These tools typically check hundreds or thousands of cases and conditions. The goal is the same bug-free code. Unfortunately, this means finding or preventing bugs. Many designers miss this distinction.

That’s why tools like LDRA Software Technology’s TBvision may provide recommendations as in this case with MISRA C++, an automotive coding standard (see the figure). But MISRA C/C++ is just the tip of the iceberg. Other static analysis tools, including TBvision, can identify errors statically in addition to handling coding standards.

The kinds of errors found by static or dynamic analysis by different tools sometimes overlaps, but often they address different areas. This is why using more than one tool can be more helpful. Of course, using one to start with is a good first step.

LDRA SOFTWARE TECHNOLOGYwww.ldra.com

Sponsored Recommendations

What are the Important Considerations when Assessing Cobot Safety?

April 16, 2024
A review of the requirements of ISO/TS 15066 and how they fit in with ISO 10218-1 and 10218-2 a consideration the complexities of collaboration.

Wire & Cable Cutting Digi-Spool® Service

April 16, 2024
Explore DigiKey’s Digi-Spool® professional cutting service for efficient and precise wire and cable management. Custom-cut to your exact specifications for a variety of cable ...

DigiKey Factory Tomorrow Season 3: Sustainable Manufacturing

April 16, 2024
Industry 4.0 is helping manufacturers develop and integrate technologies such as AI, edge computing and connectivity for the factories of tomorrow. Learn more at DigiKey today...

Connectivity – The Backbone of Sustainable Automation

April 16, 2024
Advanced interfaces for signals, data, and electrical power are essential. They help save resources and costs when networking production equipment.

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!