Author:
DAGAND PIERRE-ÉVARISTE,TABAREAU NICOLAS,TANTER ÉRIC
Abstract
AbstractFull-spectrum dependent types promise to enable the development of correct-by-construction software. However, even certified software needs to interact with simply-typed or untyped programs, be it to perform system calls, or to use legacy libraries. Trading static guarantees for runtime checks, thedependent interoperabilityframework provides a mechanism by which simply-typed values can safely be coerced to dependent types and, conversely, dependently-typed programs can defensively be exported to a simply-typed application. In this article, we give a semantic account of dependent interoperability. Our presentation relies on and is guided by a pervading notion of type equivalence, whose importance has been emphasized in recent work on homotopy type theory. Specifically, we develop the notions oftype-theoretic partial Galois connectionsas a key foundation for dependent interoperability, which accounts for the partiality of the coercions between types. We explore the applicability of both type-theoretic Galois connections and anticonnections in the setting of dependent interoperability. A partial Galois connection enforces a translation of dependent types to runtime checks that are both sound and complete with respect to the invariants encoded by dependent types. Conversely, picking an anticonnection instead lets us induce weaker, sound conditions that can amount to more efficient runtime checks.Our framework is developed in Coq; it is thus constructive and verified in the strictest sense of the terms. Using our library, users can specify domain-specific partial connections between data structures. Our library then takes care of the (sometimes, heavy) lifting that leads to interoperable programs. It thus becomes possible, as we shall illustrate, to internalize and hand-tune the extraction of dependently-typed programs to interoperable OCaml programs within Coq itself.
Publisher
Cambridge University Press (CUP)
Reference51 articles.
1. Isomorphisms of types in the presence of higher-order references (extended version)
2. Disney T. & Flanagan C. (2011) Gradual information flow typing. In Proceedings of International Workshop on Scripts to Programs.
3. Siek J. G. , Vitousek M. M. , Cimini M. & Boyland J. T. (2015) Refined criteria for gradual typing. In Proceedings of the 1st Summit on Advances in Programming Languages (SNAPL '15), pp. 274–293.
4. Classical isomorphisms of types
5. An introduction to small scale reflection in Coq;Gonthier;J. Formalized Reason.,2010
Cited by
16 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Securing Verified IO Programs Against Unverified Code in F*;Proceedings of the ACM on Programming Languages;2024-01-05
2. Transport via Partial Galois Connections and Equivalences;Programming Languages and Systems;2023
3. How to safely use extensionality in Liquid Haskell;Proceedings of the 15th ACM SIGPLAN International Haskell Symposium;2022-09-06
4. A reasonably gradual type theory;Proceedings of the ACM on Programming Languages;2022-08-29
5. Propositional equality for gradual dependently typed programming;Proceedings of the ACM on Programming Languages;2022-08-29