## Minimal Typings in Atomic Subtyping (1996)

Venue: | In Conference Record of the 24th ACM Symposium on Principles of Programming Languages |

Citations: | 14 - 3 self |

### BibTeX

@INPROCEEDINGS{Rehof96minimaltypings,

author = {Jakob Rehof},

title = {Minimal Typings in Atomic Subtyping},

booktitle = {In Conference Record of the 24th ACM Symposium on Principles of Programming Languages},

year = {1996},

pages = {278--291},

publisher = {ACM Press}

}

### OpenURL

### Abstract

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 Introduction Subtyping is a fundamental idea in type systems for programming languages, which can in principle be integrated into standar...

### Citations

1562 | The Definition of Standard ML
- Miller, Tofte, et al.
- 1990
(Show Context)
Citation Context ...dea in type systems for programming languages, which can in principle be integrated into standard type systems and type inference for languages such as, e.g., the simply typed lambda calculus [7], ML =-=[22]-=-, Haskell [18], Miranda [33] as well as being a basic notion in typed object oriented languages, see e.g.[15, 11, 1]. Type inference algorithms infer type information from programs without requiring p... |

891 | A Theory of Objects
- Abadi, Cardelli
- 1996
(Show Context)
Citation Context ...s and type inference for languages such as, e.g., the simply typed lambda calculus [7], ML [22], Haskell [18], Miranda [33] as well as being a basic notion in typed object oriented languages, see e.g.=-=[15, 11, 1]-=-. Type inference algorithms infer type information from programs without requiring programmers to insert explicit type declarations in the program and discovers many programming errors at compile time... |

518 | Lambda calculi with types
- Barendregt
- 1992
(Show Context)
Citation Context ...mental idea in type systems for programming languages, which can in principle be integrated into standard type systems and type inference for languages such as, e.g., the simply typed lambda calculus =-=[7]-=-, ML [22], Haskell [18], Miranda [33] as well as being a basic notion in typed object oriented languages, see e.g.[15, 11, 1]. Type inference algorithms infer type information from programs without re... |

328 |
Foundations For Programming Languages
- Mitchell
- 1996
(Show Context)
Citation Context ...s well as Theorem 5.6 are important ingredients in the lower bound proof to be presented below. Fors! we know (see [20]) that while textual type size can be exponential, dag-size (see, e.g., [20] and =-=[25]-=-Chapter 11.3) is at most linear. The basic property responsible for this is that the type system ofs! imposes enough equality constraints, in the sense of [34], that sharing yields exponential succinc... |

286 |
The Lambda-Calculus, its Syntax and Semantics, volume 103
- Barendregt
- 1984
(Show Context)
Citation Context ... to the domain type of x. This eliminates the need for the conditional. Eliminating pairing and projections is more subtle. A first attempt might be to use the standard lambda-calculus encodings (see =-=[6]-=-Chapter 6.2), taking an encoded pair of M and N to be hj M;N ji with the definition hj M;N ji = p:(p M) N and fst = x:y:x, snd = x:y:y. This will not work, however, because the application of a variab... |

216 | Type inclusion constraints and type inference
- AIKEN, WIMMERS
- 1993
(Show Context)
Citation Context ...increasingly used in non-standard ways in type based program analysis, where program properties of a typed language are automatically extracted from the program text using inference algorithms, e.g., =-=[3, 4, 16]-=-. In all cases, subtyping adds expressiveness to a type system by allowing an expression to have several types depending on the context in which it occurs. This is achieved by imposing an order relati... |

187 | Soft typing with conditional types
- Aiken, Wimmers, et al.
- 1994
(Show Context)
Citation Context ...increasingly used in non-standard ways in type based program analysis, where program properties of a typed language are automatically extracted from the program text using inference algorithms, e.g., =-=[3, 4, 16]-=-. In all cases, subtyping adds expressiveness to a type system by allowing an expression to have several types depending on the context in which it occurs. This is achieved by imposing an order relati... |

