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.

trait ApproximateSemiRing T extends ApproximateSemiRingT, ⊕, ⊗, ≈,<br />

opr ⊕,opr ⊗,opr ≈<br />

extends { ApproximateCommutativeMonoidT, ⊕, ≈,<br />

ApproximateMonoidT, ⊗, ≈,<br />

ApproximatelyDistributiveT, ⊗, ⊕, ≈,<br />

ApproximateZeroAnnihilationT, ⊗, ≈ }<br />

property castT(Zero⊗) ≈ castT(Identity⊕)<br />

end<br />

An approximate semiring is a set of values that has two binary operators ⊕ and ⊗ , such that (a) the values form an<br />

approximate commutative monoid with ⊕ ; (b) the values form an approximate monoid with ⊗ ; (c) ⊗ is approximately<br />

distributive over ⊕ ; and (d) ⊗ obeys approximate zero annihilation, where the zero for ⊗ is the same as the<br />

identity for ⊕ .<br />

trait SemiRingT extends SemiRingT, ⊕, ⊗,opr ⊕,opr ⊗<br />

extends { ApproximateSemiRingT, ⊕, ⊗, =,<br />

CommutativeMonoidT, ⊕,<br />

MonoidT, ⊗,<br />

DistributiveT, ⊗, ⊕,<br />

ZeroAnnihilationT, ⊗ }<br />

end<br />

A semiring is a set of values that has two binary operators ⊕ and ⊗ , such that (a) the values form a commutative<br />

monoid with ⊕ ; (b) the values form a monoid with ⊗ ; (c) ⊗ is distributive over ⊕ ; and (d) ⊗ obeys zero<br />

annihilation, where the zero for ⊗ is the same as the identity for ⊕ .<br />

trait ApproximateRing T extends ApproximateRingT, ⊕, ⊖, ⊗, ≈,<br />

opr ⊕,opr ⊖,opr ⊗,opr ≈<br />

extends { ApproximateAbelianGroupT, ⊕, ⊖, ≈,<br />

ApproximateSemiRingT, ⊕, ⊗, ≈ }<br />

end<br />

An approximate ring is an approximate semiring that also has a unary operator ⊖ that returns inverses for the ⊕<br />

operator so that the values form an approximate group with ⊕ and ⊖ .<br />

trait RingT extends RingT, ⊕, ⊖, ⊗,opr ⊕,opr ⊖,opr ⊗<br />

extends { ApproximateRingT, ⊕, ⊖, ⊗, =,<br />

AbelianGroupT, ⊕, ⊖,<br />

SemiRingT, ⊕, ⊗ }<br />

end<br />

A ring is a semiring that also has a unary operator ⊖ that returns inverses for the ⊕ operator so that the values form<br />

a group with ⊕ and ⊖ .<br />

trait ApproximateCommutativeRing T extends ApproximateCommutativeRingT, ⊕, ⊖, ⊗, ≈,<br />

opr ⊕,opr ⊖,opr ⊗,opr ≈<br />

extends { ApproximateRingT, ⊕, ⊖, ⊗, ≈,<br />

ApproximatelyCommutativeT, ⊗, ≈ }<br />

end<br />

An approximate commutative ring is an approximate ring for which the binary operator ⊗ is also approximately<br />

commutative.<br />

trait CommutativeRing T extends CommutativeRingT, ⊕, ⊖, ⊗,<br />

opr ⊕,opr ⊖,opr ⊗<br />

258

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

Saved successfully!

Ooh no, something went wrong!