Disjoint Data Types
There are two types of relationships between types.

Subtype/Supertype relationship:-

If x is a supertype of y, then any object of type y is also of type x. And y is said to be a subtype of x.

The type t is a supertype of every type whatsoever. Then every object is of type t.

The type nil is a subtype of every type whatsoever. No object is of type nil.

Example: In LISP the type simple-array is a subtype of array.

Disjointness of Types:-

If types x and y are disjoint, then in any implementation no object may be both of type x and of type y.

Example: If type x contains (1 … 50) and type y contains (100 ….. 150) objects. There is no object which exists in both of type x and type y. Then type x and type y are disjoint types.

In LISP the types integer and ratio are disjoint subtypes of rational.


Disjointness of Types
CS 561

SCLM Presentation