Minimal typings in atomic subtyping

This paper studies the problem of simplifying typings and the size-complexity of most general typings in typed programming languages with atomic subtyping. We define a notion of minimal typings relating all typings which are equivalent with respect to instantiation. The notion of instance is that of Fuh and Mishra [13], which supports many interesting simplifications. We prove that every typable term has a unique minimal typing, which is the logically most succinct among all equivalent typings. We study completeness properties, with respect to our notion of minimality, of well-known simplification techniques. Drawing upon these results, we prove a tight exponential lower bound for the worst case dag-size of constraint sets as well as of types in most general typings. To the best of our knowledge, the best previously proven lower bound was linear.

[1]  Alfred V. Aho,et al.  The Transitive Reduction of a Directed Graph , 1972, SIAM J. Comput..

[2]  John C. Mitchell,et al.  Algorithmic aspects of type inference with subtypes , 1992, POPL '92.

[3]  Alexander Aiken,et al.  Soft typing with conditional types , 1994, POPL '94.

[4]  Pavel Curtis Constrained qualification in polymorphic type analysis , 1990 .

[5]  W. V. Quine,et al.  Natural deduction , 2021, An Introduction to Proof Theory.

[6]  Marcin Benke Efficient Type Reconstruction in the Presence of Inheritance , 1993, MFCS.

[7]  Stefan Kaes Type inference in the presence of overloading, subtyping and recursive types , 1992, LFP '92.

[8]  Marcin Benke,et al.  Some Complexity Bounds for Subtype Inequalities , 1999, Theor. Comput. Sci..

[9]  Manuel Fähndrich,et al.  Making Set-Constraint Program Analyses Scale , 1996 .

[10]  Geoffrey Smith,et al.  Principal Type Schemes for Functional Programs with Overloading and Subtyping , 1994, Sci. Comput. Program..

[11]  Alexander Aiken,et al.  Constraint-Based Program Analysis (Abstract) , 1996, SAS.

[12]  Ryan Stansifer,et al.  Type inference with subtypes , 1988, POPL '88.

[13]  John C. Mitchell,et al.  Lower bounds on type inference with subtypes , 1995, POPL '95.

[14]  Martín Abadi,et al.  A Theory of Objects , 1996, Monographs in Computer Science.

[15]  Prateek Mishra,et al.  Polymorphic Subtype Inference: Closing the Theory-Practice Gap , 1989, TAPSOFT, Vol.2.

[16]  Peter Buneman,et al.  Theoretical Aspects of Object-Oriented Programming , 1994 .

[17]  John C. Mitchell,et al.  Coercion and type inference , 1984, POPL.

[18]  Alexander Aiken,et al.  Type inclusion constraints and type inference , 1993, FPCA '93.

[19]  Paul Hudak,et al.  A gentle introduction to Haskell , 1992, SIGP.

[20]  Henk Barendregt,et al.  The Lambda Calculus: Its Syntax and Semantics , 1985 .

[21]  Scott F. Smith,et al.  Sound polymorphic type inference for objects , 1995, OOPSLA.

[22]  D. A. Turner,et al.  Miranda: A Non-Strict Functional language with Polymorphic Types , 1985, FPCA.

[23]  John C. Mitchell,et al.  Theoretical aspects of object-oriented programming: types, semantics, and language design , 1994, Choice Reviews Online.

[24]  Fritz Henglein,et al.  Polymorphic Binding-Time Analysis , 1994, ESOP.

[25]  François Pottier,et al.  Simplifying subtyping constraints , 1996, ICFP '96.

[26]  Harry G. Mairson,et al.  Unification and ML-Type Reconstruction , 1991, Computational Logic - Essays in Honor of Alan Robinson.

[27]  Jens Palsberg,et al.  Optimal Representations of Polymorphic Types with Subtyping , 1999, High. Order Symb. Comput..

[28]  John C. Mitchell,et al.  Foundations for programming languages , 1996, Foundation of computing series.

[29]  John C. Mitchell,et al.  Type inference with simple subtypes , 1991, Journal of Functional Programming.

[30]  Robin Milner,et al.  Definition of standard ML , 1990 .

[31]  Jerzy Tiuryn,et al.  Satisfiability of Inequalities in a Poset , 1996, Fundam. Informaticae.

[32]  Jerzy Tiuryn Subtype inequalities , 1992, [1992] Proceedings of the Seventh Annual IEEE Symposium on Logic in Computer Science.

[33]  Scott F. Smith,et al.  Subtyping Constrained Types , 1996, SAS.

[34]  Jerzy Tiuryn,et al.  Satissability of Inequalities in a Poset , .