Re: Encapsulated search does not encapsulate(all)non-determinism

From: Michael Hanus <mh_at_informatik.uni-kiel.de>
Date: Thu, 24 Jan 2002 16:13:03 +0100 (MET)

Wolfgang Lux wrote:
> But anyway -- as Herbert reminded me -- the results of this analysis would
> be only an approximation. And making the outcome of a program (either a
> result or a suspension) depend on how clever the compiler is (and how much
> work the implementors dedicated to the analysis) is certainly not a
> good thing.

I agree. However, let me add some comments to your remark:

> But IMHO this is still something different than returning completly different
> solutions depending on the order of evaluation. And I cannot imagine how to
> write "reliable" programs, if the insertion of a flip operation (e.g. using --
> probably indirectly -- flip (==) instead of (==) to compare two values) will
> not only change the order of results but also whether some results are
> produced at all.

By "reliable" I mean interactive programs that do not crash.
If there is not a method to encapsulate all non-determinism, you cannot
write interactive programs using search techniques between
I/O actions. On the other hand, I have the impression that
your examples are somehow artificial. When using search operators,
I have always in mind that the encapsulated computations are
always local ones and have no incluence to the outermost computations,
in particular, nothing is shared. Thus, I think the loss of sharing
between encapsulated and non-ecapsulated computations is reasonable
and caused no problems in my current programming practice.

> By unsound in this case I mean that y /= y can be true under option 3. I find
> this unacceptable even for a meta-level construct in the language. Therefore
> IMHO option 3 is not an option.

Why do you think this is unacceptable? Only for academic reasons
(again, note that encapsulated search is already a meta-level
construct where reasoning is difficult) or do you have real
application programs where you need this sharing?
I think it is more important to have a possibility to encapsulate
all non-determinism (see above) and I am open to other concepts,
but as far as we have no alternative for doing this, I think
option 3 is reasonable, and causes no problems, at least from
my practical programming experiences.

Best regards,

Michael
_______________________________________________
curry mailing list
curry_at_lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry
Received on Thu Jan 24 2002 - 16:21:54 CET

This archive was generated by hypermail 2.3.0 : Thu Sep 19 2019 - 07:15:05 CEST