The Common Representation is the definition of a syntax tree in the SITE project. We use the software Kimwitu for that definition. A parser maps a concrete syntax, e.g. SDL/PR to SITE-CR. which is called the CR of the specification, too. From the considered context it should be unique how the concept CR is used, as definition or an instance of the CR. The definition of the map from the concrete syntax to CR is only given by the yacc rules of the parser.
Because the CR is the interchange format for SDL specifications between all SITE tools, it is important to keep the definition of the CR stable or at least backward compatible for a long time.
All tool sources have files with the extension .kc (e.g. osdl.kc and data_type.kc). These files contain the definition of the syntax nodes (phyla). Historically, for SDL-96 these definitions are separated in structure and behavior components as well as the data part including expressions. With SDL-2000 there is only a separation for different languages (IDL, ASN.1,...).
The defining syntax is similar to the phylum definition of Kimwitu, enhanced by macros for the C-preprocessor:
<phylum> UNIQ_<phylum>:
Constructor1(arg11 ... arg1m)
| Constructor2(arg21 ... arg2n)
| ...
<PHYLUM>;
The names UNIQ_<phylum> and <PHYLUM> are empty macros without user intervention, i.e. the definition is without storage and user attributes.
SITE-tools can expand the CR with new phyla and new constructors for already defined phyla. To do that, there should be a file, often called cr_extensions.kc, which provides the new definitions with the same style like in the CR definition. Note, these extensions cannot be understand by other SITE tools if the tree is stored.
Each macro name can be defined by the user, i.e single phyla can be assigned the uniq storage attribute or even user defined attributes. There are generic approaches, too, e.g. a parent link for all nodes in the syntax tree. These names are provided by the developer in files like cr_<tool>.kh. The standard definition of the names is generated by scripts.
The CR version of our SDL-96 tools is 3.5, SDL-2000 starts with 4.
Kimwitu provides functions to (re)store any phyla from/to a file. Because of the different CR versions each file contains a special SITE header with CR version and the type of the root phylum, normally sdl_specification. The CR files are ASCII, about three times the size of the SDL/PR file and can be transmitted via e-mail without problems.
Because the CR is a syntax tree, comments, spaces and special word formatting is not stored in a CR file, i.e. format information is normally lost. With an additional attribute for all phyla these information can be stored. The development of a technical good format of these additional information was finished with CR version 3.4.
A back interpretation can be done by a PrettyPrinter sdl-pretty, which produces the output formats ASCII, HTML, PostScript and LaTeX conform to Z.100 or Z.105. With the format information of CR version 3.4 a complete restauration of the SDL specification is possible.
There are two graphic explorer components (Python technology), with which in the CR definition or a concrete CR instance can be comfortably navigated. This navigation can also be merged to test purposes (call from gdb) into the SITE tools. Sources are provided on request (with it Phyton was learned!), only suitably for Kimwitu and Phyton experts.