code for unevaluated Boolean and conditional expressions



On 04 May 2006 17:12:07 +0200, Albert Reiner <areiner at tph.tuwien.ac.at> wrote:

> > f (0, y);  =>  error: simplification of 1/0
>
> Isn't this unfortunate?  I think it should be
>
>     f (0, y);  =>  if equal(y, 0) then 0 else 1/0
>
> so that the error is delayed until the test can be decided.  That way
>
>     f0y: f(0,y) $
>     f0y, y:0;  =>  0
>
> is equivalent to f(0,0) as it seems it should be.

Indeed, simplification of 1/0 => error is unfortunate.
0^0 is another expression which, when simplified, causes an error.
However, I consider this problem to be orthogonal to the unevaluated
conditional stuff.

In the interest of limiting the scope of the work, I didn't try to address
general simplification at all. I don't think that it should be possible
to cause an error by simplification, but for the purpose of getting
the unevaluated conditional stuff to work, I've just ignored the problem.

best,
Robert