skip to main content
research-article

Calculating threesomes, with blame

Published:25 September 2013Publication History
Skip Abstract Section

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.

References

  1. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  2. Robert Bruce Findler and Matthias Felleisen. Contracts for higher-order functions. In Int. Conf. on Functional Programming, October 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Fritz Henglein. Dynamic typing: syntax and proof theory. Science of Computer Programming, 22 (3): 197--230, June 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. David Herman, Aaron Tomb, and Cormac Flanagan. Space-efficient gradual typing. In Trends in Functional Prog., page XXVIII, April 2007.Google ScholarGoogle Scholar
  5. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  6. Jeremy Siek. Strong normalization for coercion calculi. Unpublished Manuscript, 2011.Google ScholarGoogle Scholar
  7. Jeremy Siek, 2011. Private Correspondence.Google ScholarGoogle Scholar
  8. Jeremy Siek and Walid Taha. Gradual typing for functional languages. In Proc. Scheme and Functional Programming Workshop, September 2006.Google ScholarGoogle Scholar
  9. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  10. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  11. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  12. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  13. 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 ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Calculating threesomes, with blame

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      • Published in

        cover image ACM SIGPLAN Notices
        ACM SIGPLAN Notices  Volume 48, Issue 9
        ICFP '13
        September 2013
        457 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/2544174
        Issue’s Table of Contents
        • cover image ACM Conferences
          ICFP '13: Proceedings of the 18th ACM SIGPLAN international conference on Functional programming
          September 2013
          484 pages
          ISBN:9781450323260
          DOI:10.1145/2500365

        Copyright © 2013 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 25 September 2013

        Check for updates

        Qualifiers

        • research-article

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!