A Decidable Subtyping Logic for Intersection and Union Types

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10608)

Abstract

Using Curry-Howard isomorphism, we extend the typed lambda-calculus with intersection and union types, and its corresponding proof-functional logic, previously defined by the authors, with subtyping and explicit coercions.

We show the extension of the lambda-calculus to be isomorphic to the Barbanera-Dezani-de’Liguoro type assignment system and we provide a sound interpretation of the proof-functional logic with the \(\mathsf {NJ}(\beta )\) logic, using Mints’ realizers.

We finally present a sound and complete algorithm for subtyping in presence of intersection and union types. The algorithm is conceived to work for the (sub)type theory \(\varXi \).

Keywords

Logics and lambda-calculus Type Subtype systems 

Notes

Acknowledgment

We are grateful to Ugo de’Liguoro, Daniel Dougherty, and the anonymous referees for their useful comments and suggestions.

References

  1. [Aik99]
    Aiken, A.: Introduction to set constraint-based program analysis. Sci. Comput. Program. 35(2), 79–111 (1999)MathSciNetCrossRefMATHGoogle Scholar
  2. [AW93]
    Aiken, A., Wimmers, E.L.: Type inclusion constraints and type inference. In: FPCA, pp. 31–41. ACM (1993)Google Scholar
  3. [Bar84]
    Barendregt, H.P.: The \(\lambda \)-Calculus. Studies in Logic and the Foundations of Mathematics. North-Holland, Amsterdam (1984)MATHGoogle Scholar
  4. [Bar13]
    Barendregt, H.P.: The \(\lambda \)-Calculus with Types. Cambridge University Press, Association for Symbolic Logic (2013)Google Scholar
  5. [BCDC83]
    Barendregt, H.P., Coppo, M., Dezani-Ciancaglini, M.: A filter lambda model and the completeness of type assignment. J. Symbol. Logic 48(4), 931–940 (1983)MathSciNetCrossRefMATHGoogle Scholar
  6. [BCL92]
    Bruce, K.B., Di Cosmo, R., Longo, G.: Provable isomorphisms of types. Math. Struct. Comput. Sci. 2(2), 231–247 (1992)MathSciNetCrossRefMATHGoogle Scholar
  7. [BDCd95]
    Barbanera, F., Dezani-Ciancaglini, M., De’Liguoro, U.: Intersection and union types: syntax and semantics. Inf. Comput. 119(2), 202–230 (1995)MathSciNetCrossRefMATHGoogle Scholar
  8. [BM94]
    Barbanera, F., Martini, S.: Proof-functional connectives and realizability. Arch. Math. Logic 33, 189–211 (1994)MathSciNetCrossRefMATHGoogle Scholar
  9. [Dam94]
    Damm, F.M.: Subtyping with union types, intersection types and recursive types. In: Hagiya, M., Mitchell, J.C. (eds.) TACS 1994. LNCS, vol. 789, pp. 687–706. Springer, Heidelberg (1994).  https://doi.org/10.1007/3-540-57887-0_121 CrossRefGoogle Scholar
  10. [DCGV97]
    Dezani-Ciancaglini, M., Ghilezan, S., Venneri, B.: The “relevance” of intersection and union types. Notre Dame J. Formal Logic 38(2), 246–269 (1997)MathSciNetCrossRefMATHGoogle Scholar
  11. [DdLS16]
    Dougherty, D.J., De’Liguoro, U., Liquori, L., Stolze, C.: A realizability interpretation for intersection and union types. In: Igarashi, A. (ed.) APLAS 2016. LNCS, vol. 10017, pp. 187–205. Springer, Cham (2016).  https://doi.org/10.1007/978-3-319-47958-3_11 CrossRefGoogle Scholar
  12. [DL10]
    Dougherty, D.J., Liquori, L.: Logic and computation in a lambda calculus with intersection and union types. In: Clarke, E.M., Voronkov, A. (eds.) LPAR 2010. LNCS, vol. 6355, pp. 173–191. Springer, Heidelberg (2010).  https://doi.org/10.1007/978-3-642-17511-4_11 CrossRefGoogle Scholar
  13. [DP04]
    Dunfield, J., Pfenning, F.: Tridirectional typechecking. In: POPL, pp. 281–292 (2004)Google Scholar
  14. [Dun14]
    Dunfield, J.: Elaborating intersection and union types. J. Funct. Program. 24(2–3), 133–165 (2014)MathSciNetCrossRefMATHGoogle Scholar
  15. [FCB08]
    Frisch, A., Castagna, G., Benzaken, V.: Semantic subtyping: dealing set-theoretically with function, union, intersection, and negation types. J. ACM 55(4), 19:1–19:64 (2008)MathSciNetCrossRefMATHGoogle Scholar
  16. [HHP93]
    Harper, R., Honsell, F., Plotkin, G.: A framework for defining logics. J. ACM 40(1), 143–184 (1993)MathSciNetCrossRefMATHGoogle Scholar
  17. [Hin82]
    Hindley, J.R.: The simple semantics for Coppo-Dezani-Sallé types. In: Dezani-Ciancaglini, M., Montanari, U. (eds.) Programming 1982. LNCS, vol. 137, pp. 212–226. Springer, Heidelberg (1982).  https://doi.org/10.1007/3-540-11494-7_15 CrossRefGoogle Scholar
  18. [How80]
    Howard, W.A.: The formulae-as-types notion of construction. In: To H.B. Curry: Essays on Combinatory Logic, Lambda Calculus and Formalism, pp. 479–490. Academic Press, London (1980)Google Scholar
  19. [LE85]
    Lopez-Escobar, E.G.K.: Proof functional connectives. In: Di Prisco, C.A. (ed.) Methods in Mathematical Logic. LNM, vol. 1130, pp. 208–221. Springer, Heidelberg (1985).  https://doi.org/10.1007/BFb0075313 CrossRefGoogle Scholar
  20. [LR07]
    Liquori, L., Rocca, S.R.D.: Intersection typed system à la church. Inf. Comput. 9(205), 1371–1386 (2007)CrossRefMATHGoogle Scholar
  21. [LS17]
    Liquori, L., Stolze, C.: A decidable subtyping logic for intersection and union Types. Research report, Inria (2017). https://hal.inria.fr/hal-01488428
  22. [Min89]
    Mints, G.: The completeness of provable realizability. Notre Dame J. Formal Logic 30(3), 420–441 (1989)MathSciNetCrossRefMATHGoogle Scholar
  23. [MPS86]
    MacQueen, D.B., Plotkin, G.D., Sethi, R.: An ideal model for recursive polymorphic types. Inf. Control 71(1/2), 95–130 (1986)MathSciNetCrossRefMATHGoogle Scholar
  24. [MR72]
    Meyer, R.K., Routley, R.: Algebraic analysis of entailment I. Logique et Analyse 15, 407–428 (1972)MathSciNetMATHGoogle Scholar
  25. [Pfe93]
    Pfenning, F.: Refinement types for logical frameworks. In: TYPES, pp. 285–299 (1993)Google Scholar
  26. [Pie91]
    Pierce, B.C.: Programming with intersection types, union types, and bounded polymorphism. Ph.D. thesis, Technical report CMU-CS-91-205, Carnegie Mellon University (1991)Google Scholar
  27. [Pot80]
    Pottinger, G.: A type assignment for the strongly normalizable \(\lambda \)-terms. In: To H.B. Curry: Essays on Combinatory Logic, Lambda Calculus and Formalism, pp. 561–577. Academic Press (1980)Google Scholar
  28. [Pra65]
    Prawitz, D.: Natural deduction: a proof-theoretical study. Ph.D. thesis, Almqvist & Wiksell (1965)Google Scholar
  29. [Rey96]
    Reynolds, J.C.: Design of the programming language Forsythe. Technical report CMU-CS-96-146, Carnegie Mellon University (1996)Google Scholar
  30. [Sei90]
    Seidl, H.: Deciding equivalence of finite tree automata. J. Symbolic Logic 19(3), 424–437 (1990)MathSciNetMATHGoogle Scholar

Copyright information

© IFIP International Federation for Information Processing 2017

Authors and Affiliations

  1. 1.Université Côte d’Azur, INRIASophia AntipolisFrance

Personalised recommendations