obj X = a:A and b:B and c:C; obj Y = a:A or b:B or c:C; obj A; obj B; obj C; var i: integer; obj IntX < X where: A = integer; B = real; C = string; end; obj IntY < Y where: A = integer; B = real; C = string; end; obj Y1 < Y; obj Y2 = Y; op main(ix:IntX, iy:IntY, y:Y, y1:Y1, y2:Y2) -> boolean = ( y.a = nil; y?.a; y2?.a; y1?.a; iy?.a; iy.a = 10; iy.b = 10; iy.c = "xyz"; iy.a = "xyz"; (* ERROR: iy.c is int, not string *) iy.b = "xyz"; (* ERROR: iy.c is real, not string *) iy.c = 10; (* ERROR: iy.c is string, not int *) i?.a; (* ERROR: just checking the obvious *) (* * Following lines just to reaffirm that tuples work right. *) ix.a = 10; ix.b = 10; ix.c = "xyz"; ix.a = "xyz"; (* ERROR: ix.c is int, not string *) ix.b = "xyz"; (* ERROR: ix.c is real, not string *) ix.c = 10; (* ERROR: ix.c is string, not int *) );