19.11.2014 Views

The Fortress Language Specification - CiteSeerX

The Fortress Language Specification - CiteSeerX

The Fortress Language Specification - CiteSeerX

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Traits defining a method: defining p (f, N) = { −→ N }<br />

defining p (f,Object) = ∅<br />

⎧<br />

⋃<br />

defining p (f, [ −→ τ / −→ α ]N i )<br />

⎪⎨<br />

defining p (f, C −→ τ ) =<br />

N i ∈{ −→ N }<br />

⋃<br />

if C α −→<br />

−→ extends { N } ∈ p and f ∉ definedp (C)<br />

defining p (f, [ −→ τ / −→ α ]N i ) ∪ {C −→ τ }<br />

⎪⎩<br />

N i ∈{ −→ N }<br />

if<br />

C −→ α extends {<br />

−→ N } ∈ p and f ∈ definedp (C)<br />

Auxiliary functions for methods: defined p / inherited p / visible p (C) = { −→ f }<br />

defined p (C) = { −−−−−−−→ Fname(fd)} where C −→ fd ∈ p<br />

inherited p (C) = ⊎ N i ∈{ −→ N } {f i | f i ∈ visible p (N i ), f i ∉ defined p (C)} where C extends { −→ N } ∈ p<br />

visible p (C) = defined p (C) ⊎ inherited p (C)<br />

Figure A.12: Static Semantics of Core <strong>Fortress</strong> with Where Clauses (IV)<br />

A.3 Core <strong>Fortress</strong> with Overloading<br />

In this section, we define a <strong>Fortress</strong> core calculus with overloading for dotted methods and first-order functions. We<br />

call this calculus Core <strong>Fortress</strong> with Overloading. Core <strong>Fortress</strong> with Overloading is an extension of Basic Core<br />

<strong>Fortress</strong> with overloading.<br />

A.3.1<br />

Syntax<br />

<strong>The</strong> syntax for Core <strong>Fortress</strong> with Overloading is provided in Figure A.13.<br />

A.3.2<br />

Dynamic Semantics<br />

A dynamic semantics for Core <strong>Fortress</strong> with Overloading is provided in Figure A.14.<br />

A.3.3<br />

Static Semantics<br />

A static semantics for Core <strong>Fortress</strong> with Overloading is provided in Figures A.15, A.16, A.17, and A.18.<br />

We proved the type soundness of Core <strong>Fortress</strong> with Overloading using the standard technique of proving a progress<br />

theorem and a subject reduction theorem.<br />

325

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

Saved successfully!

Ooh no, something went wrong!