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.

<strong>VDM</strong>-<strong>10</strong> <strong>Language</strong> <strong>Manual</strong><br />

A.6.1<br />

Type Definitions<br />

| operation definitions<br />

| instance variable definitions<br />

| synchronization definitions<br />

| thread definitions<br />

| traces definitions ;<br />

type definitions = ‘types’, [ access type definition ] ,<br />

{ ‘;’, access type definition }, [ ‘;’ ] ;<br />

access type definition = ([ access ], [ ‘static’ ]) | ([ ‘static’ ], [ access ]),<br />

type definition ;<br />

The access part is only possible in <strong>VDM</strong>++ and <strong>VDM</strong>-RT.<br />

access = ‘public’<br />

| ‘private’<br />

| ‘protected’ ;<br />

type definition = identifier, ‘=’, type, [ invariant ]<br />

| identifier, ‘::’, field list, [ invariant ] ;<br />

type = bracketed type<br />

| basic type<br />

| quote type<br />

| composite type<br />

| union type<br />

| product type<br />

| optional type<br />

| set type<br />

| seq type<br />

| map type<br />

| partial function type<br />

| type name<br />

| type variable ;<br />

bracketed type = ‘(’, type, ‘)’ ;<br />

basic type = ‘bool’ | ‘nat’ | ‘nat1’ | ‘int’ | ‘rat’<br />

| ‘real’ | ‘char’ | ‘token’ ;<br />

quote type = quote literal ;<br />

176

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

Saved successfully!

Ooh no, something went wrong!