VDM-10 Language Manual
VDM-10 Language Manual
VDM-10 Language Manual
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>VDM</strong>-<strong>10</strong> <strong>Language</strong> <strong>Manual</strong><br />
Semantics: Each system description has the following parts:<br />
• A system header with the system name.<br />
• An optional system body.<br />
• A system tail.<br />
The system name as given in the system header is the defining occurrence of the name of<br />
the class. A system name is globally visible, i.e. visible in all other classes/systems in the<br />
specification.<br />
The system name in the class header must be the same as the system name in the system tail.<br />
Furthermore, defining system names must be unique throughout the specification.<br />
The special thing about the system is that it can make use of special implicitly defined classes<br />
called CPU and BUS. It is not possible to create instances of the system, but instances made<br />
of CPU and BUS will be created at initialisation time. Note that CPU and BUS cannot be used<br />
outside the system definition.<br />
The instances of CPU and BUS must be made as instance variables and the definition must use<br />
constructors. The constructor for the CPU class takes two parameters: the first one indicate<br />
the primary scheduling policy used for the CPU whereas the second parameter provides the<br />
capacity of the CPU (indicated as Million Instructions Per Second or MIPS). The constructor<br />
for the BUS class takes three parameters. The first one indicates the kind of bus, the second<br />
one the capacity of the bus (its band width) and finally the third parameter gives a set of CPU<br />
instances connected together by the given BUS instance.<br />
The currently supported primary scheduling policies for the CPU are:<br />
: Fixed Priority<br />
: First Come First Served<br />
The currently supported primary scheduling policy for the BUS is:<br />
: First Come First Served<br />
The CPU class have member operations called deploy and setPriority. The deploy<br />
operation takes one significant parameter which must be an object that is declared as a static<br />
instance variable inside the system 1 . The semantics of the deploy operation is that execution<br />
of all functionality inside this object will take place on the CPU that it has been deployed<br />
to. The setPriority operation takes two parameters where the first must be the name<br />
of a public operation that has been deployed to the CPU and the second parameter is a<br />
natural number. The semantics of the setPriority operation is that the given operation<br />
is assigned the given priority (the second parameter). This will be used when fixed priority<br />
scheduling is used on the given CPU. Per default operations that are not explicitly assigned<br />
a priority using the setPriority operation are assigned a default priority of 1.<br />
1 It is also allowed to take a string as a second parameter for future extensions but that is ignored at the moment.<br />
126