x^.val.S ← M2D.INTERSECTION [x^.val.S, y^.val.S]
ELSE err [118] };
slash,
div => { IF f = Card THEN
IF y^.val.C > 0 THEN x^.val.C ← x^.val.C / y^.val.C
ELSE err [205]
ELSE IF f = Int THEN
IF y^.val.I # 0 THEN x^.val.I ← x^.val.I / y^.val.I
ELSE err [205]
ELSE IF (f = Real) AND (op = slash) THEN
IF (y^.val.R >= 1.0) OR
(ABS[x^.val.R] <= MaxReal * ABS[y^.val.R]) THEN
x^.val.R ← x^.val.R / y^.val.R
ELSE err [204]
ELSE
IF (f = Set)
AND (op = slash)
THEN
x^.val.S ← M2D.SYMMDIFF [x^.val.S, y^.val.S]
ELSE err [120] };
div,
rem => { IF f = Card THEN
IF y^.val.C > 0 THEN x^.val.C ← x^.val.C MOD y^.val.C
ELSE err [205]
ELSE IF f = Int THEN
IF (x^.val.I >= 0) AND (y^.val.I > 0) THEN
x^.val.I ← x^.val.I MOD y^.val.I
ELSE err [205]
ELSE err [121] };
and => { IF f = Bool THEN x^.val.B ← x^.val.B AND y^.val.B
ELSE err [122] };
plus => { IF f = Card THEN
IF y^.val.C <= MaxCard - x^.val.C THEN
x^.val.C ← x^.val.C + y^.val.C
ELSE err [206]
ELSE IF f = Int THEN
IF (x^.val.I >= 0) AND (y^.val.I <= MaxInt - x^.val.I) OR
(x^.val.I < 0) AND (y^.val.I >= MinInt - x^.val.I) THEN
x^.val.I ← x^.val.I + y^.val.I
ELSE err [206]
ELSE IF f = Real THEN
IF (x^.val.R >= 0.0) AND (y^.val.R <= MaxReal - x^.val.R) OR
(x^.val.R < 0) AND (y^.val.R >= MinReal - x^.val.R) THEN
x^.val.R ← x^.val.R + y^.val.R
ELSE err [206]
ELSE
IF f = Set
THEN
x^.val.S ← M2D.UNION [x^.val.S, y^.val.S]
ELSE err [123] };
minus => { IF f = Card THEN
IF y^.val.C <= x^.val.C THEN x^.val.C ← x^.val.C - y^.val.C
ELSE
IF y^.val.C - x^.val.C <= MaxInt THEN
{ x^.val.I ← -(y^.val.C - x^.val.C); x^.typ ← M2D.inttyp }
ELSE err [207]
ELSE IF f = Int THEN
IF (x^.val.I >= 0) AND
((y^.val.I >= 0) OR (x^.val.I <= MaxInt + y^.val.I)) OR
(x^.val.I < 0) AND
((y^.val.I < 0) OR (x^.val.I >= MinInt + y^.val.I)) THEN
x^.val.I ← x^.val.I - y^.val.I
ELSE err [207]
ELSE IF f = Real THEN
IF (x^.val.R >= 0.0) AND
((y^.val.R >= 0.0) OR (x^.val.R <= MaxReal + y^.val.R)) THEN
x^.val.R ← x^.val.R - y^.val.R
ELSE IF (x^.val.R < 0.0) AND
((y^.val.R < 0.0) OR (x^.val.R >= MinReal + y^.val.R)) THEN
x^.val.R ← x^.val.R - y^.val.R
ELSE err [207]
ELSE
IF f = Set
THEN
x^.val.S ← M2D.SETDIFF [x^.val.S, y^.val.S]
ELSE err [124] };
or => { IF f = Bool THEN x^.val.B ← x^.val.B OR y^.val.B
ELSE err [125] };
eql => { IF f = Card THEN x^.val.B ← x^.val.C = y^.val.C
ELSE IF f = Int THEN x^.val.B ← x^.val.I = y^.val.I
ELSE IF f = Real THEN x^.val.B ← x^.val.R = y^.val.R
ELSE IF f = Bool THEN x^.val.B ← x^.val.B = y^.val.B
ELSE IF f = Set THEN x^.val.B ← x^.val.S = y^.val.S
ELSE IF f = Char THEN x^.val.B ← x^.val.Ch = y^.val.Ch
ELSE err [126];
x^.typ ← M2D.booltyp };
neq => { IF f = Card THEN x^.val.B ← x^.val.C # y^.val.C
ELSE IF f = Int THEN x^.val.B ← x^.val.I # y^.val.I
ELSE IF f = Real THEN x^.val.B ← x^.val.R # y^.val.R
ELSE IF f = Bool THEN x^.val.B ← x^.val.B # y^.val.B
ELSE IF f = Set THEN x^.val.B ← x^.val.S # y^.val.S
ELSE IF f = Char THEN x^.val.B ← x^.val.Ch # y^.val.Ch
ELSE err [126];
x^.typ ← M2D.booltyp };
lss => { IF f = Card THEN x^.val.B ← x^.val.C < y^.val.C
ELSE IF f = Int THEN x^.val.B ← x^.val.I < y^.val.I
ELSE IF f = Real THEN x^.val.B ← x^.val.R < y^.val.R
ELSE IF f = Bool THEN x^.val.B ← x^.val.B < y^.val.B
ELSE IF f = Set THEN
IF x^.val.S = y^.val.S THEN x^.val.B ← FALSE
ELSE x^.val.B ← M2D.SUBSET [x^.val.S, y^.val.S]
ELSE IF f = Char THEN x^.val.B ← x^.val.Ch < y^.val.Ch
ELSE err [126];
x^.typ ← M2D.booltyp };
leq => { IF f = Card THEN x^.val.B ← x^.val.C <= y^.val.C
ELSE IF f = Int THEN x^.val.B ← x^.val.I <= y^.val.I
ELSE IF f = Real THEN x^.val.B ← x^.val.R <= y^.val.R
ELSE IF f = Bool THEN x^.val.B ← x^.val.B <= y^.val.B
ELSE IF f = Set THEN x^.val.B ← M2D.SUBSET [x^.val.S, y^.val.S]
ELSE IF f = Char THEN x^.val.B ← x^.val.Ch <= y^.val.Ch
ELSE err [126];
x^.typ ← M2D.booltyp };
gtr => { IF f = Card THEN x^.val.B ← x^.val.C > y^.val.C
ELSE IF f = Int THEN x^.val.B ← x^.val.I > y^.val.I
ELSE IF f = Real THEN x^.val.B ← x^.val.R > y^.val.R
ELSE IF f = Bool THEN x^.val.B ← x^.val.B > y^.val.B
ELSE IF f = Set THEN
IF x^.val.S = y^.val.S THEN x^.val.B ← FALSE
ELSE x^.val.B ← M2D.SUBSET [y^.val.S, x^.val.S]
ELSE IF f = Char THEN x^.val.B ← x^.val.Ch > y^.val.Ch
ELSE err [126];
x^.typ ← M2D.booltyp };
geq => { IF f = Card THEN x^.val.B ← x^.val.C >= y^.val.C
ELSE IF f = Int THEN x^.val.B ← x^.val.I >= y^.val.I
ELSE IF f = Real THEN x^.val.B ← x^.val.R >= y^.val.R
ELSE IF f = Bool THEN x^.val.B ← x^.val.B >= y^.val.B
ELSE IF f = Set THEN x^.val.B ← M2D.SUBSET [y^.val.S, x^.val.S]
ELSE IF f = Char THEN x^.val.B ← x^.val.Ch >= y^.val.Ch
ELSE err [126];
x^.typ ← M2D.booltyp }