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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Hidden Observer<br />

3.2. TERMS AND DEFINITIONS<br />

A function observing the type T is named a hidden observer if T is not part<br />

<strong>of</strong> the left hand side <strong>of</strong> the function signature, see Example 3.3.<br />

Example 3.3 – Hidden observer<br />

type<br />

T = Int<br />

value<br />

hidden_obs : Int → Int<br />

hidden_obs(x) ≡ obs(x),<br />

obs : T → Int<br />

obs(t) ≡ t<br />

Hidden Generator<br />

A generator altering values <strong>of</strong> the type T is named a hidden generator if T<br />

is not part <strong>of</strong> the right hand side <strong>of</strong> the function signature, see Example 3.4.<br />

Example 3.4 – Hidden generator<br />

type<br />

T = Int<br />

value<br />

hidden_gen : Int → Int<br />

hidden_gen(x) ≡ gen(x),<br />

gen : Int → T<br />

gen(i) ≡ i<br />

Implicit Observer<br />

An implicit observer is a function which implicitly converts a value <strong>of</strong> a type<br />

<strong>of</strong> interest <strong>into</strong> one <strong>of</strong> the equivalent type expressions during the evaluation<br />

<strong>of</strong> the function body, see Example 3.5.<br />

15<br />

.

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

Saved successfully!

Ooh no, something went wrong!