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.
CONTENTS<br />
13 Statements 97<br />
13.1 Let Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97<br />
13.2 The Define Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99<br />
13.3 The Block Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . <strong>10</strong>0<br />
13.4 The Assignment Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . <strong>10</strong>1<br />
13.5 Conditional Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . <strong>10</strong>4<br />
13.6 For-Loop Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . <strong>10</strong>6<br />
13.7 The While-Loop Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . <strong>10</strong>9<br />
13.8 The Nondeterministic Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . <strong>10</strong>9<br />
13.9 The Call Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111<br />
13.<strong>10</strong>The Return Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114<br />
13.11Exception Handling Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115<br />
13.12The Error Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118<br />
13.13The Identity Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119<br />
13.14Start and Start List Statements (<strong>VDM</strong>++ and <strong>VDM</strong>-RT) . . . . . . . . . . . . . . . 119<br />
13.15The Specification Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121<br />
13.16The Duration Statement (<strong>VDM</strong>-RT) . . . . . . . . . . . . . . . . . . . . . . . . . 122<br />
13.17The Cycles Statement (<strong>VDM</strong>-RT) . . . . . . . . . . . . . . . . . . . . . . . . . . 123<br />
14 Top-level Specification (<strong>VDM</strong>++ and <strong>VDM</strong>-RT) 125<br />
14.1 System (<strong>VDM</strong>-RT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125<br />
14.2 Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128<br />
14.3 Inheritance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130<br />
14.4 Interface and Availability of Class Members . . . . . . . . . . . . . . . . . . . . . 132<br />
15 Synchronization Constraints (<strong>VDM</strong>++ and <strong>VDM</strong>-RT) 137<br />
15.1 Permission Predicates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138<br />
15.1.1 History guards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139<br />
15.1.2 The object state guard . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140<br />
15.1.3 Queue condition guards . . . . . . . . . . . . . . . . . . . . . . . . . . . 141<br />
15.1.4 Evaluation of Guards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142<br />
15.2 Inheritance of Synchronization Constraints . . . . . . . . . . . . . . . . . . . . . . 142<br />
15.2.1 Mutex constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142<br />
16 Threads (<strong>VDM</strong>++ and <strong>VDM</strong>-RT) 145<br />
16.1 Periodic Thread Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145<br />
16.2 Procedural Thread Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148<br />
17 Top-level Specification (<strong>VDM</strong>-SL) 151<br />
17.1 A Flat Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151<br />
17.2 A Structured Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153<br />
17.2.1 The Layout of a Module . . . . . . . . . . . . . . . . . . . . . . . . . . . 153<br />
17.2.2 The Exports Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154<br />
v