Miranda: a non-strict functional language with polymorphic types
Proc. of a conference on Functional programming languages and computer architecture
Compilers: principles, techniques, and tools
Compilers: principles, techniques, and tools
Proceedings of the Second European Symposium on Programming
On the complexity of type inference with coercion
FPCA '89 Proceedings of the fourth international conference on Functional programming languages and computer architecture
A gentle introduction to Haskell
ACM SIGPLAN Notices - Haskell special issue
Report on the programming language Haskell: a non-strict, purely functional language version 1.2
ACM SIGPLAN Notices - Haskell special issue
Algorithmic aspects of type inference with subtypes
POPL '92 Proceedings of the 19th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Polymorphic Subtype Inference: Closing the Theory-Practice Gap
TAPSOFT '89 Proceedings of the International Joint Conference on Theory and Practice of Software Development, Volume 2: Advanced Seminar on Foundations of Innovative Software Development II and Colloquium on Current Issues in Programming Languages
POPL '84 Proceedings of the 11th ACM SIGACT-SIGPLAN symposium on Principles of programming languages
ACM Computing Surveys (CSUR)
Minimal typings in atomic subtyping
Proceedings of the 24th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Pragmatic subtyping in polymorphic languages
ICFP '98 Proceedings of the third ACM SIGPLAN international conference on Functional programming
Type elaboration and subtype completion for Java bytecode
Proceedings of the 27th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Type elaboration and subtype completion for Java bytecode
ACM Transactions on Programming Languages and Systems (TOPLAS)
Satisfying subtype inequalities in polynomial space
Theoretical Computer Science
Type inference with simple selftypes is NP-complete
Nordic Journal of Computing
Type Reconstruction for Functional Programs with Subtyping over a Lattice of Atomic Types
MFCS '99 Proceedings of the 24th International Symposium on Mathematical Foundations of Computer Science
Solving Order Constraints in Logarithmic Space
STACS '03 Proceedings of the 20th Annual Symposium on Theoretical Aspects of Computer Science
An Algebraic Characterization of Typability in ML with Subtyping
FoSSaCS '99 Proceedings of the Second International Conference on Foundations of Software Science and Computation Structure, Held as Part of the European Joint Conferences on the Theory and Practice of Software, ETAPS'99
An extension of HM(X) with bounded existential and universal data-types
ICFP '03 Proceedings of the eighth ACM SIGPLAN international conference on Functional programming
Modular typechecking for hierarchically extensible datatypes and functions
ACM Transactions on Programming Languages and Systems (TOPLAS)
Automatic discovery of covariant read-only fields
ACM Transactions on Programming Languages and Systems (TOPLAS)
Type reconstruction for general refinement types
ESOP'07 Proceedings of the 16th European conference on Programming
Type checking evolving languages with MSOS
Semantics and algebraic specification
Complexity of subtype satisfiability over posets
ESOP'05 Proceedings of the 14th European conference on Programming Languages and Systems
Explaining ML type errors by data flows
IFL'04 Proceedings of the 16th international conference on Implementation and Application of Functional Languages
Satisfiability of Inequalities in a Poset
Fundamenta Informaticae
Hi-index | 0.00 |
We investigate type inference for programming languages with subtypes. As described in previous work, there are several type inference problems for any given expression language, depending on the form of the subtype partial order and the ability to define new subtypes in programs. Our first main result is that for any specific subtype partial order, the problem of determining whether a lambda term is typable is algorithmically (polynomial-time) equivalent to a form of satisfiability problem over the same partial order. This gives the first exact characterization of the problem that is independent of the syntax of expressions. In addition, since this form of satisfiability problem is PSPACE-hard over certain partial orders, this equivalence strengthens the previous lower bound of NP-hard to PSPACE-hard. Our second main result is a lower bound on the length of most general types when the subtype hierarchy may change as a result of additional type declarations within the program. More specifically, given any input expression, a type inference algorithm tries to find a most general (or principal) typing. The property of a most general typing is that it has all other possible typings as instances. However, there are several sound notions of instance in the presence of subtyping. Our lower bound is that no sound definition of instance would allow the set of additional subtyping hypotheses about a term to grow less than linearly in the size of the term.