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

Re: Include language bindings? Draft Standard Text, V02.1



Michel,

Yes, such a language feature might be useful.  It would affect,
for instance, whether the compiler translated a subtraction of
intervals into a normal interval subtraction or a
cancellation subtraction.

However, I still need convincing that such a feature be within
the scope of 1788.

Baker

On 3/16/2010 14:30, Michel Hack wrote:
Dan Zuras gave the example:
     pp = ((((c0*xx + c1)*xx + c2)*xx + c3)*xx + c4)*xx + c5;
and pointed out:
     However, as we discussed at length in the stds-1788-er
     subgroup, the resulting interval would be unnecessarily wide
     unless one recognises that each instance of the interval
     variable 'xx' are the SAME variable.  That is, all of the
     instances co-vary rather than vary independently of one
     another.

Baker replied:
My view in the past is that the reformulation is the responsibility of
the programmer.  Although this greatly simplifies compiler writing, ...

The problem is that the language may have no means for the programmer
to do this reformulation -- at least not completely.

Perhaps what is needed is a language-specified way to signal that, in
a given context (expression, block, etc.), different mentions of the
same variable do stand for the same entity, literally.  Among other
things this would cause a C compiler to flag self-increment (x++) in
contexts where both "before" and "after" instances are referred to.

What we don't want is for a compiler to try to be "smart", and deduce
that two instances of a variable are the same entity in some contexts
but not others, with no clue to the programmer as to what these rules
are.

Michel.
---Sent: 2010-03-16 19:41:12 UTC



--

---------------------------------------------------------------
R. Baker Kearfott,    rbk@xxxxxxxxxxxxx   (337) 482-5346 (fax)
(337) 482-5270 (work)                     (337) 993-1827 (home)
URL: http://interval.louisiana.edu/kearfott.html
Department of Mathematics, University of Louisiana at Lafayette
(Room 217 Maxim D. Doucet Hall, 1403 Johnston Street)
Box 4-1010, Lafayette, LA 70504-1010, USA
---------------------------------------------------------------