Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

Re: M0036.03 Flavors and standard invalidation



Vincent, P1788
a short comment or question, see below
Juergen

Am 07.09.2012 15:28, schrieb Vincent Lefevre:
On 2012-09-06 21:10:56 +0200, Jürgen Wolff von Gudenberg wrote:
Now with flavors but also possible without,  another kind of decorations
indicating a state like "isKaucherInterval" enter the scene. I think they
have to be recorded in addition to the operation based decoration. An
interval is now a bare Interval and a set of  decorations.

This is a bit ambiguous. For the Kaucher interval [1,-1], there
are no corresponding bare intervals (except Empty). But the

IMHO [1,-1] is a bare interval in the Kaucher flavor, or not?

standard could allow implementation-defined non-standard
intervals; there should be a sticky decoration (some form of NaI)
that would be set as soon as such a non-standard occur in a
computation, and the bare interval interpretation should be Empty.

Conversely, I think that an additional "defined-and-continuous"
decoration could be sufficient for a Kaucher arithmetic w.r.t.
unbounded intervals. If I understandard correctly, the problem
that should be avoided is the following.

In set-based arithmetic:

   X = [0,1]
   Y = 1 / X = 1 / [0,1] = [1,+inf]
   Z = 1 / Y = [0,1]

If I understandard correctly, in Kaucher arithmetic, one should
get NaI, more precisely:

   X = [0,1]
   Y = 1 / X = NaI
   Z = 1 / Y = NaI

Now, if there is a language-defined way (pragma...) to select the
bindings so that whenever the defined-and-continuous decoration is
false, the interval is changed to NaI, would this be OK for Kaucher
arithmetic?

For instance,

   #pragma Kaucher
   X = [0,1]
   Y = 1 / X
   Z = 1 / Y

would be interpreted as:

   X = [0,1]
   if (not is-bounded(X))
     X = NaI
   Y = 1 / X
   if (not defined-and-continuous(Y))
     Y = NaI
   Z = 1 / Y
   if (not defined-and-continuous(Z))
     Z = NaI

Note that the above code would be from language-defined specification,
not implementation. For efficiency, an implementation could recognize
the pragma and generate code accordingly (e.g. if it detects 0 in the
denominator interval, a NaI would be generated directly, without a
computation of the unbounded interval first).

This is a more restricted way of seeing flavors, but IMHO simpler in
its specification.


--
o Prof. Dr. Juergen Wolff von Gudenberg, Lehrstuhl fuer Informatik II
    / \          Universitaet Wuerzburg, Am Hubland, D-97074 Wuerzburg
InfoII o         Tel.: +49 931 / 31 86602
  / \  Uni       E-Mail: wolff@xxxxxxxxxxxxxxxxxxxxxxxxxxx
 o   o Wuerzburg