Abstract
Bringing the benefits of gradual typing to a language with parametric polymorphism like System F, while preserving relational parametricity, has proven extremely challenging: first attempts were formulated a decade ago, and several designs have been recently proposed, with varying syntax, behavior, and properties. Starting from a detailed review of the challenges and tensions that affect the design of gradual parametric languages, this work presents an extensive account of the semantics and metatheory of GSF, a gradual counterpart of System F. In doing so, we also report on the extent to which the Abstracting Gradual Typing methodology can help us derive such a language. Among gradual parametric languages that follow the syntax of System F, GSF achieves a unique combination of properties. We clearly establish the benefits and limitations of the language, and discuss several extensions of GSF towards a practical programming language.
- 1991. Dynamic typing in a statically typed language. ACM Transactions on Programming Languages and Systems 13, 2 (
April 1991), 237–268.Google ScholarDigital Library . - 1995. Dynamic typing in polymorphic languages. Journal of Functional Programming 5, 1 (1995), 111–130.Google ScholarCross Ref .
- 2006. Step-indexed syntactic logical relations for recursive and quantified types. In Proceedings of the 15th European Symposium on Programming Languages and Systems (ESOP 2006) (Lecture Notes in Computer Science), (Ed.), Vol. 3924. Springer-Verlag, Vienna, Austria, 69–83.Google ScholarDigital Library .
- 2009a. State-dependent representation independence. In Proceedings of the 36th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 2009). ACM Press, Savannah, GA, USA, 340–353.Google ScholarDigital Library .
- 2009b. Blame for all. In Workshop on Script to Program Evolution (STOP). Genova, Italy.Google Scholar .
- 2011. Blame for all. In Proceedings of the 38th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 2011). ACM Press, Austin, Texas, USA, 201–214.Google ScholarDigital Library .
- 2017. Theorems for free for free: Parametricity, with and without types. See ICFP 2017 [2017], 39:1–39:28.Google Scholar .
- 2020. Reconciling noninterference and gradual typing. In Proceedings of the 2020 Symposium on Logic in Computer Science (LICS 2020).Google ScholarDigital Library .
- 2018. Gradual program verification. In Proceedings of the 19th International Conference on Verification, Model Checking, and Abstract Interpretation (VMCAI 2018) (Lecture Notes in Computer Science), and (Eds.), Vol. 10747. Springer-Verlag, Los Angeles, CA, USA, 25–46.Google ScholarCross Ref .
- 2014. A theory of gradual effect systems. In Proceedings of the 19th ACM SIGPLAN Conference on Functional Programming (ICFP 2014). ACM Press, Gothenburg, Sweden, 283–295.Google Scholar .
- 2016. Gradual type-and-effect systems. Journal of Functional Programming 26 (
Sept. 2016), 19:1–19:69.Google Scholar . - 2010. Adding dynamic types to C\( ^{\#} \). In Proceedings of the 24th European Conference on Object-oriented Programming (ECOOP 2010) (Lecture Notes in Computer Science), (Ed.). Springer-Verlag, Maribor, Slovenia, 76–100.Google Scholar .
- 2016. Proceedings of the 43rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 2016). ACM Press, St. Petersburg, FL, USA.Google Scholar and (Eds.).
- 1991. Soft typing. In Proceedings of the ACM SIGPLAN International Conference on Programming Language Design and Implementation (PLDI). Toronto, Ontario, Canada, 278–292.Google ScholarDigital Library .
- 2017. Gradual typing with union and intersection types. See ICFP 2017 [2017], 41:1–41:28.Google Scholar .
- 2016. The gradualizer: A methodology and algorithm for generating gradual type systems, See Bodík and Majumdar [2016], 443–455.Google Scholar .
- 1972. Combinatory Logic, Volume II.
Studies in logic and the foundations of mathematics , Vol. 65. North-Holland Pub. Co.Google Scholar . - 1982. Principal type-schemes for functional programs. In Proceedings of the 9th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 1982). ACM Press, New York, NY, USA, 207–212.
DOI: Google ScholarDigital Library . - 2018. Parametricity versus the universal type. Proceedings of the ACM on Programming Languages 2, POPL (
Jan. 2018), 38:1–38:23.Google ScholarDigital Library . - 2011. Gradual information flow typing. In International Workshop on Scripts to Programs.Google Scholar .
- 2019. Approximate normalization for gradual dependent types. Proceedings of the ACM on Programming Languages 3, ICFP (
Aug. 2019), 88:1–88:30.Google ScholarDigital Library . - 2013. Gradual security typing with references. In Proceedings of the 26th Computer Security Foundations Symposium (CSF). 224–239.Google ScholarDigital Library .
- 2016. LJGS: Gradual security types for object-oriented languages. In Proceedings of the 30th European Conference on Object-Oriented Programming (ECOOP 2016) (Leibniz International Proceedings in Informatics (LIPIcs)), and (Eds.), Vol. 56. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik, Rome, Italy, 9:1–9:26.Google Scholar .
- 2016. Abstracting gradual typing. See Bodík and Majumdar [2016], 429–442. See erratum https://www.cs.ubc.ca/rxg/agt-erratum.pdf.Google Scholar .
- 2015. Deriving a Simple Gradual Security Language.
eprint arXiv:1511.01399. Google Scholar . - 2014. Foundations of typestate-oriented programming. ACM Transactions on Programming Languages and Systems 36, 4, Article
12 (Oct. 2014), 12:1–12:44 pages.Google ScholarDigital Library . - 1972. Interprétation Fonctionnelle et Élimination des Coupures de l’Arithmétique d’Ordre Supérieur. Ph.D. Dissertation. Université de Paris VII, Paris, France.Google Scholar .
- 2007. Relationally-parametric polymorphic contracts. In Proceedings of the ACM Dynamic Languages Symposium (DLS 2007). ACM Press, Montreal, Canada, 29–40.Google ScholarDigital Library .
- 2012. Practical Foundations for Programming Languages. Cambridge University Press.Google ScholarDigital Library .
- 2010. Space-efficient gradual typing. Higher-Order and Symbolic Computation 23, 2 (
June 2010), 167–189.Google ScholarDigital Library . - 2016. Correctness of compiling polymorphism to dynamic typing. Journal of Functional Programming 27 (2016), 1:1–1:24.Google Scholar .
- 2017.Google Scholar
- 2017b. Gradual session types. See ICFP 2017 [2017], 38:1–38:28.Google Scholar .
- 2017a. On polymorphic gradual typing. See ICFP 2017 [2017], 40:1–40:29.Google Scholar .
- 2011. Gradual typing for generics. In Proceedings of the 26th ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA 2011). ACM Press, Portland, Oregon, USA, 609–624.Google ScholarDigital Library .
- 2021. Fully abstract from static to gradual. Proceedings of the ACM on Programming Languages 5, POPL (
Jan. 2021), 7:1–7:30.Google ScholarDigital Library . - 2022. Plausible sealing for gradual parametricity. Proceedings of the ACM on Programming Languages 6, OOPSLA1 (
April 2022), 70:1–70:28.Google ScholarDigital Library . - 2017. Gradual refinement types. In Proceedings of the 44th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 2017). ACM Press, Paris, France, 775–788.Google ScholarDigital Library .
- 1991. Dynamics in ML. In Proceedings of the Conference on Functional Programming Languages and Computer Architecture (FPCA 1991) (Lecture Notes in Computer Science), Vol. 523. Springer-Verlag, 406–426.Google ScholarCross Ref .
- 1999. Call-by-push-value: A subsuming paradigm. In 4th International Conference on Typed Lambda Calculi and Applications (TLCA’99) (Lecture Notes in Computer Science), (Ed.), Vol. 1581. Springer-Verlag, 228–242.Google ScholarCross Ref .
- 2008. Parametric polymorphism through run-time sealing, or, theorems for low, low prices!. In Proceedings of the 17th European Symposium on Programming Languages and Systems (ESOP 2008) (Lecture Notes in Computer Science), (Ed.), Vol. 4960. Springer-Verlag, Budapest, Hungary, 16–31.Google ScholarCross Ref .
- 2007. Operational semantics for multi-language programs. In Proceedings of the 34th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 2007). ACM Press, Nice, France, 3–10.Google ScholarDigital Library .
- 1988. Polymorphic type inference and containment. Information and Computation 76, 2-3 (
Feb. 1988), 211–249.Google ScholarDigital Library . - 1988. Abstract types have existential type. ACM Transactions on Programming Languages and Systems 10, 3 (
July 1988), 470–502.DOI: Google ScholarDigital Library . - 1973. Protection in programming languages. Commun. ACM 16, 1 (
Jan. 1973), 15–21.Google ScholarDigital Library . - 2009. Non-parametric parametricity. In Proceedings of the 14th ACM SIGPLAN Conference on Functional Programming (ICFP 2009). ACM Press, Edinburgh, Scotland, UK, 135–148.Google ScholarDigital Library .
- 2018. Graduality from Embedding-Projection Pairs. 73:1–73:30 pages.Google Scholar .
- 2020. Graduality and parametricity: Together again for the first time. Proceedings of the ACM on Programming Languages 4, POPL (
Jan. 2020), 46:1–46:32.Google ScholarDigital Library . - 1996. Putting type annotations to work. In Proceedings of the 23rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 96). ACM Press, St. Petersburg Beach, Florida, USA, 54–67.Google ScholarDigital Library .
- 2021. Oxford Advanced Learner’s Dictionary (10th ed.). Oxford University Press.
Evidence. Google Scholar . - 2000. Relating Cryptography and Polymorphism. Manuscript.Google Scholar .
- 2002. Types and Programming Languages. MIT Press, Cambridge, MA, USA.Google ScholarDigital Library .
- 2012. The ins and outs of gradual type inference. In Proceedings of the 39th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 2012). ACM Press, Philadelphia, USA, 481–494.Google ScholarDigital Library .
- 1974. Towards a theory of type structure. In Proceedings of the Programming Symposium (Lecture Notes in Computer Science), Vol. 19. Springer-Verlag, 408–423.Google ScholarCross Ref .
- 1983. Types, abstraction, and parametric polymorphism. In Information Processing 83, (Ed.). Elsevier, 513–523.Google Scholar .
- 2003. Generativity and dynamic opacity for abstract types. In Proceedings of the 5th ACM SIGPLAN Conference on Principles and Practice of Declarative Programming (PPDP 2003). 241–252.Google ScholarDigital Library .
- 2012. Gradual ownership types. In Proceedings of the 21st European Symposium on Programming Languages and Systems (ESOP 2012) (Lecture Notes in Computer Science), (Ed.), Vol. 7211. Springer-Verlag, Tallinn, Estonia, 579–599.Google ScholarDigital Library .
- 2006. Gradual typing for functional languages. In Proceedings of the Scheme and Functional Programming Workshop. 81–92.Google Scholar .
- 2007. Gradual typing for objects. In Proceedings of the 21st European Conference on Object-oriented Programming (ECOOP 2007) (Lecture Notes in Computer Science), (Ed.). Springer-Verlag, Berlin, Germany, 2–27.Google ScholarDigital Library .
- 2010. Threesomes, with and without blame. In Proceedings of the 37th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 2010). ACM Press, Madrid, Spain, 365–376.Google ScholarDigital Library .
- 2015a. Refined criteria for gradual typing. In 1st Summit on Advances in Programming Languages (SNAPL 2015) (Leibniz International Proceedings in Informatics (LIPIcs)), Vol. 32. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik, Asilomar, California, USA, 274–293.Google Scholar .
- 2015b. Monotonic references for efficient gradual typing. In Proceedings of the 24th European Symposium on Programming Languages and Systems (ESOP 2015) (Lecture Notes in Computer Science), (Ed.), Vol. 9032. Springer-Verlag, London, UK, 432–456.Google ScholarDigital Library .
- 2016. The Key to Blame: Gradual Typing Meets Cryptography.
Unpublished manuscript. Google Scholar . - 2004. A bisimulation for dynamic sealing. In Proceedings of the 31st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 2005). ACM Press, Venice, Italy, 161–172.Google ScholarDigital Library .
- 2006. Interlanguage migration: From scripts to programs. In Proceedings of the ACM Dynamic Languages Symposium (DLS 2006). ACM Press, Portland, Oregon, USA, 964–974.Google ScholarDigital Library .
- 2018. Type-driven gradual security with references. ACM Transactions on Programming Languages and Systems 40, 4 (
Nov. 2018), 16:1–16:55.Google ScholarDigital Library . - 2019. Gradual parametricity, revisited. Proceedings of the ACM on Programming Languages 3, POPL (
Jan. 2019), 17:1–17:30.Google ScholarDigital Library . - 2017. A gradual interpretation of union types. In Proceedings of the 24th Static Analysis Symposium (SAS 2017) (Lecture Notes in Computer Science), Vol. 10422. Springer-Verlag, New York City, NY, USA, 382–404.Google ScholarCross Ref .
- 2020. Abstracting gradual references. Science of Computer Programming 197 (
Oct. 2020), 1–65.Google ScholarCross Ref . - 1989. Theorems for free!. In Proceedings of the Fourth International Conference on Functional Programming Languages and Computer Architecture (FPCA’89). ACM, London, United Kingdom, 347–359.Google ScholarDigital Library .
- 2017. Abstract data types without the types. Journal of Universal Computer Science 23, 1 (2017), 5–20.Google Scholar .
- 2009. Well-typed programs can’t be blamed. In Proceedings of the 18th European Symposium on Programming Languages and Systems (ESOP 2009) (Lecture Notes in Computer Science), (Ed.), Vol. 5502. Springer-Verlag, York, UK, 1–16.Google ScholarDigital Library .
- 2020. Gradual verification of recursive heap data structures. Proceedings of the ACM on Programming Languages 4, OOPSLA (
Nov. 2020), 228:1–228:28.Google ScholarDigital Library . - 2011. Gradual typestate. In Proceedings of the 25th European Conference on Object-oriented Programming (ECOOP 2011) (Lecture Notes in Computer Science), (Ed.), Vol. 6813. Springer-Verlag, Lancaster, UK, 459–483.Google ScholarCross Ref .
- 2018. Consistent subtyping for all. In Proceedings of the 27th European Symposium on Programming Languages and Systems (ESOP 2018) (Lecture Notes in Computer Science), (Ed.), Vol. 10801. Springer-Verlag, Thessaloniki, Greece, 3–30.Google ScholarCross Ref .
Index Terms
- Gradual System F
Recommendations
Gradual parametricity, revisited
Bringing the benefits of gradual typing to a language with parametric polymorphism like System F, while preserving relational parametricity, has proven extremely challenging: first attempts were formulated a decade ago, and several designs were recently ...
Graduality and parametricity: together again for the first time
Parametric polymorphism and gradual typing have proven to be a difficult combination, with no language yet produced that satisfies the fundamental theorems of each: parametricity and graduality. Notably, Toro, Labrada, and Tanter (POPL 2019) conjecture ...
On polymorphic gradual typing
We study an extension of gradual typing—a method to integrate dynamic typing and static typing smoothly in a single language—to parametric polymorphism and its theoretical properties, including conservativity of typing and semantics over both statically ...
Comments