Re: Strong encapsulation, weak encapsulation, and getSearchTree

From: Sergio Antoy <antoy_at_cs.pdx.edu>
Date: Mon, 14 Jun 2004 08:21:41 -0700

Hi Wolfgang,

The VM being developed at PSU, see

    http://redstar.cs.pdx.edu/~jimeng/project/

has indeed a clone operation (in the class Term) exactly for the
purpose you discuss. There is a problem, though. Since the order
of evaluation is somewhat undetermined, when you clone a term t,
you do not know how much t has already been evaluated. E.g., in

   let x = coin; y = clone x in y `seq` x + y

an interpreter or compiler could evaluate x before cloning it
and thus y would be a clone of either 0 or 1.

There is also a dual viewpoint to your proposal. One could throw
away the call time choice semantics in favor of pure narrowing and
then introduce a function share. This seems equivalent to your
proposal and perhaps it is equally reasonable.

Sergio

_______________________________________________
curry mailing list
curry_at_lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry
Received on Mo Jun 14 2004 - 17:33:46 CEST

This archive was generated by hypermail 2.3.0 : Do Apr 25 2024 - 07:15:07 CEST