Skip to main content

Intersection Type Matching with Subtyping

  • Conference paper
Typed Lambda Calculi and Applications (TLCA 2013)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 7941))

Included in the following conference series:

Abstract

Type matching problems occur in a number of contexts, including library search, component composition, and inhabitation. We consider the intersection type matching problem under the standard notion of subtyping for intersection types: Given intersection types τ and σ, where σ is a constant type, does there exist a type substitution S such that S(τ) is a subtype of σ? We show that the matching problem is NP-complete. NP-hardness holds already for the restriction to atomic substitutions. The main contribution is an NP-algorithm which is engineered for efficiency by minimizing nondeterminism and running in Ptime on deterministic input problems. Our algorithm is based on a nondeterministic polynomial time normalization procedure for subtype constraint systems with intersection types. We have applied intersection type matching in optimizations of an inhabitation algorithm.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 54.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 72.00
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Barendregt, H., Coppo, M., Dezani-Ciancaglini, M.: A Filter Lambda Model and the Completeness of Type Assignment. Journal of Symbolic Logic 48(4), 931–940 (1983)

    Article  MathSciNet  MATH  Google Scholar 

  2. Jha, S., Palsberg, J., Zhao, T.: Efficient Type Matching. In: Nielsen, M., Engberg, U. (eds.) FOSSACS 2002. LNCS, vol. 2303, pp. 187–204. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  3. Zaremski, A., Wing, J.: Signature Matching: A Tool for Using Software Libraries. ACM Trans. Softw. Eng. Methodol. 4(2), 146–170 (1995)

    Article  Google Scholar 

  4. Baader, F., Snyder, W.: Unification Theory. In: Handbook of Automated Reasoning, ch. 8, pp. 439–526. Elsevier (2001)

    Google Scholar 

  5. Rehof, J., Urzyczyn, P.: Finite Combinatory Logic with Intersection Types. In: Ong, L. (ed.) TLCA 2011. LNCS, vol. 6690, pp. 169–183. Springer, Heidelberg (2011)

    Chapter  Google Scholar 

  6. Düdder, B., Martens, M., Rehof, J., Urzyczyn, P.: Bounded Combinatory Logic. In: Proceedings of CSL 2012. LIPIcs, vol. 16, pp. 243–258. Schloss Dagstuhl (2012)

    Google Scholar 

  7. Rehof, J.: Towards Combinatory Logic Synthesis. In: 1st International Workshop on Behavioural Types, BEAT 2013, January 22 (2013), http://beat13.cs.aau.dk/pdf/BEAT13-proceedings.pdf

  8. Düdder, B., Martens, M., Rehof, J.: Intersection Type Matching and Bounded Combinatory Logic (Extended Version). Technical Report 841, Faculty of Computer Science, TU Dortmund (2012), http://ls14-www.cs.tu-dortmund.de/index.php/Jakob_Rehof_Publications#Technical_Reports

  9. 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)

    Chapter  Google Scholar 

  10. Rehof, J.: The Complexity of Simple Subtyping Systems. PhD thesis, DIKU, Department of Computer Science (1998)

    Google Scholar 

  11. Tiuryn, J.: Subtype Inequalities. In: Proceedings of LICS 1992, pp. 308–315. IEEE Computer Society (1992)

    Google Scholar 

  12. Frey, A.: Satisfying Subtype Inequalities in Polynomial Space. Theor. Comput. Sci. 277(1-2), 105–117 (2002)

    Article  MathSciNet  MATH  Google Scholar 

  13. Benanav, D., Kapur, D., Narendran, P.: Complexity of Matching Problems. J. Symb. Comput. 3(1/2), 203–216 (1987)

    Article  MathSciNet  MATH  Google Scholar 

  14. Kapur, D., Narendran, P.: NP-Completeness of the Set Unification and Matching Problems. In: Siekmann, J.H. (ed.) CADE 1986. LNCS, vol. 230, pp. 489–495. Springer, Heidelberg (1986)

    Chapter  Google Scholar 

  15. Kapur, D., Narendran, P.: Complexity of Unification Problems with Associative-Commutative Operators. J. Autom. Reasoning 9(2), 261–288 (1992)

    Article  MathSciNet  MATH  Google Scholar 

  16. Ronchi Della Rocca, S.: Principal Type Scheme and Unification for Intersection Type Discipline. Theor. Comput. Sci. 59, 181–209 (1988)

    Article  MathSciNet  MATH  Google Scholar 

  17. Kfoury, A.J., Wells, J.B.: Principality and Type Inference for Intersection Types Using Expansion Variables. Theor. Comput. Sci. 311(1-3), 1–70 (2004)

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Düdder, B., Martens, M., Rehof, J. (2013). Intersection Type Matching with Subtyping. In: Hasegawa, M. (eds) Typed Lambda Calculi and Applications. TLCA 2013. Lecture Notes in Computer Science, vol 7941. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-38946-7_11

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-38946-7_11

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-38945-0

  • Online ISBN: 978-3-642-38946-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics