CWS paper

Stephen Weeks MLton@sourcelight.com
Mon, 4 Dec 2000 15:46:06 -0800 (PST)


> Ok, so your example I translate to
> 
>     let fun f () = if ...
>                       then h ()
>                       else g ()
>         and g () = if ...
>                       then h ()
>                       else f ()
>         and h () = ...
>     in K (f ())
>     end
> 
> where I filled in something to make the calls actually be tail calls.
> 
> In  this  case,  if  you  do NOT contify f or g, then I don't see how you can
> contify h.  Would would it mean to do so since f and g each want  to  get  to
> it.

I agree.  You cannot contify h without contifying both f and g.  The problem
with your original analysis is h will not be contified because its continuation
set is the two element set
	{"return to f", "return to g"} 
Fixing the analysis so that f's, g's, and h's continuation set are all the
singleton {K} while getting all the previous examples is what I'm working on.