158 |
The transitive reduction of a directed graph
- Aho, Garey, et al.
- 1972
(Show Context)
Citation Context ...straint sets: C ffi = C n (fAsA j AsA 2 Cg[ fbsb 0 2 C j b; b 0 2 Pg) C = transitive closure of C C \Gamma = T fC 0 j (C 0 ) = C g In case C is acyclic, C \Gamma is the transitive reduction of C (see =-=[2]), w-=-hich uniquely satisfies (C \Gamma ) = C and whenever (C 0 ) = C then C \Gamma ` C 0 . One can show that if C is atomic and consistent with P , then C ��P (C ffi ) \Gamma , and if, in addition, C i... |

104 | Sound polymorphic type inference for objects
- Eifrig, Smith, et al.
- 1995
(Show Context)
Citation Context ...s and type inference for languages such as, e.g., the simply typed lambda calculus [7], ML [22], Haskell [18], Miranda [33] as well as being a basic notion in typed object oriented languages, see e.g.=-=[15, 11, 1]-=-. Type inference algorithms infer type information from programs without requiring programmers to insert explicit type declarations in the program and discovers many programming errors at compile time... |

96 |
Type inference with simple subtypes
- Mitchell
- 1991
(Show Context)
Citation Context ...ral (principal) typings, which summarize all possible typings for a given term. A form of subtyping which is logically simple and natural, yet expressive enough to be interesting, is atomic subtyping =-=[23, 24, 13, 14]-=- where only subtyping relations between atoms (type variables or constants) can occur in typings. However, even though several type inference algorithms have appeared for atomic subtyping (e.g., [24, ... |

76 |
P.: Type inference with subtypes
- Fuh, Mishra
(Show Context)
Citation Context ...ts, such as, e.g., numerals and numerical functions. We consider typing judgements t of the form t = C; \Gamma `P M : �� in the standard system of atomic subtyping studied in, e.g., [23], [24], [1=-=3], [14]-=-. The type system is a proof system for deriving such judgements, and it is given in Appendix A for reference. In a judgement, C is a constraint set, that is a finite set of subtyping hypotheses of th... |

68 | Simplifying subtyping constraints
- Pottier
- 1996
(Show Context)
Citation Context ...lem has generated a significant amount of work which aims at simplifying constraints in the typings generated by type inference algorithms; works addressing the subtype simplification problem include =-=[13, 10, 19, 30, 11, 26, 32, 12, 5]-=-. As is argued in [5], simplification is beneficial for at least three reasons: first, it may speed up type inference, second, it makes types more readable, and, third, it makes the information conten... |

59 | Subtyping constrained types
- Trifonov, Smith
- 1996
(Show Context)
Citation Context ...lem has generated a significant amount of work which aims at simplifying constraints in the typings generated by type inference algorithms; works addressing the subtype simplification problem include =-=[13, 10, 19, 30, 11, 26, 32, 12, 5]-=-. As is argued in [5], simplification is beneficial for at least three reasons: first, it may speed up type inference, second, it makes types more readable, and, third, it makes the information conten... |

56 |
Type inference in the presence of overloading, subtyping, and recursive types
- Kaes
- 1992
(Show Context)
Citation Context ...lem has generated a significant amount of work which aims at simplifying constraints in the typings generated by type inference algorithms; works addressing the subtype simplification problem include =-=[13, 10, 19, 30, 11, 26, 32, 12, 5]-=-. As is argued in [5], simplification is beneficial for at least three reasons: first, it may speed up type inference, second, it makes types more readable, and, third, it makes the information conten... |

44 |
editors, Theoretical Aspects of ObjectOriented Programming: Types, Semantics, and Language Design
- Gunter, Mitchell
- 1994
(Show Context)
Citation Context ...s and type inference for languages such as, e.g., the simply typed lambda calculus [7], ML [22], Haskell [18], Miranda [33] as well as being a basic notion in typed object oriented languages, see e.g.=-=[15, 11, 1]-=-. Type inference algorithms infer type information from programs without requiring programmers to insert explicit type declarations in the program and discovers many programming errors at compile time... |

44 | Principal type schemes for functional programs with overloading and subtyping
- Smith
- 1994
(Show Context)
Citation Context |

42 | Unification and ML type reconstruction
- KANELLAKIS, MAIRSON, et al.
- 1991
(Show Context)
Citation Context ...r a whole class of sound instance relations shown in [17]. The results of Section 4 as well as Theorem 5.6 are important ingredients in the lower bound proof to be presented below. Fors! we know (see =-=[20]-=-) that while textual type size can be exponential, dag-size (see, e.g., [20] and [25]Chapter 11.3) is at most linear. The basic property responsible for this is that the type system ofs! imposes enoug... |

42 |
Natural Deduction. Almquist
- Prawitz
- 1965
(Show Context)
Citation Context ...x:y:y) ji) hj x; y ji 8 This can be explained in terms of the Curry-Howard isomorphism, because one cannot define logical conjunction as a derived notion from implication in minimal logic (see, e.g., =-=[28]-=-.) gets principal typing ;; fx : ff; y : ffg `P M : (ff ! ff ! fi) ! fi This identification of types will render the lower-bound proof invalid for these encodings. However, instead of writing expressi... |

37 |
Coercion and type inference (summary
- Mitchell
- 1984
(Show Context)
Citation Context ...ral (principal) typings, which summarize all possible typings for a given term. A form of subtyping which is logically simple and natural, yet expressive enough to be interesting, is atomic subtyping =-=[23, 24, 13, 14]-=- where only subtyping relations between atoms (type variables or constants) can occur in typings. However, even though several type inference algorithms have appeared for atomic subtyping (e.g., [24, ... |

36 |
Polymorphic binding-time analysis
- Henglein, Mossin
- 1994
(Show Context)
Citation Context ...increasingly used in non-standard ways in type based program analysis, where program properties of a typed language are automatically extracted from the program text using inference algorithms, e.g., =-=[3, 4, 16]-=-. In all cases, subtyping adds expressiveness to a type system by allowing an expression to have several types depending on the context in which it occurs. This is achieved by imposing an order relati... |

35 |
Subtype inequalities
- Tiuryn
- 1992
(Show Context)
Citation Context ...nt set C over P , determine if C is satisfiable in P .) This result holds for P = n-crown, for all ns2, and it has been used by several researchers in the study of the complexity of subtype inference =-=[31, 21, 8, 9]-=-. 6 A related phenomenon is noticed by Pottier [26] for simplification with recursive types. Example 5.2 (2-crowns) A 2-crown is the poset with 4 elements 0; 1; 2; 3 ordered as shown below: 1 ? ? ? ? ... |

32 |
P.: Polymorphic subtype inference: Closing the theory-practice gap
- Fuh, Mishra
- 1989
(Show Context)
Citation Context ...amming 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 completenes... |

30 |
Lower bounds on type inference with subtypes
- Hoang, Mitchell
- 1995
(Show Context)
Citation Context ...hms have appeared for atomic subtyping (e.g., [24, 13, 14]), it is generally recognized that major obstacles remain for subtype inference to become practicable in a large scale setting. To quote from =-=[17], "th-=-e main problems seem to be that the algorithm is inefficient, and the output, even for relatively simple input expressions, appears excessively long and cumbersome to read". The problem has gener... |

25 | Algorithmic aspects of type inference with subtypes
- Lincoln, Mitchell
- 1992
(Show Context)
Citation Context ...nt set C over P , determine if C is satisfiable in P .) This result holds for P = n-crown, for all ns2, and it has been used by several researchers in the study of the complexity of subtype inference =-=[31, 21, 8, 9]-=-. 6 A related phenomenon is noticed by Pottier [26] for simplification with recursive types. Example 5.2 (2-crowns) A 2-crown is the poset with 4 elements 0; 1; 2; 3 ordered as shown below: 1 ? ? ? ? ... |

23 |
Constrained quantification in polymorphic type analysis
- Curtis
- 1990
(Show Context)
Citation Context |

18 | Optimal representations of polymorphic types with subtyping
- Aiken, Wimmers, et al.
- 1997
(Show Context)
Citation Context |

16 |
Efficient type reconstruction in the presence of inheritance
- Benke
- 1993
(Show Context)
Citation Context ...nt set C over P , determine if C is satisfiable in P .) This result holds for P = n-crown, for all ns2, and it has been used by several researchers in the study of the complexity of subtype inference =-=[31, 21, 8, 9]-=-. 6 A related phenomenon is noticed by Pottier [26] for simplification with recursive types. Example 5.2 (2-crowns) A 2-crown is the poset with 4 elements 0; 1; 2; 3 ordered as shown below: 1 ? ? ? ? ... |

16 | Making set-constraint program analyses scale
- Fahndrich, Aiken
- 1996
(Show Context)
Citation Context |

4 |
Some complexity bounds for subtype inequalities
- Benke
- 1995
(Show Context)
Citation Context |

2 | A gentle introduction to Haskell. Sigplan Notices - Hudak, Fasel - 1992 |

2 |
Satisfiability of inequalities in a poset. Studia Logica
- Pratt, Tiuryn
(Show Context)
Citation Context ... Thanks are due to Christian Mossin for a discussion about terms that generate hard constraint sets. Thanks also to Jerzy Tiuryn for helpful comments on [31], to Vaughan Pratt for helpful comments on =-=[27] and to my referees and Sergei Soloviev -=-for helpful comments on this paper. [const] C `P bsb 0 ; provided b P b 0 [ref] C `P ��s�� [hyp] C [ f��s�� 0 g `P ��s�� 0 [trans] C `P ��s�� 0 C `P �� 0s�� 00 ... |