Re: Strong encapsulation, weak encapsulation, and getSearchTree

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

Hi Wolfgang,

The VM being developed at PSU, see

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.


curry mailing list
Received on Mo Jun 14 2004 - 17:33:46 CEST

This archive was generated by hypermail 2.3.0 : Do Jun 13 2024 - 07:15:06 CEST