Using VectorCAST/Lint for Static Source Code Analysis
When developing applications for complex safety critical embedded systems such as avionics, medical devices, and automotive, thorough software testing and analysis are crucial for ensuring safety and reliability.
VectorCAST/Lint is a static source code analyzer that performs module based or whole-program source code analysis on C and C++ codebases and automatically identifies problems at their source, prior to compilation. VectorCAST/Lint static analysis helps developers find programming errors and other defects earlier in the software development cycle, prior to any formal testing, thereby reducing the cost, time, and risk associated with developing safety and mission critical embedded applications. Errors involving data initialization, type mismatch and intermodule inconsistencies can be very time consuming to find during code execution as they often result in a segmentation violation or other “crash”. VectorCAST/Lint identifies those errors before the code is compiled, thus speeding up the testing phase of your project.
VectorCAST/Lint utilizes the powerful Lint source code analysis engine from Gimpel Software and has been extended to support the extensive list of embedded compiler environments currently integrated with the VectorCAST dynamic testing product line.
Out-of-the-box, VectorCAST/Lint is configured for checking the MISRA C, MISRA C 2004, and MISRA C++ 2008 standards. These standards recommend the use of a restricted subset of constructs for the C and C++ languages, with the goal being a safer and more maintainable use of the language. Areas of code that are non-conforming to the standard's built-in-rules are highlighted in code analysis reports. The MISRA checking features in VectorCAST/Lint include the detection of recursion, support for the MISRA 2 'underlying type' concept, determination of side effects for functions, and MISRA C++ support.
Ensuring Reliable Embedded Software by Combining Static Analysis with Dynamic Testing to Verify Code
VectorCAST/Lint is the perfect complement to the dynamic embedded software testing tools in the VectorCAST suite. While VectorCAST/Lint will look across your entire C or C++ program and find bugs, inconsistencies, and redundancies prior to compiling the source code, dynamic testing, such as unit and integration testing, code coverage, and regression test management, focuses on executing the source code on your embedded hardware to assess code correctness through pass/fail analysis of test cases.
Since the dynamic tools have no dependence on the static analysis for information to construct executable test harnesses, this alleviates the need to run the static analysis every time a change is made to a file when doing unit, integration, and regression testing. By combining static source code analysis and dynamic testing, organizations developing C and C++ embedded applications can increase the speed and accuracy of detecting defects, shorten the Verification and Validation process, and ensure higher quality software.