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.

CHAPTER 3. TERMINOLOGY<br />

Example 3.5 – Implicit observer<br />

type<br />

T = Int<br />

value<br />

f : Int → Int<br />

f(x) ≡ x + 1,<br />

implicit_obs : T → Int<br />

implicit_obs(t) ≡ f(t)<br />

Implicit Generator<br />

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

certain type <strong>into</strong> an equivalent type <strong>of</strong> interest during the evaluation <strong>of</strong> the<br />

function body, see Example 3.6.<br />

Example 3.6 – Implicit generator<br />

type<br />

T = Int<br />

value<br />

f : T → Int<br />

f(t) ≡ t + 1,<br />

implicit_gen : Int → Int<br />

implicit_gen(x) ≡ f(x + 1)<br />

T-generator<br />

A T-generator is a generator returning a value <strong>of</strong> the type T, that is a<br />

generator with the following single typing in the applicative case:<br />

gen : ... → ... × T × ...<br />

16

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

Saved successfully!

Ooh no, something went wrong!