Next: Values
Up: No Title
Previous: Introduction
Every procedure is available via field selection from its module.
Some procedures are so common that there is an abbreviation.
For example, the procedure NoNumber.label is available as Label.
Every procedure description in this document starts with an
application scheme. For example
{Label +RT ?L}
occurring in module NoNumber
says that the procedure NoNumber.label is available via the
abbreviation Label. It takes two arguments;
the first argument is an input argument, a record or tuple, and
the second argument is an output argument, a literal.
More formally, we use the following conventions for these lines:
-
If the first letter of the designator procname
is written in lower case, the prodedure is available as
module . procname where
module denotes the name of the module given
in the top margin.
For example, the procedure
List.subB is documented on
page
under the line {subB ·..}.
If the first letter of the designator procname
is written in upper case, it is available by the abbreviation
procname ; and in addition as
module . procname' where
procname' results from
procname by downcasing the first letter and deleting
the string module . For example, the procedure
IsNumberB is available as Number.isB.
-
Procedures with suffix B denote a boolean function or a procedure
taking boolean functions as argument. For constraint programming, every
boolean function has a counterpart without the suffix B that succeeds
when the boolean function returns True and fails when the boolean
function returns False. For example, the unary boolean function
(binary procedure) Number.isB, also available as IsNumberB, has a
corresponding succeeding or failing unary procedure Number.is, also
available as IsNumber.
Every procedure taking boolean functions as argument has a counterpart
without suffix B that expects as arguments succeeding or failing
procedures instead of boolean functions. For example, the binary
function (ternary procedure) List.filterB, also available as
FilterB, takes as second argument a boolean function and thus can be
called like in Ys={List.filterB Xs IsNumberB}. There is a
corresponding binary function List.filter, also available as
Filter that takes as second argument a succeeding or failing
procedure and thus can be called like in Ys={List.filter Xs IsNumber}.
-
Associated with every argument of a procedure is a type.
The type of an argument is indicated by the name of the argument,
using the following abbreviations:

We use indices as in R1 to disambiguate several occurrences
of arguments of the same type.
We combine these abbreviations as in RT
meaning ``record or tuple''. We use the suffix s to
indicate lists of a certain type (e.g. Is stands for a list of integers).
Additionally, we allow ourselves to prefix these
arguments as in PortI indicating an integer that is used as a port.
-
We distinguish between input (+) and output arguments (?).
The application fails, if any of the argument types of input arguments
is violated. Implementations should provide for a way
to report such a violation at compile or run time.
If no input argument type is violated,
the application suspends until all input arguments are
bound to a value of their type.
Suspension of the application does not depend
on the constraints on output arguments.
Next: Values
Up: No Title
Previous: Introduction
Sven Schmeier
Tue Oct 24 09:20:46 MET 1995