ISO VDM-SL Example
This test directory demonstrates the use of the VDM-SL ISO
ASCII syntax for type definitions
This test directory demonstrates the use of the VDM-SL ISO
ASCII syntax for type (Domain- ) definition.
The new ISO VDM-SL ASCII syntax extensions contain:
- Domain names may consist of arbitrary combinations of
upper and lower case character containing at least one
lower case char (to distinguish from TOKEN element).
- The ASCII form of the type constructors are available:
seq of
, map _ to _
, compose _ of _ end
- The keywords
Types
and Implementations
are allowed for
DOMAINS
and IMPLEMENTATIONS
.
- Selector names no longer have to start with
s_
.
In this case, the selector functions are taken unchanged
while (for union types) the discriminants will be built
by adding the d_
prefix (which might lead to d_s_
).
- Type definitions may be separated by
;
.
- Since domain idfs and implementation names are the same
now, the domain equation
Domain =
can no longer be supported and must be written as
Domain = () -
(This applies even without
-N
option!)
- predefined domains for numbers can be written in lower case:
bool nat1 nat int rat real char
These extensions are activated through the -N
option which
also defines the flag GEN_ISO
for the database.
The Sources