Abstract
We consider a type algebra equipped with recursive, product, function, intersection, union, and complement types, together with type variables. We consider the subtyping relation defined by Castagna and Xu [2011] over such type expressions and show how this relation can be decided in EXPTIME, answering an open question. The novelty, originality and strength of our solution reside in introducing a logical modeling for the semantic subtyping framework. We model semantic subtyping in a tree logic and use a satisfiability-testing algorithm in order to decide subtyping. We report on practical experiments made with a full implementation of the system. This provides a powerful polymorphic type system aiming at maintaining full static type-safety of functional programs that manipulate trees, even with higher-order functions, which is particularly useful in the context of XML.
- Michael Benedikt and James Cheney. 2010. Destabilizers and independence of XML updates. Proceedings of the VLDB Endowment 3, 1, 906--917. Google Scholar
Digital Library
- Véronique Benzaken, Giuseppe Castagna, and Alain Frisch. 2003. CDuce: An XML-centric general-purpose language. In Proceedings of the 8th International Conference on Functional Programming (ICFP’03). Uppsala, Sweden, 51--63. http://doi.acm.org/10.1145/944705.944711 Google Scholar
Digital Library
- Gavin M. Bierman, Andrew D. Gordon, Cătălin Hriţcu, and David Langworthy. 2010. Semantic subtyping with an SMT solver. In Proceedings of the 15th International Conference on Functional Programming (ICFP’10). Baltimore, MD, 105--116. http://doi.acm.org/10.1145/1863543.1863560 Google Scholar
Digital Library
- Scott Boag, Don Chamberlin, Mary F. Fernández, Daniela Florescu, Jonathan Robie, and Jérôme Siméon. 2007. XQuery 1.0: An XML Query Language, W3C Recommendation.Google Scholar
- Randal E. Bryant. 1986. Graph-based algorithms for Boolean function manipulation. IEEE Transactions on Computers 35, 8, 677--691. Google Scholar
Digital Library
- Cristiano Calcagno, Luca Cardelli, and Andrew D. Gordon. 2005. Deciding validity in a spatial logic for trees. Journal of Functional Programming 15, 4, 543--572. DOI:http://dx.doi.org/10.1017/S0956796804005404 Google Scholar
Digital Library
- Luca Cardelli and Andrew D. Gordon. 2000. Anytime, anywhere: Modal logics for mobile ambients. In Proceedings of the 27th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL’00). ACM, New York, NY, 365--377. DOI:http://dx.doi.org/10.1145/325694.325742 Google Scholar
Digital Library
- Giuseppe Castagna and Zhiwu Xu. 2011. Set-theoretic foundation of parametric polymorphism and subtyping. In Proceedings of the 16th ACM SIGPLAN International Conference on Functional Programming (ICFP’11). ACM, Tokyo, 94--106. DOI:http://dx.doi.org/10.1145/2034773.2034788 Google Scholar
Digital Library
- James Clark and Steve DeRose. 1999. XML Path Language (XPath) Version 1.0, W3C Recommendation. Retrieved August 31, 2015 from http://www.w3.org/TR/1999/REC-xpath-19991116.Google Scholar
- Edmund M. Clarke Jr., Orna Grumberg, and Doron A. Peled. 1999. Model Checking. MIT Press, Cambridge, MA. Google Scholar
Digital Library
- Leonardo Mendonça de Moura and Nikolaj Bjørner. 2008. Z3: An efficient SMT solver. In Proceedings of the 14th International Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS’08). Budapest, 337--340. http://dx.doi.org/10.1007/978-3-540-78800-3_24. Google Scholar
Digital Library
- A. Frisch, G. Castagna, and V. Benzaken. 2008. Semantic subtyping: Dealing set-theoretically with function, union, intersection, and negation types. Journal of the ACM 55, 4, 1--64. Google Scholar
Digital Library
- Pierre Genevès. 2006. Logics for XML. Ph.D. Dissertation. Institut National Polytechnique de Grenoble. Retrieved August 31, 2015 from http://wam.inrialpes.fr/publications/2006/geneves-phd.pdf.Google Scholar
- Pierre Genevès, Nabil Layaïda, and Vincent Quint. 2009. Identifying query incompatibilities with evolving XML schemas. In Proceedings of the 14th ACM SIGPLAN International Conference on Functional Programming (ICFP’09). ACM, New York, NY, 221--230. DOI:http://dx.doi.org/10.1145/1596550.1596583 Google Scholar
Digital Library
- Pierre Genevès, Nabil Layaïda, and Alan Schmitt. 2007. Efficient static analysis of XML paths and types. In Proceedings of the 28th Conference on Programming Language Design and iImplementation (PLDI’07). San Diego, CA, 342--351. http://doi.acm.org/10.1145/1250734.1250773 Google Scholar
Digital Library
- Pierre Genevès, Nabil Layaïda, Alan Schmitt, and Nils Gesbert. 2015. Efficiently deciding μ-calculus with converse over finite trees. ACM Transactions on Computational Logic 16, 2, 16:1--16:41. DOI:http://dx.doi.org/10.1145/2724712 Google Scholar
Digital Library
- Nils Gesbert, Pierre Genevès, and Nabil Layaïda. 2011. Parametric polymorphism and semantic subtyping: The logical connection. In Proceedings of the 16th ACM SIGPLAN International Conference on Functional Programming (ICFP’11). ACM, Tokyo, 107--116. DOI:http://dx.doi.org/10.1145/2034773.2034789 Google Scholar
Digital Library
- H. Hosoya, A. Frisch, and G. Castagna. 2009. Parametric polymorphism for XML. ACM Transactions on Programming Languages and Systems 32, 1, 1--56. Google Scholar
Digital Library
- Haruo Hosoya and Benjamin C. Pierce. 2003. XDuce: A statically typed XML processing language. ACM Transactions on Internet Technology 3, 2, 117--148. http://doi.acm.org/10.1145/767193.767195 Google Scholar
Digital Library
- Haruo Hosoya, Jérôme Vouillon, and Benjamin C. Pierce. 2005. Regular expression types for XML. ACM Transactions on Programming Languages and Systems 27, 1, 46--90. http://doi.acm.org/10.1145/1053468.1053470. Google Scholar
Digital Library
- Gérard P. Huet. 1997. The zipper. Journal of Functional Programming 7, 5, 549--554. Google Scholar
Digital Library
- Barbara Liskov and Jeannette M. Wing. 1994. A behavioral notion of subtyping. ACM Transactions on Programming Languages and Systems 16, 6, 1811--1841. DOI:http://dx.doi.org/10.1145/197320.197383 Google Scholar
Digital Library
- R. Milner, L. Morris, and M. Newey. 1975. A logic for computable functions with reflexive and polymorphic types. In Conference on Proving and Improving Programs, Arc-et-Senans, France. IRIA-Laboria, 78150 Le Chesnay, France, 371--394.Google Scholar
- Guoqiang Pan, Ulrike Sattler, and Moshe Y. Vardi. 2006. BDD-based decision procedures for the modal logic K. Journal of Applied Non-classical Logics 16, 1--2, 169--208.Google Scholar
Cross Ref
- John C. Reynolds. 1983. Types, abstraction and parametric polymorphism. In IFIP Congress. 513--523.Google Scholar
- Jonathan Robie, Don Chamberlin, Michael Dyck, and John Snelson. 2014. XQuery 3.0: An XML Query Language, W3C Recommendation. Retrieved August 31, 2015 from http://www.w3.org/TR/xquery-30/.Google Scholar
- Jérôme Vouillon. 2006. Polymorphic regular tree types and patterns. In Proceedings of the 33rd Symposium on Principles of Programming Languages (POPL’06). 103--114. http://doi.acm.org/10.1145/1111037.1111047. Google Scholar
Digital Library
Index Terms
A Logical Approach to Deciding Semantic Subtyping
Recommendations
On the power of coercion abstraction
POPL '12Erasable coercions in System F-eta, also known as retyping functions, are well-typed eta-expansions of the identity. They may change the type of terms without changing their behavior and can thus be erased before reduction. Coercions in F-eta can model ...
On the power of coercion abstraction
POPL '12: Proceedings of the 39th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languagesErasable coercions in System F-eta, also known as retyping functions, are well-typed eta-expansions of the identity. They may change the type of terms without changing their behavior and can thus be erased before reduction. Coercions in F-eta can model ...
Parametric polymorphism and semantic subtyping: the logical connection
ICFP '11We consider a type algebra equipped with recursive, product, function, intersection, union, and complement types together with type variables and implicit universal quantification over them. We consider the subtyping relation recently defined by ...








Comments