Abstract
What is a good gradual language? Siek et al. have previously proposed the refined criteria, a set of formal ideas that characterize a range of guarantees typically expected from a gradual language. While these go a long way, they are mostly focused on syntactic and type safety properties and fail to characterize how richer semantic properties and reasoning principles that hold in the static language, like non-interference or parametricity for instance, should be upheld in the gradualization.
In this paper, we investigate and argue for a new criterion previously hinted at by Devriese et al.: the embedding from the static to the gradual language should be fully abstract. Rather than preserving an arbitrarily chosen interpretation of source language types, this criterion requires that all source language equivalences are preserved. We demonstrate that the criterion weeds out erroneous gradualizations that nevertheless satisfy the refined criteria. At the same time, we demonstrate that the criterion is realistic by reporting on a mechanized proof that the property holds for a standard example: GTLCµ, the natural gradualization of STLCµ, the simply typed lambda-calculus with equirecursive types. We argue thus that the criterion is useful for understanding, evaluating, and guiding the design of gradual languages, particularly those which are intended to preserve source language guarantees in a rich way.
- Martín Abadi. 1998. Protection in Programming-Language Translations: Mobile Object Systems. In European Conference on Object-Oriented Programming (Lecture Notes in Computer Science). Springer Berlin Heidelberg, 291-291. https: //doi.org/10.1007/3-540-49255-0_70 Google Scholar
Cross Ref
- Martín Abadi. 1999. Protection in Programming-Language Translations. In Secure Internet Programming. Springer-Verlag. https://doi.org/10.1007/BFb0055109 Google Scholar
Cross Ref
- Carmine Abate, Roberto Blanco, Deepak Garg, Catalin Hritcu, Marco Patrignani, and Jérémy Thibault. 2019. Journey Beyond Full Abstraction: Exploring Robust Property Preservation for Secure Compilation. In Computer Security Foundations Symposium. https://doi.org/10.1109/CSF. 2019.00025 Google Scholar
Cross Ref
- Amal Ahmed, Robert Bruce Findler, Jeremy G. Siek, and Philip Wadler. 2011a. Blame for All. In Proceedings of the 38th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (Austin, Texas, USA) ( POPL '11). Association for Computing Machinery, New York, NY, USA, 201-214. https://doi.org/10.1145/1926385.1926409 Google Scholar
Digital Library
- Amal Ahmed, Dustin Jamner, Jeremy G. Siek, and Philip Wadler. 2017. Theorems for Free for Free: Parametricity, with and without Types. Proceedings of the ACM on Programming Languages 1, ICFP (Aug. 2017 ), 39 : 1-39 : 28. https: //doi.org/10.1145/3110283 Google Scholar
Digital Library
- Amal Ahmed, Lindsey Kuper, and Jacob Matthews. 2011b. Parametric polymorphism through run-time sealing, or, Theorems for low, low prices ! http://www.ccs.neu.edu/home/amal/papers/paramseal-tr.pdfGoogle Scholar
- Andrew W Appel and David McAllester. 2001. An indexed model of recursive types for foundational proof-carrying code. ACM Transactions on Programming Languages and Systems (TOPLAS) 23, 5 ( 2001 ), 657-683. https://doi.org/10.1007/978-3-642-00590-9_1 Google Scholar
Digital Library
- Felipe Bañados Schwerter, Ronald Garcia, and Éric Tanter. 2014. A Theory of Gradual Efect Systems. In Proceedings of the 19th ACM SIGPLAN International Conference on Functional Programming (ICFP '14). Association for Computing Machinery, 283-295. https://doi.org/10.1145/2628136.2628149 Google Scholar
Digital Library
- Dominique Devriese, Marco Patrignani, and Frank Piessens. 2016. Fully-abstract compilation by approximate back-translation. In ACM SIGPLAN Notices, Vol. 51. ACM, 164-177. https://doi.org/10.1145/2837614.2837618 Google Scholar
Digital Library
- Dominique Devriese, Marco Patrignani, and Frank Piessens. 2017a. Parametricity versus the universal type. Proceedings of the ACM on Programming Languages 2, POPL ( 2017 ), 38. https://doi.org/10.1145/3158126 Google Scholar
Digital Library
- Dominique Devriese, Marco Patrignani, and Frank Piessens. 2020. Two Parametricities versus Three Universal Types. ( 2020 ). http://soft.vub.ac.be/~dodevrie/poly-seal-no-j-201910.pdf Submitted to the Journal of the ACM.Google Scholar
- Dominique Devriese, Marco Patrignani, Frank Piessens, and Steven Keuchel. 2017b. Modular, Fully-Abstract Compilation by Approximate Back-Translation. Logical Methods in Computer Science 13, 4 lmcs:4011 (Oct. 2017 ). https://doi.org/10. 23638/LMCS-13 ( 4 :2) 2017 arXiv: 1703.09988 [cs.PL] Google Scholar
Cross Ref
- D. Dreyer, A. Ahmed, and L. Birkedal. 2009. Logical Step-Indexed Logical Relations. In 2009 24th Annual IEEE Symposium on Logic In Computer Science. 71-80. https://doi.org/10.1109/LICS. 2009.34 Google Scholar
Digital Library
- Dan Frumin, Robbert Krebbers, and Lars Birkedal. 2018. ReLoC: A mechanised relational logic for fine-grained concurrency. In Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science. 442-451. https://doi.org/10.1145/ 3209108.3209174 Google Scholar
Digital Library
- Ronald Garcia, Alison M Clark, and Éric Tanter. 2016. Abstracting gradual typing. In ACM SIGPLAN Notices, Vol. 51. ACM, 429-442. https://doi.org/10.1145/2914770.2837670 Google Scholar
Digital Library
- Ronald Garcia and Éric Tanter. 2015. Deriving a Simple Gradual Security Language. arXiv preprint arXiv:1511.01399 ( 2015 ).Google Scholar
- Ronald Garcia and Éric Tanter. 2020. Gradual Typing as if Types Mattered. ( 2020 ). Workshop on Gradual Typing.Google Scholar
- Michael Greenberg. 2019. The Dynamic Practice and Static Theory of Gradual Typing. In Summit on Advances in Programming Languages (SNAPL) (Leibniz International Proceedings in Informatics (LIPIcs), Vol. 136 ), Benjamin S. Lerner, Rastislav Bodík, and Shriram Krishnamurthi (Eds.). Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik, Dagstuhl, Germany, 6 : 1-6 : 20. https://doi.org/10.4230/LIPIcs.SNAPL. 2019.6 Google Scholar
Cross Ref
- Ben Greenman, Matthias Felleisen, and Christos Dimoulas. 2019. Complete Monitors for Gradual Types. Proceedings of the ACM on Programming Languages 3, OOPSLA (Oct. 2019 ), 122 : 1-122 : 29. https://doi.org/10.1145/3360548 Google Scholar
Digital Library
- Atsushi Igarashi, Peter Thiemann, Yuya Tsuda, Vasco T. Vasconcelos, and Philip Wadler. 2019. Gradual Session Types. Journal of Functional Programming 29 ( 2019 ). https://doi.org/10.1017/S0956796819000169 Google Scholar
Cross Ref
- Ralf Jung, Robbert Krebbers, Jacques-Henri Jourdan, Aleš Bizjak, Lars Birkedal, and Derek Dreyer. 2018. Iris from the ground up: A modular foundation for higher-order concurrent separation logic. Journal of Functional Programming 28 ( 2018 ).Google Scholar
- Jacob Matthews and Amal Ahmed. 2008. Parametric Polymorphism through Run-Time Sealing or, Theorems for Low, Low Prices! LNCS, Vol. 4960. 16-31. https://doi.org/10.1007/978-3-540-78739-6_2 Google Scholar
Cross Ref
- Max S New, William J Bowman, and Amal Ahmed. 2016. Fully abstract compilation via universal embedding. In ACM SIGPLAN Notices, Vol. 51. ACM, 103-116. https://doi.org/10.1145/3022670.2951941 Google Scholar
Digital Library
- Max S. New, Dustin Jamner, and Amal Ahmed. 2019. Graduality and Parametricity: Together Again for the First Time. Proceedings of the ACM on Programming Languages 4, POPL (Dec. 2019 ), 46 : 1-46 : 32. https://doi.org/10.1145/3371114 Google Scholar
Digital Library
- Joachim Parrow. 2008. Expressiveness of Process Algebras. Elec. Not. Theo. Comp. Sci. 209, 0 ( 2008 ), 173-186. https: //doi.org/10.1016/j.entcs. 2008. 04.011 Google Scholar
Digital Library
- Marco Patrignani, Pieter Agten, Raoul Strackx, Bart Jacobs, Dave Clarke, and Frank Piessens. 2015. Secure Compilation to Protected Module Architectures. ACM Trans. Program. Lang. Syst. 37, 2 (April 2015 ), 6 : 1-6 : 50. https://doi.org/10.1145/ 2699503 Google Scholar
Digital Library
- Marco Patrignani, Amal Ahmed, and Dave Clarke. 2019a. Formal Approaches to Secure Compilation: A Survey of Fully Abstract Compilation and Related Work. ACM Comput. Surv. 51, 6 (Feb. 2019 ), 125 : 1-125 : 36. https://doi.org/10.1145/ 3280984 Google Scholar
Digital Library
- Marco Patrignani, Amal Ahmed, and Dave Clarke. 2019b. Formal approaches to secure compilation: A survey of fully abstract compilation and related work. ACM Computing Surveys (CSUR) 51, 6 ( 2019 ), 1-36. https://doi.org/10.1145/3280984 Google Scholar
Digital Library
- J. C. Reynolds. 1983. Types, Abstraction, and Parametric Polymorphism. In Information Processing. North Holland, 513-523.Google Scholar
- Ilya Sergey and Dave Clarke. 2012. Gradual Ownership Types. In Programming Languages and Systems. Springer, Berlin, Heidelberg, 579-599. https://doi.org/10.1007/978-3-642-28869-2_29 Google Scholar
Digital Library
- Jeremy Siek. 2019. GitHub-jsiek/gradual-typing-in-agda: Formalizations of Gradually Typed Languages in Agda. https: //github.com/jsiek/gradual-typing-in-agda. (Accessed on 10/18/ 2019 ).Google Scholar
- Jeremy G Siek and Walid Taha. 2006. Gradual typing for functional languages. In Scheme and Functional Programming Workshop, Vol. 6. 81-92.Google Scholar
- Jeremy G. Siek, Michael M. Vitousek, Matteo Cimini, and John Tang Boyland. 2015. Refined Criteria for Gradual Typing. In 1st Summit on Advances in Programming Languages (SNAPL 2015 ) (Leibniz International Proceedings in Informatics (LIPIcs), Vol. 32 ), Thomas Ball, Rastislav Bodik, Shriram Krishnamurthi, Benjamin S. Lerner, and Greg Morrisett (Eds.). Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik, Dagstuhl, Germany, 274-293. https://doi.org/10.4230/LIPIcs.SNAPL. 2015.274 Google Scholar
Cross Ref
- Amin Timany and Lars Birkedal. 2019. Mechanized Relational Verification of Concurrent Programs with Continuations. Proc. ACM Program. Lang. 3, ICFP, Article 105 ( July 2019 ), 28 pages. https://doi.org/10.1145/3341709 Google Scholar
Digital Library
- Amin Timany, Robbert Krebbers, and Lars Birkedal. 2017a. Logical relations in Iris. In CoqPL, Date: 2017 /01/21-2017/01/21, Location: Paris.Google Scholar
- Amin Timany, Léo Stefanesco, Morten Krogh-Jespersen, and Lars Birkedal. 2017b. A Logical Relation for Monadic Encapsulation of State: Proving Contextual Equivalences in the Presence of RunST. Proc. ACM Program. Lang. 2, POPL, Article 64 ( Dec. 2017 ), 28 pages. https://doi.org/10.1145/3158152 Google Scholar
Digital Library
- Sam Tobin-Hochstadt and Matthias Felleisen. 2008. The Design and Implementation of Typed Scheme. ACM SIGPLAN Notices 43, 1 (Jan. 2008 ), 395-406. https://doi.org/10.1145/1328897.1328486 Google Scholar
Digital Library
- Matías Toro, Ronald Garcia, and Éric Tanter. 2018. Type-Driven Gradual Security with References. ACM Trans. Program. Lang. Syst. 40, 4 (Dec. 2018 ), 16 : 1-16 : 55. https://doi.org/10.1145/3229061 Google Scholar
Digital Library
- Matías Toro, Elizabeth Labrada, and Éric Tanter. 2019. Gradual Parametricity, Revisited. Proc. ACM Program. Lang. 3, POPL (Jan. 2019 ), 17 : 1-17 : 30. https://doi.org/10.1145/3290330 Google Scholar
Digital Library
- Philip Wadler and Robert Bruce Findler. 2009. Well-typed programs can't be blamed. In European Symposium on Programming. Springer, 1-16.Google Scholar
Digital Library
- A. K. Wright and M. Felleisen. 1994. A Syntactic Approach to Type Soundness. Information and Computation 115, 1 (Nov. 1994 ), 38-94. https://doi.org/10.1006/inco. 1994.1093 Google Scholar
Digital Library
Index Terms
Fully abstract from static to gradual
Recommendations
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 ...
Principal Type Schemes for Gradual Programs
POPL '15: Proceedings of the 42nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming LanguagesGradual typing is a discipline for integrating dynamic checking into a static type system. Since its introduction in functional languages, it has been adapted to a variety of type systems, including object-oriented, security, and substructural. This ...
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 ...






Comments