Open housel opened 5 years ago
Wow, my past comes back to haunt me :-)
Hi @housel!
Has anyone got a rendered (PDF?) version of this? I'd never heard of 'lout' before today. If not I will try and download/run the program myself. Thanks!
The paper doesn't mention it, but I think it would make sense to unroll loops that contain dynamic dispatch once so that remaining iterations could take advantage of post-facto type constraints from the first iteration.
I stopped working on the paper after the conference (so please excuse its miserable quality), but I have a PDF. TidBits_ChineseDispatch.lout.pdf
In 2003, @ggreif proposed Post-Facto Type Inference https://github.com/dylan-hackers/www/blob/master/papers/PostFacto.lout as an optimization for constraining the types of values passed to generic functions. This optimization takes the fact that a GF call has succeeded as "evidence that the contract by types has been fulfilled," and infers the types of uses of these values dominated by the call site accordingly. A limited version of this optimization was implemented in the
d2c
compiler in 2003-2004.It may be worthwhile to implement this optimization in
dfmc-typist
as well.