[clean-list] Re: lazy dynamics

Martijn Vervoort martijnv@cs.kun.nl
Tue, 8 Oct 2002 09:34:10 +0200


Hi Erik,

> Hi Clean,
>
> I read the recent paper about lazy dynamics. Amazing stuff. If I
understood it correctly, dynamics are now able to point inside other
dynamics, skipping the type pattern matching mechanism.

The paper is in preparation. I don't understand what you mean by 'skipping
the type pattern matching
mechanism'. An expression from a dynamic can only be used after a dynamic
pattern match.

>
> I wonder if you can do that safely though. Files are still files and they
could be from any source. So if one dynamic expects to be pointing at an
object of type, say, Real, how can it ever be sure that that is still the
case at runtime?

The dynamic run-time system guarantees that by storing the actual dynamics
in a hidden directory which the user
is not supposed to touch. The dynamics which the user sees are merely links
to the actual dynamics. All file
operations apply to user dynamics.

In addition the intergrity of a (lazy) dynamic can be checked at run-time.
>
> Also, I suspect that these pointers inside dynamics create a garbage
collection problem. If one file points inside another, who is going to
decide when to delete the latter? And how is the user prevented from
deleting a file anyway?
>
Yes, garbage collection of dynamics is an issue. The dynamic run-time system
looks up all dynamic applications
and dynamics from some specified root. The dynamics not reachable from these
dynamics are deleted.

> By the way, I assumed that pointers from dynamics to dynamics can go from
one file to another. Maybe the problems would not be so serious if pointers
should all be within one file.

The problems are not that serious: a garbage collector and some tools solve
the problem. The advantage is that
sharing on disk is preserved. In addition run-time efficiency is increased.

Pointers within one file would another alternative. You then have a kind of
'self-contained' dynamic. We are
aware of this.

For more details see the paper which will be available from our website.

>
> Regards Erik Zuurbier
With kind regards,
Martijn Vervoort