To get a trial key
fill out the form below
Team License (a basic version)
Enterprise License (extended version)
* By clicking this button you agree to our Privacy Policy statement

Request our prices
New License
License Renewal
--Select currency--
USD
EUR
GBP
RUB
* By clicking this button you agree to our Privacy Policy statement

Free PVS-Studio license for Microsoft MVP specialists
* By clicking this button you agree to our Privacy Policy statement

To get the licence for your open-source project, please fill out this form
* By clicking this button you agree to our Privacy Policy statement

I am interested to try it on the platforms:
* By clicking this button you agree to our Privacy Policy statement

Message submitted.

Your message has been sent. We will email you at


If you haven't received our response, please do the following:
check your Spam/Junk folder and click the "Not Spam" button for our message.
This way, you won't miss messages from our team in the future.

>
>
VivaCore - Quick Start

VivaCore - Quick Start

Apr 20 2008

The document familiarizes developers with VivaCore library giving general information about the library, the scope of use, license agreements. It describes also the process of the library's deployment and an example of how to use it.

General information

VivaCore is an open library to work with C/C++ code. VivaCore is built on the basis of OpenC++ library (OpenCxx). It is intended for realizing refactoring systems, systems of static and dynamic analysis, systems of code transformation and optimization, language extensions, subsystems of syntax highlight, systems of building documentation on the code and other similar tools on its basis. To learn more about scopes of use of VivaCore library and its working principles see article "The essence of the VivaCore code analysis library ".

License

VivaCore library is developed by Program Verification Systems company.

The license on VivaCore library allows you to use, copy, distribute and modify it in binary form or as the original code both for commercial and non-commercial use without any payments to the authors of the library. You should only list the authors of the original libraries (OpenC++ and VivaCore).

The main differences between VivaCore and OpenC++

VivaCore library is the result of developed OpenC++ (OpenCxx) library (OpenCxx) and has the following advantages over it:

The library is the complete project that may be easily built in Visual Studio 2005/2008 environment both in 32-bit and 64-bit versions. No additional settings are required to build the project.

VivaCore library is adapted to Microsoft Visual C++ compiler from the viewpoint of specificity of its syntax and set of key words.

Classic C language is supported, not only C++.

Calculation of literal constants' values is realized.

A lot of errors and defects of the basic OpenC++ library are corrected.

Mechanism of initial preprocessing of the original text is created which allows you to realize some specific code modifications.

Mechanism of skipping the parse of the code of functions which are not of interest for the analysis is created.

Deployment of VivaCore

You may download VivaCore library in two versions. Besides VivaCore the full version contains Boost library with already built *.lib files. The shortened version contains only original VivaCore library's files.

In case you downloaded the full VivaCore library's distribution kit, immediately after the archive is unpacked you will get the project you may build and examine. No other actions are required.

If you downloaded the shortened version of VivaCore or would like to use more recent version of Boost, library you'll have to change some settings of the project. Firstly, you'll have to point the path to header files of boost library (Configuration Properties -> C/C++ -> General -> Additional Include Directories) in the project's settings. Secondly, you'll have to point the path to compiled lib files (Configuration Properties -> Linker -> General -> Additional Library Directories). It is the shortened version that we advise you to use, i.e. without Boost, because in this case you can always build Boost according to the configuration you need.

First steps

VivaCore library's project is also an example demonstrating how to use it. That's why VivaCore contains 3 additional files: PreprocessorRulesTableDemo.h, VivaCoreDemo.cpp, VivaWalkerDemo.h.

In these files the simplest code analyzer is realized that carries the following operations:

Reads "VivaCoreDemo.i" file.

Carries its preprocessing according to the rules stated in PreprocessorRulesTableDemo.h file.

Splits the program text into lexemes.

Builds the parse tree.

Traverses the parse tree using VivaWalker class described in VivaWalkerDemo.h file. As an example, three functions of processing the tree knots which indicate what is being processed at the moment are realized in this class. See functions: TranslateAssign, TranslateVariable, TranslateSizeof.

Conclusion

We understand that you may have a lot of questions concerning the use and the mechanism of VivaCore library. But good news is that our team is always ready to communicate and we would be glad to discuss appearing questions and give you recommendations on the use of VivaCore. Write us!

Popular related articles
Static analysis as part of the development process in Unreal Engine

Date: Jun 27 2017

Author: Andrey Karpov

Unreal Engine continues to develop as new code is added and previously written code is changed. What is the inevitable consequence of ongoing development in a project? The emergence of new bugs in th…
The way static analyzers fight against false positives, and why they do it

Date: Mar 20 2017

Author: Andrey Karpov

In my previous article I wrote that I don't like the approach of evaluating the efficiency of static analyzers with the help of synthetic tests. In that article, I give the example of a code fragment…
Appreciate Static Code Analysis!

Date: Oct 16 2017

Author: Andrey Karpov

I am really astonished by the capabilities of static code analysis even though I am one of the developers of PVS-Studio analyzer myself. The tool surprised me the other day as it turned out to be sma…
The Ultimate Question of Programming, Refactoring, and Everything

Date: Apr 14 2016

Author: Andrey Karpov

Yes, you've guessed correctly - the answer is "42". In this article you will find 42 recommendations about coding in C++ that can help a programmer avoid a lot of errors, save time and effort. The au…
PVS-Studio ROI

Date: Jan 30 2019

Author: Andrey Karpov

Occasionally, we're asked a question, what monetary value the company will receive from using PVS-Studio. We decided to draw up a response in the form of an article and provide tables, which will sho…
PVS-Studio for Java

Date: Jan 17 2019

Author: Andrey Karpov

In the seventh version of the PVS-Studio static analyzer, we added support of the Java language. It's time for a brief story of how we've started making support of the Java language, how far we've co…
Free PVS-Studio for those who develops open source projects

Date: Dec 22 2018

Author: Andrey Karpov

On the New 2019 year's eve, a PVS-Studio team decided to make a nice gift for all contributors of open-source projects hosted on GitHub, GitLab or Bitbucket. They are given free usage of PVS-Studio s…
How PVS-Studio Proved to Be More Attentive Than Three and a Half Programmers

Date: Oct 22 2018

Author: Andrey Karpov

Just like other static analyzers, PVS-Studio often produces false positives. What you are about to read is a short story where I'll tell you how PVS-Studio proved, just one more time, to be more atte…
Characteristics of PVS-Studio Analyzer by the Example of EFL Core Libraries, 10-15% of False Positives

Date: Jul 31 2017

Author: Andrey Karpov

After I wrote quite a big article about the analysis of the Tizen OS code, I received a large number of questions concerning the percentage of false positives and the density of errors (how many erro…
The Last Line Effect

Date: May 31 2014

Author: Andrey Karpov

I have studied many errors caused by the use of the Copy-Paste method, and can assure you that programmers most often tend to make mistakes in the last fragment of a homogeneous code block. I have ne…

Comments (0)

Next comments
This website uses cookies and other technology to provide you a more personalized experience. By continuing the view of our web-pages you accept the terms of using these files. If you don't want your personal data to be processed, please, leave this site.
Learn More →
Accept