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.

False: BooleanInterval<br />

Uncertain: BooleanInterval<br />

Impossible:BooleanInterval<br />

test testData[ ] = { True, False, Uncertain, Impossible }<br />

24.2.1 coercion (x: Boolean)<br />

A boolean value can always serve as a BooleanInterval value. <strong>The</strong> value true is coerced to True; the value false is<br />

coerced to False.<br />

24.2.2 opr ∧(self,other: BooleanInterval): BooleanInterval<br />

<strong>The</strong> logical AND operator ∧ ( AND ) returns Impossible if either argument is Impossible; otherwise it returns False<br />

if either argument is False; otherwise it returns Uncertain if either argument is Uncertain; otherwise it returns True.<br />

It obeys the interval containment rule. <strong>The</strong> ∧ operator may be described by this table:<br />

∧ Uncertain True False Impossible<br />

Uncertain Uncertain Uncertain False Impossible<br />

True Uncertain True False Impossible<br />

False False False False Impossible<br />

Impossible Impossible Impossible Impossible Impossible<br />

24.2.3 opr ∨(self,other: BooleanInterval): BooleanInterval<br />

<strong>The</strong> logical OR operator ∨ ( OR ) returns Impossible if either argument is Impossible; otherwise it returns True if<br />

either argument is True; otherwise it returns Uncertain if either argument is Uncertain; otherwise it returns False.<br />

It obeys the interval containment rule. <strong>The</strong> ∧ operator may be described by this table:<br />

∧ Uncertain True False Impossible<br />

Uncertain Uncertain True Uncertain Impossible<br />

True True True True Impossible<br />

False Uncertain True False Impossible<br />

Impossible Impossible Impossible Impossible Impossible<br />

24.2.4 opr ¬(self): BooleanInterval<br />

<strong>The</strong> logical NOT operator ¬ ( NOT ) returns Impossible if its argument is Impossible, Uncertain if its argument is<br />

Uncertain, False if its argument is True, and True if its argument is False. It obeys the interval containment rule.<br />

187

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

Saved successfully!

Ooh no, something went wrong!