skip to main content

Fully abstract from static to gradual

Published:04 January 2021Publication History
Skip Abstract Section

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.

References

  1. 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 ScholarGoogle ScholarCross RefCross Ref
  2. Martín Abadi. 1999. Protection in Programming-Language Translations. In Secure Internet Programming. Springer-Verlag. https://doi.org/10.1007/BFb0055109 Google ScholarGoogle ScholarCross RefCross Ref
  3. 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 ScholarGoogle ScholarCross RefCross Ref
  4. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  5. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  6. 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 ScholarGoogle Scholar
  7. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  8. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  9. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  10. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  11. 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 ScholarGoogle Scholar
  12. 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 ScholarGoogle ScholarCross RefCross Ref
  13. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  14. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  15. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  16. Ronald Garcia and Éric Tanter. 2015. Deriving a Simple Gradual Security Language. arXiv preprint arXiv:1511.01399 ( 2015 ).Google ScholarGoogle Scholar
  17. Ronald Garcia and Éric Tanter. 2020. Gradual Typing as if Types Mattered. ( 2020 ). Workshop on Gradual Typing.Google ScholarGoogle Scholar
  18. 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 ScholarGoogle ScholarCross RefCross Ref
  19. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  20. 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 ScholarGoogle ScholarCross RefCross Ref
  21. 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 ScholarGoogle Scholar
  22. 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 ScholarGoogle ScholarCross RefCross Ref
  23. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  24. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  25. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  26. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  27. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  28. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  29. J. C. Reynolds. 1983. Types, Abstraction, and Parametric Polymorphism. In Information Processing. North Holland, 513-523.Google ScholarGoogle Scholar
  30. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  31. 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 ScholarGoogle Scholar
  32. Jeremy G Siek and Walid Taha. 2006. Gradual typing for functional languages. In Scheme and Functional Programming Workshop, Vol. 6. 81-92.Google ScholarGoogle Scholar
  33. 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 ScholarGoogle ScholarCross RefCross Ref
  34. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  35. Amin Timany, Robbert Krebbers, and Lars Birkedal. 2017a. Logical relations in Iris. In CoqPL, Date: 2017 /01/21-2017/01/21, Location: Paris.Google ScholarGoogle Scholar
  36. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  37. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  38. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  39. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  40. Philip Wadler and Robert Bruce Findler. 2009. Well-typed programs can't be blamed. In European Symposium on Programming. Springer, 1-16.Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. 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 ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Fully abstract from static to gradual

                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

                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!