Abstract
Two recent exciting trends in programming languages are gradual types and algebraic effect handlers. Several steps are required to bring algebraic effect handlers to wider use, one of the most important being the development of a suitable gradual type system.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Ahmed, A., Findler, R.B., Siek, J.G., Wadler, P.: Blame for all. In: Principles of Programming Languages (POPL) (2011)
Ahmed, A., Jamner, D., Siek, J.G., Wadler, P.: Theorems for free for free: parametricity, with and without types. Proc. ACM Program. Lang. (PACMPL) 1(ICFP), 1–28 (2017)
Atkey, R.: Parameterised notions of computation. In: Mathematically Structured Functional Programming (MSFP). BCS (2006)
Atkey, R.: Parameterised notions of computation. J. Funct. Program. 19(3–4), 335–376 (2009)
Bader, J., Aldrich, J., Tanter, É.: Gradual program verification. In: VMCAI 2018. LNCS, vol. 10747, pp. 25–46. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-73721-8_2
Schwerter, F.B., Garcia, R., Tanter, É.: A theory of gradual effect systems. In: International Conference on Functional Programming (ICFP), pp. 283–295. ACM (2014)
Bauer, A., Pretnar, M.: Programming with algebraic effects and handlers. J. Logical Algebraic Methods Program. 84(1), 108–123 (2015)
Bierman, G., Abadi, M., Torgersen, M.: Understanding typescript. In: Jones, R. (ed.) ECOOP 2014. LNCS, vol. 8586, pp. 257–281. Springer, Heidelberg (2014). https://doi.org/10.1007/978-3-662-44202-9_11
Bierman, G., Meijer, E., Torgersen, M.: Adding dynamic types to C\(\sharp \). In: D’Hondt, T. (ed.) ECOOP 2010. LNCS, vol. 6183, pp. 76–100. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-14107-2_5
Biernacki, D., Piróg, M., Polesiuk, P., Sieczkowski, F.: Binders by day, labels by night: effect instances via lexically scoped handlers. Proc. ACM Program. Lang. (PACMPL) 4(POPL), 48:1–48:29 (2020)
Castagna, G., Lanvin, V., Petrucciani, T., Siek, J.G.: Gradual typing: a new perspective. Proc. ACM Program. Lang. (PACMPL) 3(POPL), 16:1–16:32 (2019)
Chaudhuri, A., Vekris, P., Goldman, S., Roch, M., Levi, G.: Fast and precise type checking for JavaScript. Proc. ACM Program. Lang. (PACMPL) 1(OOPSLA), 48:1–48:30 (2017)
Siek, J., Taha, W.: Gradual typing for objects. In: Ernst, E. (ed.) ECOOP 2007. LNCS, vol. 4609, pp. 2–27. Springer, Heidelberg (2007). https://doi.org/10.1007/978-3-540-73589-2_2
Convent, L., Lindley, S., McBride, C., McLaughlin, C.: Encapsulating effects in Frank (2018)
Courant, N.: Safely typing algebraic effects (2018). http://gallium.inria.fr/blog/safely-typing-algebraic-effects/
Cousot, P., Cousot, R.: Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: Principles of Programming Languages (POPL), pp. 238–252 (1977)
Dolan, S.: Algebraic Subtyping. BCS, The Chartered Institute for IT (2017)
Dolan, S., Mycroft, A.: Polymorphism, subtyping, and type inference in MLsub. In: POPL (2017)
Eremondi, J., Tanter, É., Garcia, R.: Approximate normalization for gradual dependent types. Proc. ACM Program. Lang. (PACMPL) 3(ICFP) (2019)
Ernst, E., Møller, A., Schwarz, M., Strocco, F.: Message safety in dart. Sci. Comput. Program. 133, 51–73 (2017)
Filinski, A.: Representing monads. In: Principles of Programming Languages (POPL), pp. 446–457. ACM (1994)
Filinski, A.: Representing layered monads. In: Principles of Programming Languages (POPL), pp. 175–188. ACM (1999)
Findler, R.B., Felleisen, M.: Contracts for higher-order functions. In: International Conference on Functional Programming (ICFP), pp. 48–59. ACM, October 2002
Flanagan, C.: Hybrid type checking. In: Principles of Programming Languages (POPL), pp. 245–256. ACM, January 2006
Forster, Y., Kammar, O., Lindley, S., Pretnar, M.: On the expressive power of user-defined effects: effect handlers, monadic reflection, delimited control. Proc. ACM Program. Lang. (PACMPL) 1(ICFP), 13:1–13:29 (2017)
Garcia, R.: Calculating threesomes, with blame. In: International Conference on Functional Programming (ICFP) (2013)
Garcia, R., Clark, A.M., Tanter, É.: Abstracting gradual typing. In: Principles of Programming Languages (POPL), pp. 429–442. ACM (2016)
Gifford, D.K., Lucassen, J.M.: Integrating functional and imperative programming. In: LISP and Functional Programming, pp. 28–38. ACM (1986)
Greenman, B., Felleisen, M.: A spectrum of type soundness and performance. Proc. ACM Program. Lang. (PACMPL) 2(ICFP), 71:1–71:32 (2018)
Guha, A., Matthews, J., Findler, R.B., Krishnamurthi, S.: Relationally-parametric polymorphic contracts. In: Dynamic Languages Symposium (DLS), pp. 29–40 (2007)
Herman, D., Tomb, A., Flanagan, C.: Space-efficient gradual typing. In: Trends in Functional Programming (TFP) (2007)
Hillerström, D., Lindley, S.: Liberating effects with rows and handlers. In: Proceedings of the 1st International Workshop on Type-Driven Development, pp. 15–27. ACM (2016)
Hillerström, D., Lindley, S., Atkey, R., Sivaramakrishnan, K.C.: Continuation passing style for effect handlers. In: Formal Structures for Computation and Deduction (FSCD), vol. 84. LIPIcs, pp. 18:1–19. Schloss Dagstuhl (2017)
Igarashi, A., Thiemann, P., Vasconcelos, V.T., Wadler, P.: Gradual session types. Proc. ACM Program. Lang. (PACMPL) 1(ICFP), 38 (2017)
Kammar, O., Plotkin, G.D.: Algebraic foundations for effect-dependent optimisations. In: Principles of Programming Languages (POPL), pp. 349–360. ACM (2012)
Katsumata, S.-Y.: Parametric effect monads and semantics of effect systems. In: Principles of Programming Languages (POPL), pp. 633–646. ACM (2014)
King, D.J., Wadler, P.: Combining monads. In: Launchbury, J., Sansom, P. (eds.) Glasgow Workshop on Functional Programming, Workshops in Computing, pp. 134–143. Springer, London (1992). https://doi.org/10.1007/978-1-4471-3215-8_12
Leijen, D.: Type directed compilation of row-typed algebraic effects. In: Principles of Programming Languages (POPL), pp. 486–499. ACM, January 2017
Liang, S., Hudak, P., Jones, M.P.: Monad transformers and modular interpreters. In: Principles of Programming Languages (POPL), pp. 333–343. ACM (1995)
Lindley, S., McBride, C., McLaughlin, C.: Do be do be do. In: Principles of Programming Languages (POPL), pp. 500–514. ACM, January 2017
Marino, D., Millstein, T.: A generic type-and-effect system. In: Types in Language Design and Implementation (TLDI), pp. 39–50. ACM (2009)
Matthews, J., Findler, R.B.: Operational semantics for multi-language programs. In: Principles of Programming Languages (POPL), pp. 3–10 (2007)
McBride, C.: Shonky (2016). https://github.com/pigworker/shonky
Milner, R.: A theory of type polymorphism in programming. J. Comput. Syst. Sci. 17(3), 348–375 (1978)
Mitchell, J.C.: Coercion and type inference. In: Principles of Programming Languages (POPL), pp. 175–185. ACM (1984)
Moggi, E.: Computational lambda-calculus and monads. In: Symposium on Logic in Computer Science (LICS), pp. 14–23. IEEE (1989)
Moggi, E.: Notions of computation and monads. Inf. Comput. 93(1), 55–92 (1991)
Garrett Morris, J., McKinna, J.: Abstracting extensible data types: or, rows by any other name. Proc. ACM Program. Lang. (PACMPL) 3(POPL), 12 (2019)
New, M.S., Licata, D.R., Ahmed, A.: Gradual type theory. Proc. ACM Program. Lang. (PACMPL) 3(POPL), 15:1–15:31 (2019)
New, M.S., Jamner, D., Ahmed, A.: Graduality and parametricity: together again for the first time. Proc. ACM Program. Lang. (PACMPL) 4(POPL), 1–32 (2020)
Orchard, D., Wadler, P., Eades III, H.: Unifying graded and parameterised monads. In: Mathematically Structured Functional Programming (MSFP), vol. 317. EPTCS, pp. 18–38 (2020)
Orchard, D.A., Petricek, T., Mycroft, A.: The semantic marriage of monads and effects. CoRR, abs/1401.5391 (2014). http://arxiv.org/abs/1401.5391
Ou, X., Tan, G., Mandelbaum, Y., Walker, D.: Dynamic typing with dependent types. In: Levy, J.-J., Mayr, E.W., Mitchell, J.C. (eds.) TCS 2004. IIFIP, vol. 155, pp. 437–450. Springer, Boston, MA (2004). https://doi.org/10.1007/1-4020-8141-3_34
Plotkin, G., Power, J.: Semantics for algebraic operations. Electron. Notes Theoret. Comput. Sci. (ENTCS) 45, 332–345 (2001a)
Plotkin, G., Power, J.: Adequacy for algebraic effects. In: Honsell, F., Miculan, M. (eds.) FoSSaCS 2001. LNCS, vol. 2030, pp. 1–24. Springer, Heidelberg (2001). https://doi.org/10.1007/3-540-45315-6_1
Plotkin, G., Pretnar, M.: Handlers of algebraic effects. In: Castagna, G. (ed.) ESOP 2009. LNCS, vol. 5502, pp. 80–94. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-00590-9_7
Plotkin, G., Power, J.: Notions of computation determine monads. In: Nielsen, M., Engberg, U. (eds.) FoSSaCS 2002. LNCS, vol. 2303, pp. 342–356. Springer, Heidelberg (2002). https://doi.org/10.1007/3-540-45931-6_24
Plotkin, G.D., Power, J.: Algebraic operations and generic effects. Appl. Categ. Struct. 11(1), 69–94 (2003)
Plotkin, G.D., Pretnar, M.: A logic for algebraic effects. In: Symposium on Logic in Computer Science (LICS), pp. 118–129. IEEE (2008)
Reynolds, J.C.: Types, abstraction and parametric polymorphism. In: IFIP congress, vol. 83 (1983)
Schwerter, F.B., Garcia, R., Tanter, É.: Gradual type-and-effect systems. J. Funct. Program. 26 (2016)
Siek, J., Thiemann, P., Wadler, P.: Blame and coercion: together again for the first time. In: Programming Language Design and Implementation (PLDI) (2015a)
Jeremy G. Siek and Walid Taha. Gradual typing for functional languages. In: Scheme and Functional Programming Workshop (Scheme), pp. 81–92, September 2006
Siek, J.G., Wadler, P.: Threesomes, with and without blame. In: Principles of Programming Languages (POPL) (2010)
Siek, J.G., Vitousek, M.M., Cimini, M., Boyland, J.T.: Refined criteria for gradual typing. In: Summit on Advances in Programming Languages (SNAPL), vol. 32. LIPIcs, pp. 274–293. Schloss Dagstuhl (2015b)
Talpin, J.-P., Jouvelot, P.: The type and effect discipline. Inf. Comput. 111(2), 245–296 (1994)
Tobin-Hochstadt, S., Felleisen, M.: Interlanguage migration: from scripts to programs. In: Object-Oriented Programming: Systems, Languages, and Applications (OOPSLA), pp. 964–974. ACM (2006)
Tobin-Hochstadt, S., Felleisen, M.: The design and implementation of typed scheme. In: Principles of Programming Languages (POPL), pp. 395–406. ACM (2008)
Toro, M., Garcia, R., Tanter, É.: Type-driven gradual security with references. ACM Trans. Program. Lang. Syst. 40(4), 1–55 2018
Toro, M., Labrada, E., Tanter, É.: Gradual parametricity, revisited. Proc. ACM Program. Lang. (PACMPL) 3(POPL) (2019)
Verlaguet, J.: Facebook: analysing PHP statically. In: Workshop on Commercial Uses of Functional Programming (CUFP) (2013)
Vitousek, M.M., Swords, C., Siek, J.G.: Big types in little runtime: open-world soundness and collaborative blame for gradual type systems. In: Principles of Programming Languages (POPL), pp. 762–774. ACM (2017)
Wadler, P.: Theorems for free! In: Functional Programming Languages and Computer Architecture (FPCA) (1989)
Wadler, P.: Comprehending monads. In: LISP and Functional Programming, pp. 61–78. ACM (1990)
Wadler, P.: The essence of functional programming. In: Principles of Programming Languages (POPL), pp. 1–14. ACM (1992)
Wadler, P.: Monads and composable continuations. LISP Symb. Comput. 7(1), 39–56 (1994)
Wadler, P.: The marriage of effects and monads. In: International Conference on Functional Programming (ICFP), pp. 63–74. ACM (1998)
Wadler, P.: A complement to blame. In: Summit on Advances in Programming Languages (SNAPL), vol. 32. LIPIcs, pp. 309–320. Schloss Dagstuhl (2015)
Wadler, P., Findler, R.B.: Well-typed programs can’t be blamed. In: Castagna, G. (ed.) ESOP 2009. LNCS, vol. 5502, pp. 1–16. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-00590-9_1
Wadler, P., Thiemann, P.: The marriage of effects and monads. Trans. Comput. Logic (TOCL) 4(1), 1–32 (2003)
Wand, M.: Type inference for record concatenation and multiple inheritance. In: Symposium on Logic in Computer Science (LICS), pp. 92–97. IEEE (1989)
Wand, M.: Type inference for record concatenation and multiple inheritance. Inf. Comput. 93(1), 1–15 (1991)
Wright, A.K., Felleisen, M.: A syntactic approach to type soundness. Inf. Comput. 115(1), 38–94 (1994)
Zalewski, J., Mckinna, J., Garrett Morris, J., Wadler, P.: \(\lambda \)db: blame tracking at higher fidelity. In: Workshop on Gradual Typing (2020)
Zhang, Y., Myers, A.C.: Abstraction-safe effect handlers via tunneling. Proc. ACM Program. Lang. (PACMPL) 3(POPL), 5 (2019)
Zhang, Y., Salvaneschi, G., Beightol, Q., Liskov, B., Myers, A.C.: Accepting blame for safe tunneled exceptions. In: Programming Language Design and Implementation (PLDI), pp. 281–295. ACM (2016)
Acknowledgements
Philip Wadler acknowledges support from UK EPSRC programme grant EP/K034413/1 ABCD: A Basis for Concurrency and Distribution.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2021 Springer Nature Switzerland AG
About this paper
Cite this paper
Wadler, P. (2021). GATE: Gradual Effect Types. In: Margaria, T., Steffen, B. (eds) Leveraging Applications of Formal Methods, Verification and Validation. ISoLA 2021. Lecture Notes in Computer Science(), vol 13036. Springer, Cham. https://doi.org/10.1007/978-3-030-89159-6_21
Download citation
DOI: https://doi.org/10.1007/978-3-030-89159-6_21
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-89158-9
Online ISBN: 978-3-030-89159-6
eBook Packages: Computer ScienceComputer Science (R0)