19.11.2014 Views

The Fortress Language Specification - CiteSeerX

The Fortress Language Specification - CiteSeerX

The Fortress Language Specification - CiteSeerX

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.

<strong>Fortress</strong>.IO<br />

<strong>Fortress</strong>.Crypto<br />

<strong>Fortress</strong>.Security<br />

CoolCryptoApp.2.0<br />

<strong>Fortress</strong>.IO<br />

<strong>Fortress</strong>.Crypto<br />

<strong>Fortress</strong>.Security<br />

IronLink<br />

<strong>Fortress</strong>.IO<br />

<strong>Fortress</strong>.Crypto<br />

CoolSecurity<br />

IronIO<br />

IronCrypto<br />

<strong>Fortress</strong>.IO<br />

<strong>Fortress</strong>.Security<br />

<strong>Fortress</strong>.Security<br />

Figure 22.4: An upgraded component<br />

Developers can define their own versions of this component to restrict how their components can be upgraded. For<br />

example, they can prevent upgrades with older versions of a component, or with a matching component from an<br />

untrusted vendor.<br />

<strong>The</strong> Upgradable API presents a problem for our model. Its implementation by the various constituent components in<br />

a compound component must be accessed during an upgrade operation. However, because the exported APIs of the<br />

constituent components must be disjoint, they cannot all export Upgradable after linking.<br />

We solve this problem by introducing an additional step during linking. In a link operation, a special component,<br />

called a restriction component, is constructed automatically, based on the provided constituents. This component exports<br />

the Upgradable API; its implementation is a function of all the constituents provided to the link operation. <strong>The</strong><br />

provided constituents are then used to construct a new set of constituents that are identical to the provided constituents<br />

except that they do not export Upgradable. <strong>The</strong>se new constituents are then combined, along with the restriction<br />

component, to form the constituents of a new compound component.<br />

In addition to the constraints imposed by a component’s isValidUpgrade function, there are several other conditions<br />

that must be met in order for an upgrade to be valid. <strong>The</strong>se conditions are necessary to ensure that the resulting<br />

component is well-formed and imports and exports the same APIs as the target: 4<br />

1. Every API imported by the replacement must be either imported or exported by the target.<br />

2. <strong>The</strong> APIs exported by the replacement must be a subset of those exported by the target.<br />

4 <strong>The</strong>se conditions are sufficient provided there are no hidden or constrained APIs, which are discussed in Section 22.8.<br />

172

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

Saved successfully!

Ooh no, something went wrong!