Dynamic typing: syntax and proof theory
ESOP'92 Selected papers of the symposium on Fourth European symposium on programming
Contracts for higher-order functions
Proceedings of the seventh ACM SIGPLAN international conference on Functional programming
Integrating typed and untyped code in a scripting language
Proceedings of the 37th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Extending Dylan's type system for better type inference and error detection
Proceedings of the 2010 international conference on Lisp
Hi-index | 0.00 |
The blame calculus of Wadler and Findler gives a high-level semantics to casts in higher-order languages. The coercion calculus of Henglein, on the other hand, provides an instruction set for casts whose normal forms ensure space efficiency. In this paper we address two questions: 1) can space efficiency be obtained in a high-level semantics? and 2) can we precisely characterize the relationship between the high and low-level semantics of casts? Towards answering both of these questions, we design a cast calculus that summarizes a sequence of casts as a threesome cast that contains a source type, a target type, and a third middle type that is the greatest lower bound of all the types in the sequence. We show that the threesome calculus is equivalent to the blame calculus and to one of the coercion-based, blame-tracking calculi of Siek, Garcia, and Taha. We also show that the threesome calculus is space efficient and obtain a tighter bound than that of Herman, Tomb, and Flanagan.