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.

CHAPTER 6. TRANSFORMATIONS<br />

Example 6.1 – Introducing a variable<br />

type T = ...<br />

✄<br />

type T = ...<br />

variable t : T<br />

If the type <strong>of</strong> interest is a product type it can be an advantage to define<br />

a variable for each component <strong>of</strong> the product in order to be able to refer to<br />

these in the function declarations, see Example 6.2.<br />

Example 6.2 – Introducing variables from product type<br />

type<br />

T = U × V,<br />

U = ...,<br />

V = ...<br />

✄<br />

type<br />

T = U × V,<br />

U = ...,<br />

V = ...<br />

variable<br />

u : U,<br />

v : V<br />

6.4 Transforming Explicit Function Definitions<br />

After deciding on the type <strong>of</strong> interest and introducing the corresponding<br />

variable the function definitions can be transformed. An explicit function<br />

definition has the form:<br />

single_typing<br />

formal_function_application ≡ value_expr<br />

optional_pre_condition<br />

32

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

Saved successfully!

Ooh no, something went wrong!