VDM-10 Language Manual
VDM-10 Language Manual
VDM-10 Language Manual
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>VDM</strong>-<strong>10</strong> <strong>Language</strong> <strong>Manual</strong><br />
✞<br />
✡✝<br />
public logEnvToSys: nat ==> ()<br />
logEnvToSys (pev) == e2s := e2s munion {pev |-> time};<br />
✆<br />
6.24 Literals and Names<br />
Syntax: expression = . . .<br />
| name<br />
| old name<br />
| symbolic literal<br />
| . . . ;<br />
name = identifier, [ ‘‘’, identifier ] ;<br />
name list = name, { ‘,’, name } ;<br />
old name = identifier, ‘˜’ ;<br />
Semantics: Names and old names are used to access definitions of functions, operations, values<br />
and state components. A name has the form:<br />
✞<br />
✡✝<br />
id1‘id2<br />
where id1 and id2 are simple identifiers. If a name consists of only one identifier, the<br />
identifier is defined within scope, i.e. it is defined either locally as a pattern identifier or<br />
variable, or globally within the current module as a function, operation, value or global<br />
variable. Otherwise, the identifier id1 indicates the module/class name where the construct<br />
is defined (see also section 17 and section 14.2 and appendix B.)<br />
An old name is used to access the old value of global variables in the post condition of an<br />
operation definition (see section 12) and in the post condition of specification statements (see<br />
section 13.15). It has the form:<br />
✞<br />
✡✝<br />
id˜<br />
where id is a state component.<br />
Symbolic literals are constant values of some basic type.<br />
Examples: Names and symbolic literals are used throughout all examples in this document (see<br />
appendix B.2).<br />
For an example of the use of old names, consider the <strong>VDM</strong>-SL state defined as:<br />
68<br />
✆<br />
✆