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.

updatenat k(j: IntegerStatick, v: T): LinearSequenceT, n where { k < n }<br />

updatenat m(r:RangeOfStaticSizeIndexInt, m, v: LinearSequenceT, m):<br />

LinearSequenceT, n<br />

throws { IndexOutOfBoundsException } where { m ≤ n }<br />

updateint a,nat m,int c(r:StaticRangea, m, c, v:LinearSequenceT, m):<br />

LinearSequenceT, n<br />

where { 0 ≤ a < n, 0 ≤ a + m · c < n }<br />

opr ‖ nat m(self,other: LinearSequenceT, m):LinearSequenceT, n + m<br />

getter reverse():LinearSequenceT, n<br />

getter littleEndiannat b():BinaryLinearEndianSequenceb, n,false<br />

where { T extends BinaryWordb }<br />

getter bigEndiannat b():BinaryLinearEndianSequenceb, n,true<br />

where { T extends BinaryWordb }<br />

getter littleEndiannat b,bool bigEndianBytes,bool bigEndianBits():<br />

BinaryEndianLinearEndianSequenceb,bigEndianBytes,bigEndianBits, n,false<br />

where { T extends BinaryEndianWordb,bigEndianBytes,bigEndianBits }<br />

getter bigEndiannat b,bool bigEndianBytes,bool bigEndianBits():<br />

BinaryEndianLinearEndianSequenceb,bigEndianBytes,bigEndianBits, n,true<br />

where { T extends BinaryEndianWordb,bigEndianBytes,bigEndianBits }<br />

end<br />

40.1.1 coercion nat b,bool bigEndianSequence<br />

(x:BinaryLinearEndianSequenceb, n,bigEndianSequence)<br />

where { T extends BinaryWordb }<br />

40.1.2 coercion nat b,bool bigEndianBytes,bool bigEndianBits,bool bigEndianSequence<br />

(x:BinaryEndianLinearEndianSequenceb,bigEndianBytes,bigEndianBits,<br />

n,bigEndianSequence)<br />

where { T extends BinaryEndianWordb,bigEndianBytes,bigEndianBits }<br />

Any binary linear endian sequence may be coerced to an ordinary binary linear sequence of corresponding element<br />

type. <strong>The</strong> bit values remain the same; all that is lost is the endianness information of the sequence in the static type.<br />

40.1.3 coercion nat b,bool bigEndianBytes,bool bigEndianBits,bool bigEndianSequence<br />

(x:BinaryEndianLinearEndianSequenceb,bigEndianBytes,bigEndianBits,<br />

n,bigEndianSequence)<br />

where { T extends BinaryWordb }<br />

A binary linear endian sequence of binary endian words may be coerced to an ordinary binary linear sequence of<br />

ordinary binary words. <strong>The</strong> bit values remain the same; all that is lost is the endianness information of both the<br />

sequence and the elements.<br />

273

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

Saved successfully!

Ooh no, something went wrong!