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

Re: [corrected] Std.1788-Inner operations and RDM



Mehran

On 30 Sep 2015, at 09:05, Mehran Mazandarani <me.mazandarani@xxxxxxxxx> wrote:
> First of all, thank you for your very kind attention and valuable comments.
> George wrote that "To exploit context knowledge of the expression in which “-“ appears requires MUCH more sophisticated machinery,..." and " The subtraction operator sees SUBTRACT(X, Y)"
> 
> Let me don't agree with you, because the subtraction operator can also see SUBTRACT (X,Y,K), K=0,1. K=0 means X and Y are of the same source, otherwise they are of the different source.

I say: welcome to the world of interval computation, because you are clearly thinking hard about these difficult issues. However, minds that were/are often wiser than ours have been grappling with them for some 40 years.

But I agree with someone's comment: I don't understand the PDF you sent, at all. Please rewrite more clearly.

I cannot agree with your SUBTRACT(X,Y,K). What do you mean by "of the same source"? 

If it means 
(1) "representing the same variable in the mathematical model" 
then your arguments have some weight. But that knowledge is not available to the functions in a 1788 implementation. If it means 
(2) "referencing the same memory location", 
SUBTRACT might be written to check that fact (at some loss of efficiency).

But (1) can be true and (2) false, as in the pseudo-code
  interval x,xcopy;
  x = [1,2];
  xcopy = x;

*Probably* x and xcopy represent the same mathematical variable. But... (2) is false if they are stored in separate locations. But... a data flow analysis by the compiler may show it is legitimate to store them in the same location, making (2) true. On the other hand, in an OO language where objects are references to their actual values, (2) may be true while (1) is false, after dereferencing. (Two unrelated string objects may both point to the value "Friday", which is only stored once.)

And for given code in a given language, whether (2) is true can depend on the compiler, and on the optimisation level within the same compiler.

Then... are function arguments passed by value, by reference, or by Fortran's "copy in, copy out"?

Therefore I see these very important issues as ones of language semantics -- above the pay grade of 1788. P1788 had a "language subgroup" that we originally hoped would produce some authoritative text on all this. Its members as individuals made a wonderful contribution, but the text never came to reality.

Regards

John Pryce