GrammaTech CodeSonar™ is a sophisticated source code analysis tool that performs a whole-program, interprocedural analysis on C/C++ code and identifies complex programming bugs that can result in system crashes, memory corruption, and other serious problems. CodeSonar pinpoints problems at compile time that can take weeks to identify with traditional testing.
- Detect and eliminate bugs early in the development cycle, when problems are easier and less expensive to fix.
- Avoid having to debug defects that can be pinpointed quickly and simply with automated analysis.
- Catch problems that test suites miss.
Using CodeSonar
Like a compiler, CodeSonar does a build of your code, but instead of creating object code it creates an abstract representation of the program. After the individual files are built, a synthesis phase combines the results into a whole-program model. The model is symbolically executed and the analysis keeps track of variables and how they are related. Warnings are generated when anomalies are encountered. CodeSonar does not need test cases and works with the existing build system.
The results of an analysis are fed to a relational database, and a web-based interface provides a range of customizable views of the information in the database, including warnings issued by CodeSonar, source code, and information about projects and analyses. Analysis, database, and web components can be distributed across multiple machines.
See the following sections for details about how CodeSonar works and what it does.
System Requirements
CodeSonar supports the following platforms and environments.
Supported Compilers
- ARM developer suite
- GCC and G++
- Green Hills C compiler
- Hi-Tech C compiler
- Intel C/C++ compiler
- MS Visual Studio
- Renesas C/C++ compiler for H8S, H8/300 Series, and the SuperH RISC engine family
- Sun cc
- Ti CodeComposer C compiler
- Wind River C and C++ compilers
- Many other cross compilers
- New compilers easily supported
Supported Platforms
- Windows 2000, Windows XP, or Windows 2003 (32-bit versions only)
- Linux running glibc 2.3.2 or later
- Solaris(SPARC) 2.8 or later
- Solaris(x86 and x86-64) 2.10 or later
- OS X (x86 and x86-64) 10.4 or later
Supported Languages
- C (full support)
- C++ (full support)
- Ada (beta support)
CPU and Disk Requirements
- For building and analyzing a project in CodeSonar:
- 2 GHz for Intel processors.
- 2 GB of physical memory.
- About 15 GB of free disk space per million lines of code analyzed.
- Use local disks rather than network drives.
- For running a CodeSonar hub:
- 1 GB of memory
- about 200MB of disk per million lines of code per analysis. Note that disk requirements depend on a number of factors, including lines of code, number of source files, number of errors encountered by the compiler, and number of warnings issued.