20.01.2015 Views

The TASM Language Reference Manual Version 1.1 - Synrc

The TASM Language Reference Manual Version 1.1 - Synrc

The TASM Language Reference Manual Version 1.1 - Synrc

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

epresentation. For example, the XML can be easily converted to HTML documentation<br />

with an appropriate XSL stylesheet. Furthermore, the UPPAAL model checker<br />

uses an XML format as its storage format; it might be possible to convert a <strong>TASM</strong><br />

system into a UPPAAL model using XSL transformation. Having an XML format can<br />

enable interoperability with outside tools through XSL transformation. <strong>The</strong> plain-text<br />

syntax presented in section 3.2 could be used as an interoperability format because its<br />

format is published; however, XML is now recognized as the standard for information<br />

exchange between anonymous entities. This section describes the format of the XML<br />

that is used for exporting a specification written in the <strong>TASM</strong> language. <strong>The</strong> resulting<br />

file is a complete <strong>TASM</strong> specification.<br />

<strong>The</strong> parent-child-attribute relationships of the XML syntax are described graphically<br />

using XML syntax trees. <strong>The</strong> nodes of the tree can be of three types – element<br />

nodes, attribute nodes, and text nodes. <strong>The</strong> graphical representation of each type of<br />

node is depicted in Figure 3.1. One-to-many relation from parent to child nodes are<br />

illustrated using the * character along the tree edge to denote ”zero or more”, and the +<br />

character along the tree edge is used to denote ”one or more”. <strong>The</strong> complete XML syntax<br />

is described successively, starting with the top-level tree nodes and expanding each<br />

top-level node subsequently. <strong>The</strong> meaning of each node and associated tag is listed<br />

in a table corresponding to each syntax tree. <strong>The</strong> mapping between the XML syntax,<br />

the plain-text syntax and the logical objects and concepts (from chapter 2 should be<br />

straightforward unless otherwise noted.<br />

Element<br />

Attribute<br />

Text<br />

Figure 3.1: Tree Nodes for XML Syntax Tree<br />

<strong>The</strong> top-level of the XML syntax contains four main sections corresponding to the<br />

four main logical objects listed in section 2.7. <strong>The</strong> syntax tree corresponding to the<br />

top-level node is depicted in figure 3.2. <strong>The</strong> list of XML tags and attributes is listed in<br />

Table reftablexmltags. <strong>The</strong> tasm node is the top-level node of the document and contains<br />

the version of the <strong>TASM</strong> syntax that is used. <strong>The</strong> syntax will most likely evolve as<br />

the language matures so the version number will be used to ensure backward compatibility.<br />

<strong>The</strong> sys node represents the ”<strong>TASM</strong> system”, that is, the list of configurations<br />

that can be used for simulation. <strong>The</strong> env node represents the ”<strong>TASM</strong> environment”,<br />

that is, the list of global variables and the list of user-defined types. <strong>The</strong> tmpls node<br />

represents the list of ”<strong>TASM</strong> templates”, that is, the list of machine definitions (main<br />

48

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!