All basic types are integer intervals. Lower and upper bounds can either be integer values or open (i.e. plus/minus infinity). The empty interval will probably not be allowed as type because it can have no legal value anyway.
Nota bene: intervals with size 1 are allowed and no data need actually be transmitted or stored for them.
Bounds could either be demanded to be specified in the specification directly, or allowed to be taken from data values. This is still open.
Intervals with non-negative (finite) lower bound can be used for holding the lengths of lists.
Intervals of the form [0, N-1] can be viewed as enumeration types and can be used for selecting the branch of a union.
Interval types can have two different modes:
values near 0 are expected to be more probable
all values are expected to be equally probable
Infinite interval types always have mode 1, intervals used for enumeration always mode 2, for all other finite interval types the mode can be chosen freely.
Examples:
(-oo, oo) - the integers
[0, oo) - the natural numbers
[0, 2^k -1] - k bit numbers
[N, N] - the constant N
records
A record type is a finite sequence of arbitrary (basic or structured) types.
All of the components are used.
unions
A union type is a finite sequence of N arbitrary types plus a reference to
a previous enumeration type with range [0, N-1].
One component is selected by the enumuration value and only that component
is used.
lists
A list type is an arbitrary type plus a reference to a previous integer
interval type containing no negative numbers (but possibly 0).
The type is used as often as the integer value indicates.
In this context types are considered "previous" to a component T if they occur in a record type as an earlier component than an ancestor of T.
Back to the main page.
Page created: Jul 20, 1997 -
last update: Nov 26, 2002 -
version 2.1
Jörg Czeranski (Impressum)