Space-efficient gradual typing
Space-efficient gradual typing
复制标题
节省空间的渐进打字
DOI:
10.1007/s10990-011-9066-z
复制
发表时间:
2010
期刊:
影响因子:
--
通讯作者:
C. Flanagan
中科院分区:
文献类型:
--
作者:
David Herman;Aaron Tomb;C. Flanagan
Gradual type systems offer a smooth continuum between static and dynamic typing by permitting the free mixture of typed and untyped code. The runtime systems for these languages, and other languages with hybrid type checking, typically enforce function types by dynamically generating function proxies. This approach can result in unbounded growth in the number of proxies, however, which drastically impacts space efficiency and destroys tail recursion.We present a semantics for gradual typing that is based on coercions instead of function proxies, and which combines adjacent coercions at runtime to limit their space consumption. We prove bounds on the space consumed by coercions as well as soundness of the type system, demonstrating that programmers can safely mix typing disciplines without incurring unreasonable overheads. Our approach also detects certain errors earlier than prior work.