Type reconstruction with recursive types and atomic subtyping

  • Jerzy Tiuryn
  • Mitchell Wand
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 668)


We consider the problem of type reconstruction for A-terms over a type system with recursive types and atomic subsumptions. This problem reduces to the problem of solving a finite set of inequalities over infinite trees. We show how to solve such inequalities by reduction to an infinite but well-structured set of inequalities over the base types. This infinite set of inequalities is solved using Büchi automata. The resulting algorithm is in DEXPTIME. This also improves the previous NEXPTIME upper bound for type reconstruction for finite types with atomic subtyping. We show that the key steps in the algorithm are PSPACE-hard.


Partial Order Finite Type Failure State Partial Type Regular Tree 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


  1. [1]
    Roberto M. Amadio and Luca Cardelli. Subtyping Recursive Types. In Conf. Rec. 18th ACM Symposium on Principles of Programming Languages, pages 104–118, 1991.Google Scholar
  2. [2]
    Kim B. Bruce. A Paradigmatic Object-Oriented Programming Language: Design, Static Typing and Semantics. Technical Report CS-92-01, Williams College, January 1992.Google Scholar
  3. [3]
    William R. Cook, Walter L. Hill, and Peter S. Canning. Subtyping is not Inheritance. In Conf. Rec. 17th ACM Symposium on Principles of Programming Languages, pages 125–135, 1990.Google Scholar
  4. [4]
    Bruno Courcelle. Fundamental Properties of Infinite Trees. Theoretical Computer Science, 25:95–109, 1983.CrossRefGoogle Scholar
  5. [5]
    Y.-C. Full and P. Mishra. Type Inference with Subtypes. In Proceedings European Symposium on Programming, pages 94–114, 1988.Google Scholar
  6. [6]
    Dexter Kozen, Jens Palsberg, and Michael I. Schwartzbach. Efficient Inference of Partial Types. Technical Report DAIMI PB-394, Computer Science Department, Aarhus University, April 1992.Google Scholar
  7. [7]
    Patrick Lincoln and John C. Mitchell. Algorithmic Aspects of Type Inference with Subtypes. In Conf. Rec. 19th ACM Symposium on Principles of Programming Languages, pages 293–304, 1992.Google Scholar
  8. [8]
    John C. Mitchell. Coercion and Type Inference (summary). In Conf. Rec. 11th ACM Symposium on Principles of Programming Languages, pages 175–185, 1984.Google Scholar
  9. [9]
    John C. Mitchell. Type Inference with Simple Subtypes. Journal of Functional Programming, 1:245–285, 1991.Google Scholar
  10. [10]
    Patrick M. O'Keefe and Mitchell Wand. Type Inference for Partial Types is Decidable. In Bernd Krieg-Brückner, editor, European Symposium on Programming '92, volume 582 of Springer Lecture Notes in Computer Science, pages 408–17. Springer-Verlag, 1992.Google Scholar
  11. [11]
    Vaughn Pratt and Jerzy Tiuryn. Satisfiability of Inequalities in a Poset. to appear, 1992.Google Scholar
  12. [12]
    Michael O. Rabin. Weakly Definable Relations and Special Automata. In Y. BarHillel, editor, Mathematical Logic and the Foundations of Set Theory, pages 1–23, Amsterdam, 1970. North-Holland.Google Scholar
  13. [13]
    Satish Thatle. Type Inference with Partial Types. In Proceedings International Colloquium on Automata, Languages, and Programming '88, pages 615–29, 1988.Google Scholar
  14. [14]
    Jerzy Tiuryn. Subtype Inequalities. In Proc. 7th IEEE Symposium on Logic in Computer Science, pages 308–15, 1992.Google Scholar
  15. [15]
    Moshe Y. Vardi and Pierre Wolper. Automata-Theoretic techniques for modal logics of programs. J. Comp. Sys. Sci., 32:183–221, 1986.CrossRefGoogle Scholar
  16. [16]
    Mitchell Wand. A Simple Algorithm and Proof for Type Inference. Fundamenta Informaticae, 10:115–122, 1987.Google Scholar
  17. [17]
    Mitchell Wand and. Patrick M. O'Keefe. On the Complexity of Type Inference with Coercion. In Conf. on Functional Programming Languages and Computer Architecture, 1989.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1993

Authors and Affiliations

  • Jerzy Tiuryn
    • 1
  • Mitchell Wand
    • 2
  1. 1.Institute of InformaticsWarsaw UniversityWarsawPoland
  2. 2.College of Computer ScienceNortheastern UniversityBostonUSA

Personalised recommendations