26.09.2013 Views

Transformation of Applicative Specifications into Imperative ...

Transformation of Applicative Specifications into Imperative ...

Transformation of Applicative Specifications into Imperative ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

6.3. TRANSFORMING TYPE DEFINITIONS<br />

A set type expression is transformed by transforming the constituent type<br />

expression.<br />

List Type Expressions<br />

List type expressions are <strong>of</strong> one <strong>of</strong> the forms:<br />

type_expr ∗<br />

type_expr ω<br />

A list type expression is transformed by transforming the constituent<br />

type expression.<br />

Finite Map Type Expressions<br />

Finite map type expressions are <strong>of</strong> the form:<br />

type_expr1 →m type_expr2<br />

A finite map type expression is transformed by transforming the constituent<br />

type expressions.<br />

Subtype Expressions<br />

Subtype expressions are <strong>of</strong> the form:<br />

{| binding : type_expr • value_expr |}<br />

A subtype expression is transformed by transforming the constituent type<br />

expression. The value expression has to be transformed using the transformation<br />

rules given in Section 6.4.3.<br />

Bracketed Type Expressions<br />

Bracketed type expressions are <strong>of</strong> the form:<br />

( type_expr )<br />

A bracketed type expression is transformed by transforming the constituent<br />

type expression.<br />

6.3.2 Introducing Variable Definitions<br />

The first thing to do when transforming an applicative specification <strong>into</strong> an<br />

imperative specification is to decide which type that has to be the type <strong>of</strong><br />

interest and give name to the corresponding variable.<br />

If a type name is declared as a type <strong>of</strong> interest a variable declaration has<br />

to be established. The variable can be defined as in Example 6.1.<br />

31

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

Saved successfully!

Ooh no, something went wrong!