User Guides for the core project
Core Parser
See CoreParser_standalone or CoreToXml application for an example of Core
parser usage
Core Parser stand alone application
CoreParser_Standalone input_cdl_file
where:
input_cdl_file is a file that contains the core program
Core to XML translation application
CoreToXml [ -flat ] input_cdl_file
where:
-falt an optional flag
that instructs the program to flat the core program before the creation of XML
file. Currently this option is inactive.
input_cdl_file is a file that contains the core program
The result XML program will be in the
file input_cdl_file.xml
Tree 2.0 utility
In order to create the Tree one should perform the following operations:
- Include "moduletree.h" file in the file where the tree will be created.
- Tree is created by the following lines :
- CoreProgram* program;
// original core program data structure
- MainModule = FindModule(program->Modules,"SYSTEM"); // System module of
the program
- ModuleTree* Tree =
CreateModuleTree(program->Modules,MainModule->Combination,CopyModule(MainModule));
Where Tree->Node, points to the root of the tree.
Flat 2.0 utility
Flattening the entire core program
In order to flat the entire core
program write:
extern CoreProgram* CoreDataStructure;
CoreProgram* FlattenedProgram =
FlatCoreProgram(CoreDataStructure,"InputCDLFileName","XMLCDLFileName","FlattenedCDLFileName");
Flattenins sub-set of a core program
In order to flat sub-set of a core program (part of the tree) write:
- Create Tree by writing:
- extern CoreProgram* CoreDataStructure;
- ModuleTree* Tree =
CreateModuleTree(CoreDataStructure->Modules,module->Combination,CopyModule(module));
//module is the root of the sub-tree
- ModuleNode* FlatSubTree = FlatModuleTree(Tree->Node);
- FlatSubTree contains module:
- Variable and define sets of the module contain all variables define in sub-tree of the node
- Transition set is equivalent to flattened sub-tree of the node.
Core data structure to XML
See CoreToXml application as an example for this library usage.