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.

getAPI (apiName:Name): Api<br />

preferences(ofAPI:Api): 〈Component〉<br />

compile(file: File): SimpleComponent<br />

install(file: File): Component<br />

install(file: File,prereqs: SetApi):Component<br />

upgradeAll(componentName: Name,that: Component): ()<br />

isValidLink(constituents: 〈Component〉,exports = SetApi,hide = SetApi):Boolean<br />

link(result: Name,constituents: 〈Component〉,exports = SetApi,hide = SetApi): Component<br />

requires isValidLink(constituents,exports,hide)<br />

end<br />

object Enclosing<strong>Fortress</strong> extends { <strong>Fortress</strong> } end<br />

trait <strong>Fortress</strong>Element<br />

elementName: Name<br />

vendor: String<br />

owner: <strong>Fortress</strong><br />

timeStamp: Date<br />

version: Version<br />

uninstall():()<br />

end<br />

trait Component extends <strong>Fortress</strong>Element<br />

imports: SetApi<br />

exports:SetApi<br />

provides:SetApi<br />

visibles: SetApi<br />

constituents: SetComponent<br />

run(args: String . . .):()<br />

constrain(destination: Name,apis: SetApi):Component<br />

hide(destination: Name,apis: SetApi):Component<br />

extract(prereqs: SetApi): File<br />

isValidUpgrade(that:Component):Boolean<br />

abstract upgrade(result:Name,that: Component):Component<br />

requires self.isValidUpgrade(that)<br />

sourceIsAvailable: Boolean<br />

getSourceFile():File<br />

requires sourceIsAvailable<br />

runTests(inclusive = Boolean): ()<br />

end<br />

trait Api extends <strong>Fortress</strong>Element<br />

uses: SetApi<br />

extraction:File<br />

end<br />

trait Name end<br />

trait SimpleComponent extends Component end<br />

trait Version<br />

major: N<br />

minor: N<br />

end<br />

end<br />

270

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

Saved successfully!

Ooh no, something went wrong!