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.

Appendix A. The Syntax of the <strong>VDM</strong> <strong>Language</strong>s<br />

In <strong>VDM</strong>-SL extended explicit function definition looks like:<br />

extended explicit function definition = identifier, [ type variable list ],<br />

parameter types,<br />

identifier type pair list,<br />

‘==’, function body,<br />

[ ‘pre’, expression ],<br />

[ ‘post’, expression ] ;<br />

In <strong>VDM</strong>++ and <strong>VDM</strong>-RT extended explicit function definition looks like:<br />

extended explicit function definition = identifier, [ type variable list ],<br />

parameter types,<br />

identifier type pair list,<br />

‘==’, function body,<br />

[ ‘pre’, expression ],<br />

[ ‘post’, expression ] ;<br />

type variable list = ‘[’, type variable identifier,<br />

{ ‘,’, type variable identifier }, ‘]’ ;<br />

identifier type pair = identifier, ‘:’, type ;<br />

parameter types = ‘(’, [ pattern type pair list ], ‘)’ ;<br />

identifier type pair list = identifier, ‘:’, type,<br />

{ ‘,’, identifier, ‘:’, type } ;<br />

pattern type pair list = pattern list, ‘:’, type,<br />

{ ‘,’, pattern list,‘:’, type } ;<br />

parameters list = parameters, { parameters } ;<br />

parameters = ‘(’, [ pattern list ], ‘)’ ;<br />

function body = expression<br />

| ‘is not yet specified’<br />

| ‘is subclass responsibility’ ‘is not yet specified’ ;<br />

179

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

Saved successfully!

Ooh no, something went wrong!