Subtyping with Union Types, Intersection Types and Recursive Types

  title={Subtyping with Union Types, Intersection Types and Recursive Types},
  author={Flemming M. Damm},
  • F. Damm
  • Published in TACS 19 April 1994
  • Computer Science
Union, intersection and recursive types are type constructions which make it possible to formulate very precise types. However, because of type checking difficulties related to the simultaneous use of these constructions, they have only found little use in programming languages. One of the problems is subtyping. We show how the subtype decision problem may be solved by an encoding into regular tree expressions, and prove soundness and completeness with respect to the classical ideal model for… 
Subtyping Union Types
A fairly large class of calculi is considered, which allows us to find a subtyping relation which is both robust (it is sound for all calculi) and precise ( it is complete with respect to the class of Calculi).
Semantic subtyping: Dealing set-theoretically with function, union, intersection, and negation types
This work shows how to define a subtyped relation semantically in the presence of Boolean connectives, functional types and dynamic dispatch on types, without the complexity of denotational models, and how to derive a complete subtyping algorithm.
A Decidable Subtyping Logic for Intersection and Union Types
Using Curry-Howard isomorphism, the typed lambda-calculus with intersection and union types is extended, and its corresponding proof-functional logic is defined, with subtyping and explicit coercions.
Semantic Subtyping: Challenges, Perspectives, and Open Problems
The approach to define subtyping relations where types are interpreted as sets and union, intersection and negation types have the corresponding set-theoretic interpretation is outlined and an apercu of its expressiveness and generality is given.
Semantic subtyping: challenges, perspectives, and open problems
The semantic subtyping approach is out- line by applying it to the λ-calculus with recursive and product types and to the π-Calculus, discussing in detail the new challenges and research perspectives that the approach brings forth.
Subtyping Union Types May 5 , 2004
This work considers a fairly large class of calculi, and considers a simple type system with union, function, pair and constant types, and defines types in a semantic fashion, as sets of terms, which are expected to allow the study of subtyping relations that only hold for some calculi by restricting the class considered.
Sound and Complete Flow Typing with Unions, Intersections and Negations
This paper presents a sound and complete algorithm for subtype testing in the presence of unions, intersections and negations and demonstrates that this problem was decidable.
Union and intersection types to support both dynamic and static typing
An approach to checking the non-disjointness of types in functional programming
It turns out that it is a central question for the new type checker to check whether two types denote sets of values that are non-disjoint, and an algorithm CE is specified that approximates this question and proves the main properties of CE.
Semantic subtyping with an SMT solver
A novel type-checking algorithm able to eliminate many dynamic tests and to detect many errors statically is presented, to rely on an SMT solver to compute subtyping efficiently.


Declaration-free type checking
This paper shows how abstract data types, involving type union and recursion, can be automatically inferred by a type checker, and presents algorithms to solve simultaneous inclusion inequations over regular trees.
Programming with intersection types, union types, and polymorphism
This report summarizes a preliminary investigation of the expressiveness of a programming language combining intersection types, union types, and polymorphism.
Subtyping recursive types
It is shown that to every pair of types in the subtype relation the authors can associate a term whose denotation is the uniquely determined coercion map between the two types, and derive an algorithm that can infer its least type whenever possible.
Type inclusion constraints and type inference
The application of the constraint solving algorithm with a type inference system for the lambda calculus with constants is illustrated, which is an extension of the Hindley/Milner system that can type a very large set of lambda terms.
Static type inference in a dynamically typed language
This work presents a type inference system for FL based on an operational, rather than a denotational, formulation of types that implements an abstract interpretation of the operational semantics of FL.
An ideal model for recursive polymorphic types
When constants are added to the pure lambda calculus, run-time errors can occur if the constants are used improperly, for example, if an at tempt is made to apply a natural number as if it were a
Refinement types for ML
A type system called refinement types is described, which is an example of a new way to make this tradeoff, as well as a potentially useful system in itself.
On understanding types, data abstraction, and polymorphism
A λ-calculus-based model for type systems that allows us to explore the interaction among the concepts of type, data abstraction, and polymorphism in a simple setting, unencumbered by complexities of production programming languages is developed.
Solving systems of set constraints with negated subset relationships
It is proved in a constructive way that a non empty set of solutions always contains a regular solution, that is a tuple of regular tree languages.
Implementing Regular Tree Expressions
A combination of algorithms, optimizations, and fast heuristics for computationally difficult problems yields an implementation efficient enough for practical use of regular tree expressions.