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.

Chapter 3. Data Type Definitions<br />

✡✝<br />

drawn : nat<br />

lost : nat<br />

points : nat<br />

inv sc == sc.points = 3 * sc.won + sc.drawn;<br />

✆<br />

The invariant function implicitly created for this type is:<br />

✞<br />

✡✝<br />

inv_Score : Score +> bool<br />

inv_Score (sc) ==<br />

sc.points = 3 * sc.won + sc.drawn;<br />

✆<br />

31

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

Saved successfully!

Ooh no, something went wrong!