25.07.2014 Views

VDM-10 Language Manual

VDM-10 Language Manual

VDM-10 Language Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Chapter 17<br />

Top-level Specification (<strong>VDM</strong>-SL)<br />

In the previous sections all the <strong>VDM</strong>-SL constructs such as types, expressions, statements, functions<br />

and operations have been described. A number of these constructs can constitute a top-level<br />

<strong>VDM</strong>-SL specification. A top-level specification can be created in two ways:<br />

1. The specification is split into a number of modules which are specified separately, but can<br />

depend on each other.<br />

2. The specification is specified in a flat manner, i.e. no modules are used.<br />

Thus, a complete specification, or document, has the following syntax.<br />

Syntax: document = any module, { any module }<br />

| definition block, { definition block } ;<br />

any module = module ;<br />

17.1 A Flat Specification<br />

As said, a flat specification does not use modules. This means that all constructs can be used<br />

throughout the specification. In the flat case, a document has a syntax of:<br />

document = . . .<br />

| definition block, { definition block } ;<br />

definition block = type definitions<br />

| state definition<br />

| value definitions<br />

| function definitions<br />

| operation definitions ;<br />

151

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

Saved successfully!

Ooh no, something went wrong!