C++ analysis tools
I am investigating a number of tools to analyze (or at least parse) C++ code. I put the ones I found here. This is not meant to be exclusive, but if you have a tool you'd like to add, send a mail to roel.wuyts@ulb.ac.be
Commercial Tools
- CodeBoost (http://www.codeboost.org/) CodeBoost is a tool for source-to-source transformation and optimisation of C++ programs. It is intended to be used as a test-bed for various high-level optimisations; the traditional textbook optimisations are assumed to be handled by the C++ compiler. The CodeBoost optimiser will attempt to bridge the gap between a human-friendly coding style and current compiler/optimiser implementations. Although CodeBoost was created mainly for use with the Sophus numerical library, the transformation framework may be useful for other projects as well.
- SD's C++ Front-end (http://www.semanticdesigns.com/Products/FrontEnds/CppFrontEnd.html). Semantic Designs offers predefined language front ends ("domains") to enable the construction of custom compilers, analysis tools, or source transformation tools, based on first-class infrastructure (DMS) for implementing those custom tools. One of these is the C++ front-end. The C++ parser (front end) enables the construction of C++ custom compilers, analysis tools, or source transformation tools. It has been used in a number of tools (Preprocessor conditional simplification, Source Formatter, obfuscator, Source Code Browser, Test Coverage, Profiler, Duplicate Code Detection and removal, Component Restructuring tool).
- EDG (http://www.edg.com/) Edison Design Group provides technology that parses computer programming languages. Our products read source code and generate information that fully describes the structure and meaning of the code. You start from that information and add your own software to create a compiler, a source analysis tool, a chip-design application, ... The front end translates source programs into a high-level, tree-structured, in-memory intermediate language. The intermediate language preserves a great deal of source information (e.g., line numbers, column numbers, original types, original names), which is helpful in generating symbolic debugging information as well as in source analysis and transformation applications. Implicit and overloaded operations in the source program are made explicit in the intermediate language, but constructs are not otherwise added, removed, or reordered. The intermediate language is not machine dependent (e.g., it does not specify registers or dictate the layout of stack frames). The front end can optionally generate raw cross-reference information, which can be used as a basis for building source browsing tools.
- iPlasma (http://loose.upt.ro/iplasma/index.html) To make software maintenance easier, a superior quality of its design and implementation process must be ensured. For this reason, existing software must be supported by automated systems for analysis, diagnose and design improvement, at a high level as well as at a level close to source code. iPlasma is an integrated environment for quality analysis of objectoriented software systems that includes support for all the necessary phases of analysis: from model extraction (including scalable parsing for C++ and Java) up to high-level metricsbased analysis, or detection of code duplication. iPlasma has three major advantages: extensibility of supported analysis, integration with further analysis tools and scalability, as it was used in the past to analyze large-scale projects in the size of millions of code lines (e.g. Eclipse and Mozilla).
- Imagix (http://www.imagix.com/)Reverse engineering, quality metrics and software documentation tools from Imagix help software developers significantly improve their productivity as they work with complex or legacy software. Our solution for C and C++ developers, Imagix 4D, helps you reverse engineer software that is large, complex, unfamiliar or old, by automating the analysis and browsing of your code. You're able to achieve faster, more accurate program understanding, resulting in fewer software defects while requiring less investment of precious engineering resources. The software metrics and quality checks of Imagix 4D enable you to identify potential problems during the development and maintenance of your software. By identifying and correcting the problem areas, you can improve the clarity, portability and maintainability of your software. We also automate the documentation of existing software. Again, you're able to realize considerable labor savings, at the same time ending up with software documentation which is consistently accurate, current, and informative.
- Source Insight (http://sourceinsight.com/) is a revolutionary project oriented program code editor and code browser, with built-in analysis for C/C++, C#, and Java programs, as well as other languages. Source Insight parses your source code and maintains its own database of symbolic information dynamically while you work, and presents useful contextual information to you automatically. Not only is Source Insight a great program editor, but it also can display reference trees, class inheritance diagrams, and call trees. Source Insight features the quickest navigation of source code and source information of any programming editor.
- Columbus (http://www.frontendart.com/products_col.php) Columbus is a reverse engineering framework application that provides an environment which enables the parsing, analyzing, internal representation, filtering and exporting of information extracted from C/C++ source files into various formats including XML.
- SourceAudit (http://www.frontendart.com/products_sa.php) Consistent, maintainable and robust code is crucial to ensure the quality of a software product. The cost of code validation during development and maintenance can be significantly reduced by adhering to coding standards and avoiding dangerous coding constructs during implementation. SourceAudit lets you take control of managing coding standards in your team. It also helps finding code with the possible sources of future run-time failures. SourceAudit automatically detects violations of a set of coding rules. Builds on Columbus (it is from the same vendor, after all).
- CodeSonar (http://www.grammatech.com/products/codesonar/overview.html). CodeSonar™ performs a deep static analysis on C/C++ code and identifies a variety of serious bugs. These include null-pointer dereferences, divides-by-zero, and buffer overruns. CodeSonar does a whole-program interprocedural analysis, taking into account effects arising from the interaction of different functions in different files. It uses symbolic evaluation, and can be customized by writing C code using the API that will be included in the analysis.
- CodeSurfer (http://www.grammatech.com/products/codesurfer/overview.html) A code browser that understands pointers, indirect function calls, and whole-program effects. From the same vendor as CodeSonar.
- Understand for C++ (http://scitools.com/products/understand/cpp/product.php) Understand for C++ is a reverse engineering, documentation and metrics tool for C and C++ source code. It offers code navigation using a detailed cross reference, a syntax colorizing "smart" editor, and a variety of graphical reverse engineering views.
- CC-Rider (http://www.westernwares.com/) Code Visualization provides the C/C++ programmer, documentation personnel and managers the ability to see the underlying structure of the program. The two core visualization component of CC-RIDER are: Visual Browser and Documentation Generator.
- AntiCutAndPaste (http://www.anticutandpaste.com/)AntiCutAndPaste is designed to search for text fragments that have been copied and pasted in programming language source code or plain text. It is tested on sources from large C++, Visual Basic, Delphi, Java, and C# projects.
Opensource, Free or Research Tools
- GDA Toolkit (http://www-sop.inria.fr/mimosa/Olivier.Tardieu/software.html) : GDA is a tool for scalable analysis of C code. Built into this distribution of GDA is an implementation of Andersen's aliasing analysis using sub-transitive graphs, as well as a dependence analysis for tracking dependencies between variables, fields etc.
- Tom (http://tom.loria.fr/) : Tom is a pattern matching compiler developed at INRIA. It is particularly well-suited for programming various transformations on trees/terms and XML based documents. Its design follows our research on the efficient compilation of rule based languages (e.g. ELAN, developed at INRIA-Loria). Tom is a complex compiler which adds powerful constructs to C and Java: non linear syntactic matching, associative matching with neutral element (a.k.a. list-matching), XML based pattern matching, string matching, and equational rewriting. This offers the possibility to analyze and transform any kind of data-structure. Tom can be used for large scale developments and applications. It comes with documentation, programming, and debugging support.
- GEN++ (http://www.cs.ucdavis.edu/~devanbu/genp/) C++ Analysis-- without the Pain. GEN++ is an application-generator that greatly simplifies the task of creating analysis tools for the C++ language. Analysis tools are specified in a high-level domain-specific language (DSL) that is designed to facilitate the task of specifying C++ analysis tools.
- Orion (http://cm.bell-labs.com/cm/cs/what/orion/) Orion is a tool that analyzes C and C++ source code for common programming errors. Because it performs static (i.e. compile-time) analysis, it cannot be completely accurate. The messages it produces indicate potential errors - in other words, it will sometimes produce false alarms. The development of Orion is aimed at achieving a high accuracy.
- ANTLR (http://www.antlr.org/) : ANTLR, ANother Tool for Language Recognition, (formerly PCCTS) is a language tool that provides a framework for constructing recognizers, compilers, and translators from grammatical descriptions containing Java, C#, C++, or Python actions. ANTLR provides excellent support for tree construction, tree walking, and translation.
- Engineering of Grammarware (http://www.cs.vu.nl/grammarware/): Grammarware comprises grammars and all software artifacts that directly depend on grammars. The term grammar is meant here in the widest sense to include XML schemas, syntax definitions, interface descriptions, APIs, and protocols. Tools written in this context are the Grammar Recovery Kit and the Grammar Deployment Kit.
- Doxygen(http://www.stack.nl/~dimitri/doxygen/index.html) Doxygen is a documentation system for C++, C, Java, Objective-C, Python, IDL (Corba and Microsoft flavors) and to some extent PHP, C#, and D. It can help you in three ways:
- It can generate an on-line documentation browser (in HTML) and/or an off-line reference manual (in Latex) from a set of documented source files. There is also support for generating output in RTF (MS-Word), PostScript, hyperlinked PDF, compressed HTML, and Unix man pages. The documentation is extracted directly from the sources, which makes it much easier to keep the documentation consistent with the source code.
- You can configure doxygen to extract the code structure from undocumented source files. This is very useful to quickly find your way in large source distributions. You can also visualize the relations between the various elements by means of include dependency graphs, inheritance diagrams, and collaboration diagrams, which are all generated automatically.
- You can even `abuse' doxygen for creating normal documentation.
- CIL (http://manju.cs.berkeley.edu/cil/): Infrastructure for C Program Analysis and Transformation. CIL (C Intermediate Language) is a high-level representation along with a set of tools that permit easy analysis and source-to-source transformation of C programs.
Not directly for C++
- Aisee (http://www.aisee.com/welcome.htm) aiSee reads a textual, easy-to-read and easy-to-learn graph specification and automatically calculates a customizable graph layout. This layout is then displayed, and can be interactively explored, printed and exported to various graphic formats. aiSee has been optimized to handle huge graphs automatically generated by applications. It is available for Windows, Linux, Solaris, and Mac OS X.
Other Catalogs