Let me clarify a bit exactly how Gustavsson and Sands (I'll refer to them as GS) handled the issue of the Wadler space leak. It's true that they adopted an approach similar to Sparud in that they extended their core calculus with a new language construct which could solve the problem. This is contrast to Wadler who changed the garbage collector instead, something that GS said would lead to bad behavior in their calculus.
On 8 November 2010 13:28, Simon Marlow <marlowsd@gmail.com> wrote:This proposal is mentioned favourably by Jörgen Gustavsson David Sands
>
> There's another approach in Jan Sparud's paper here:
>
> http://portal.acm.org/citation.cfm?id=165196
>
> although it's not clear that this interacts very well with inlining either,
> and it has a suspicious-looking side-effecting operation. It also looks
> like it creates a circular reference between the thunk and the selectors,
> which might hinder optimisations, and would probably also make things slower
> (by adding extra free variables to the thunk).
in [1] (see section 6, case study 6). They mention that there is a
formalisation in Gustavsson's thesis [2]. That may say something about
inlining, since that's just the kind of transformation they'd want to
show is a space improvement.
[1]: Possibilities and Limitations of Call-by-Need Space Improvement (2001)
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.8.4097
[2]: Space-Safe Transformations and Usage Analysis for Call-by-Need
Languages (2001)
(which I cannot immediately find online)
Duncan
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users