Re: Motion P1788/M0008.01_Exception_Handling
I liked John Pryce's dissection of the motion, and appreciate the
replies by Arnold, Dan and Nate. Here are some additional comments.
I too was confused by the notion that the interval part of a result
cannot depend on the decorations of the arguments. When I thought
of tagged (or decorated) intervals some months ago, I imagined that
the tags would hold the essential context of an interval, which
includes modes (that control operations) as well as flags (that
record aspects of the result of an operation) -- an approach used
(in a different context) by some variable-precision packages such
as DecNumber (by Mike Cowlishaw, father of Rexx and DFP).
It is however possible to carry out most operations in a way that
computes intervals independently of decorations -- perhaps even
all arithmetical operations. But SOME operations must depend on
the decorations, or else those would be useless. In fact, some
of them should even be vectorizable primitives, such as
Y := MakeEmptyIfPossiblyUndefined(X)
or a more generic MakeEmptyIfFlagged(decorated_interval, flag_mask).
This is what permits SIMD streaming of complicated expressions
without introducing test-and-branch hiccups. With mode-like
decorations domain errors could be detected one step earlier
and avoid an intermediate interval result being computed, and
with decoration-dependent forgetting primitives propagation of
useless results can be stopped early -- but I believe one or
the other is essential for parallelizability.
John also asked how parallel hardware could handle decorations
and numerics at the same time. There is a precedent for this
in several SIMD architectures. One that I am familiar with is
the 20-year-old S/370 Vector Facility (now obsolete), which
consisted of vector arrays (512 elements) and corresponding
bit vectors (the Vector Mask Register). Operations would set
bits corresponding to the vector index of a result element,
and could control whether and how vector elements participated
in an operation (depending on the operation code).
Michel.
---Sent: 2009-09-19 09:07:49 UTC