CA Library Implementation

Revision as of 02:56, 6 March 2014 by Stefan (Talk | contribs) (intermediate initial version)

<< 6. Adding New Rules |


The code for Code Analysis is located at three different places in the EVE source:

  1. The framework—the by far largest part, with the rule checking, the rules, the control flow graph functionality, and more—is represented as a library;
  2. The graphical user interface can be found in the interface cluster of EVE;
  3. The command-line interface for code analysis is a single class in the tty cluster of EVE.

code_analysis library

The whole code analysis framework is located in the library code_analysis.

Interface

In this section it is explained from a client view how to use the code analyzer. The code analyzer is represented by the class CA_CODE_ANALYZER, so a client must have or access an instance of this class. Before the analyzer can be launched all the classes that shall be analyzed must be added using one of the following features. If you use more than one of these commands then the added classes from all commands will be conjoined.

{CA_CODE_ANALYZER}.add_whole_system 
Adds all the classes that are part of the current system. Classes of referenced libraries will not be added. So, for example, if your system consists of the classes MY_MAIN, MY_BOX, and MY_ITEM then these three classes will be added to the list of classes to be analyzed.
.add_class (a_class: attached CONF_CLASS) 
Adds a single class.
.add_classes (a_classes: attached ITERABLE [attached CONF_CLASS]) 
Adds a list of classes.

Rule checking

Graphical User Interface

Command-line Interface