Abstract
Coercions and threesomes both enable a language to combine static and dynamic types while avoiding cast-based space leaks. Coercion calculi elegantly specify space-efficient cast behavior, even when augmented with blame tracking, but implementing their semantics directly is difficult. Threesomes, on the other hand, have a straightforward recursive implementation, but endowing them with blame tracking is challenging. In this paper, we show that you can use that elegant spec to produce that straightforward implementation: we use the coercion calculus to derive threesomes with blame. In particular, we construct novel threesome calculi for blame tracking strategies that detect errors earlier, catch more errors, and reflect an intuitive conception of safe and unsafe casts based on traditional subtyping.
- Amal Ahmed, Robert Bruce Findler, Jeremy Siek, and Philip Wadler. Blame for all. In Proc. Symposium on Principles of Programming Languages, POPL '11, pages 201--214, New York, NY, USA, 2011. ACM.Google Scholar
Digital Library
- Robert Bruce Findler and Matthias Felleisen. Contracts for higher-order functions. In Int. Conf. on Functional Programming, October 2002. Google Scholar
Digital Library
- Fritz Henglein. Dynamic typing: syntax and proof theory. Science of Computer Programming, 22 (3): 197--230, June 1994. Google Scholar
Digital Library
- David Herman, Aaron Tomb, and Cormac Flanagan. Space-efficient gradual typing. In Trends in Functional Prog., page XXVIII, April 2007.Google Scholar
- Jacob Matthews and Robert Bruce Findler. Operational semantics for multi-language programs. ACM Trans. Program. Lang. Syst., 31 (3): 12:1--12:44, April 2009. Google Scholar
Digital Library
- Jeremy Siek. Strong normalization for coercion calculi. Unpublished Manuscript, 2011.Google Scholar
- Jeremy Siek, 2011. Private Correspondence.Google Scholar
- Jeremy Siek and Walid Taha. Gradual typing for functional languages. In Proc. Scheme and Functional Programming Workshop, September 2006.Google Scholar
- Jeremy Siek and Walid Taha. Gradual typing for objects. In Proc. European Conference on Object-Oriented Programming, ECOOP '07, pages 2--27, Berlin, 2007. Springer-Verlag. Google Scholar
Digital Library
- Jeremy Siek and Philip Wadler. Threesomes, with and without blame. In Proc. Symposium on Principles of Programming Languages, POPL '10, pages 365--376, New York, NY, USA, 2010. ACM. Google Scholar
Digital Library
- Jeremy Siek, Ronald Garcia, and Walid Taha. Exploring the design space of higher-order casts. In Proc. European Symposium on Programming Languages, ESOP '09, pages 17--31, Berlin, 2009. Springer-Verlag. Google Scholar
Digital Library
- Sam Tobin-Hochstadt and Matthias Felleisen. Interlanguage migration: from scripts to programs. In Companion to Symposium on Object-oriented Programming Systems, Languages, and Applications, OOPSLA '06, pages 964--974, New York, 2006. ACM. Google Scholar
Digital Library
- Philip Wadler and Robert Bruce Findler. Well-typed programs can't be blamed. In Proc. European Symposium on Programming Languages, ESOP '09, pages 1--16, Berlin, 2009. Springer-Verlag. Google Scholar
Digital Library
Index Terms
Calculating threesomes, with blame
Recommendations
Calculating threesomes, with blame
ICFP '13: Proceedings of the 18th ACM SIGPLAN international conference on Functional programmingCoercions and threesomes both enable a language to combine static and dynamic types while avoiding cast-based space leaks. Coercion calculi elegantly specify space-efficient cast behavior, even when augmented with blame tracking, but implementing their ...
Threesomes, with and without blame
POPL '10How to integrate static and dynamic types? Recent work focuses on casts to mediate between the two. However, adding casts may degrade tail calls into a non-tail calls, increasing space consumption from constant to linear in the depth of calls.
We ...
Blame for all
POPL '11: Proceedings of the 38th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languagesSeveral programming languages are beginning to integrate static and dynamic typing, including Racket (formerly PLT Scheme), Perl 6, and C# 4.0 and the research languages Sage (Gronski, Knowles, Tomb, Freund, and Flanagan, 2006) and Thorn (Wrigstad, ...







Comments