While investigating the sphere of static analysis and working on the creation of the Viva64 tool our team came to a conclusion that the most part of the developed structures and algorithms can be united into a library and used by third-party developers for creating new software products. This library has been named VivaCore.
Viva64 tool became a part of PVS-Studio product and is no longer distributed separately. All the abilities of searching for specific errors related to developing 64-bit applications, as well as porting code from 32-bit to 64-bit platform are now available within PVS-Studio analyzer.
VivaCore is designed for the development of systems in the sphere of static analysis, testing and verification of the C/C++ code [2, 3, 4, and 5]. Since C++ language is one of the most difficult for analysis, the creation of a tool to work with it often takes a lot of time for developing the mechanism of working with the code. VivaCore library allows speeding up this part of the project and gives developers an opportunity to concentrate on the creation of the tool itself and not on implementation of the code analysis algorithms.
In other words VivaCore library is meant to save time while developing software systems for processing source program texts.
The library may be of interest for organizations which create or are planning to create tools for working with source code. Let's briefly enumerate the tools which can be created on the basis of the VivaCore library:
VivaCore is a library for analyzing C/C++ code which allows performing analysis both of separate language constructions and entire source code files. The functional diagram of the library is shown on the picture on the right. The library gives an opportunity to perform special preprocessing of the source files, split the program text into tokens, build an abstract syntax tree and provide navigation through it. The library has a mechanism of metaprogram processing which allows you to write your own C/C++ extension and then translate the metaconstructions into the C/C++ constructions. The VivaCore library can save various information in XML format or any other one on different steps of the source code processing and in the end of the work.
Picture 1 - VivaCore Components.
VivaCore is a result of developing and extending the OpenC++ open source library . Although OpenC++ is not a full parser and doesn't support the present-day C++ standard, a number of interesting tools was created on the basis of this library. For example: the OpenTS execution environment for the T++ programming language (the product of Program Systems Institute of Russian Academy of Sciences, PSI RAS), the Synopsis tool for preparation of documentation on the source code , the Viva64 static analyzer . Since OpenC++ is not developed now, VivaCore may be named its "successor".
One shouldn't mix up VivaCore and professional multifunctional parsers of C/C++ code. If a user needs a front-end code parser which fully supports the present-day standard and allows creating his own compiler for a specific platform, he should pay attention to GCC or expensive commercial solutions. For example, such solutions are offered by Semantic .
But if a company develops a tool which requires classical analysis of C/C++ code, the rational solution is to use a convenient specialized code library, and VivaCore is such a library.
I develop the PVS-Studio static code analyzer intended for analyzing C/C++ software. After we implemented general analysis in PVS-Studio 4.00, we received a lot of responses, both positive and negative. By the way, you are welcome to download a new version of PVS-Studio where we have fixed a lot of errors and defects thanks to users who told us about ...