Skip to main content

The Blame Theorem for a Linear Lambda Calculus with Type Dynamic

  • Conference paper
Trends in Functional Programming (TFP 2012)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 7829))

Included in the following conference series:

Abstract

Scripting languages have renewed the interest in languages with dynamic types. For various reasons, realistic programs comprise dynamically typed components as well as statically typed ones. Safe and seamless interaction between these components is achieved by equipping the statically typed language with a type Dynamic and coercions that map between ordinary types and Dynamic. In such a gradual type system, coercions that map from Dynamic are checked at run time, throwing a blame exception on failure.

This paper enlightens a new facet of this interaction by considering a gradual type system for a linear lambda calculus with recursion and a simple kind of subtyping. Our main result is that linearity is orthogonal to gradual typing. The blame theorem, stating that the type coercions always blame the dynamically typed components, holds in a version analogous to the one proposed by Wadler and Findler, also the operational semantics of the calculus is given in a quite different way. The significance of our result comes from the observation that similar results for other calculi, e.g., affine lambda calculus, standard call-by-value and call-by-name lambda calculus, are straightforward to obtain from our results, either by simple modification of the proof for the affine case, or, for the latter two, by encoding them in the linear calculus.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Abadi, M., Cardelli, L., Pierce, B., Plotkin, G.: Dynamic typing in a statically typed language. ACM TOPLAS 13(2), 237–268 (1991)

    Article  Google Scholar 

  2. Abramsky, S.: Computational interpretations of linear logic. Theor. Comput. Sci 111(1&2), 3–57 (1993)

    Article  MathSciNet  MATH  Google Scholar 

  3. Alves, S., Fernández, M., Florido, M., Mackie, I.: Gödel’s system T revisited. Theoretical Computer Science 411(11-13), 1484–1500 (2010)

    Article  MathSciNet  MATH  Google Scholar 

  4. Benton, P.N., Bierman, G.M., de Paiva, V., Hyland, M.: A term calculus for intuitionistic linear logic. In: Bezem, M., Groote, J.F. (eds.) TLCA 1993. LNCS, vol. 664, pp. 75–90. Springer, Heidelberg (1993)

    Chapter  Google Scholar 

  5. Bierman, G., Meijer, E., Torgersen, M.: Adding dynamic types to C#. In: D’Hondt, T. (ed.) ECOOP 2010. LNCS, vol. 6183, pp. 76–100. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  6. Bierman, G.M., Pitts, A.M., Russo, C.V.: Operational properties of Lily, a polymorphic linear lambda calculus with recursion. Electr. Notes Theor. Comput. Sci. 41(3), 70–88 (2000)

    Article  Google Scholar 

  7. Caires, L., Pfenning, F.: Session types as intuitionistic linear propositions. In: Gastin, P., Laroussinie, F. (eds.) CONCUR 2010. LNCS, vol. 6269, pp. 222–236. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  8. Castagna, G. (ed.): ESOP 2009. LNCS, vol. 5502. Springer, Heidelberg (2009)

    Google Scholar 

  9. Girard, J.-Y.: Linear logic. Theoretical Computer Science 50, 1–102 (1987)

    Article  MathSciNet  MATH  Google Scholar 

  10. Henglein, F.: Dynamic typing: Syntax and proof theory. Science of Computer Programming 22, 197–230 (1994)

    Article  MathSciNet  MATH  Google Scholar 

  11. Herman, D., Tomb, A., Flanagan, C.: Space-efficient gradual typing. In: Trends in Functional Programming (TFP) (2007)

    Google Scholar 

  12. Matthews, J., Findler, R.B.: Operational semantics for multi-language programs. ACM TOPLAS 31, 12:1–12:44 (2009)

    Google Scholar 

  13. Palsberg, J. (ed.): Proc. 37th ACM Symp. POPL, Madrid, Spain. ACM Press (January 2010)

    Google Scholar 

  14. Siek, J.G., Taha, W.: Gradual typing for objects. In: Ernst, E. (ed.) ECOOP 2007. LNCS, vol. 4609, pp. 2–27. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  15. Siek, J.G., Garcia, R., Taha, W.: Exploring the design space of higher-order casts. In: Castagna [8], pp. 17–31

    Google Scholar 

  16. Siek, J.G., Taha, W.: Gradual typing for functional languages. In: Scheme and Functional Programming Workshop (September 2006)

    Google Scholar 

  17. Siek, J.G., Wadler, P.: Threesomes, with and without blame. In: Palsberg [13], pp. 365–376

    Google Scholar 

  18. Takeuchi, K., Honda, K., Kubo, M.: An interaction-based language and its typing system. In: Halatsis, C., Philokyprou, G., Maritsas, D., Theodoridis, S. (eds.) PARLE 1994. LNCS, vol. 817, pp. 398–413. Springer, Heidelberg (1994)

    Chapter  Google Scholar 

  19. Tov, J.A., Pucella, R.: Stateful contracts for affine types. In: Gordon, A.D. (ed.) ESOP 2010. LNCS, vol. 6012, pp. 550–569. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  20. Tov, J.A., Pucella, R.: Practical affine types. In: Proc. 38th ACM Symp. POPL, Austin, TX, USA, pp. 447–458. ACM Press (January 2011)

    Google Scholar 

  21. Turner, D.N., Wadler, P.: Operational interpretations of linear logic. Theoretical Computer Science 227(1-2), 231–248 (1999)

    Article  MathSciNet  MATH  Google Scholar 

  22. Wadler, P., Findler, R.B.: Well-typed programs can’t be blamed. In: Castagna [8], pp. 1–16

    Google Scholar 

  23. Wright, A., Felleisen, M.: A syntactic approach to type soundness. Information and Computation 115(1), 38–94 (1994)

    Article  MathSciNet  MATH  Google Scholar 

  24. Wrigstad, T., Nardelli, F.Z., Lebresne, S., Östlund, J., Vitek, J.: Integrating typed and untyped code in a scripting language. In: Palsberg [13], pp. 377–388

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Fennell, L., Thiemann, P. (2013). The Blame Theorem for a Linear Lambda Calculus with Type Dynamic. In: Loidl, HW., Peña, R. (eds) Trends in Functional Programming. TFP 2012. Lecture Notes in Computer Science, vol 7829. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-40447-4_3

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-40447-4_3

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-40446-7

  • Online ISBN: 978-3-642-40447-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics