About: Composite data type is a research topic. Over the lifetime, 104 publications have been published within this topic receiving 3361 citations. The topic is also known as: compound data type & composite type.
TL;DR: 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.
Abstract: Programming computers is a notoriously error-prone process. It is the job of the programming language designer to make this process more reliable. One approach to this is to impose some sort of typing discipline on the programs. In doing this, the programming language designer is immediately faced with a tradeoff: if the type system is too simple, it cannot accurately express important properties of the program; if it is too expressive, then mechanically checking or inferring the types becomes impractical. This thesis describes a type system called refinement types, which is an example of a new way to make this tradeoff, as well as a potentially useful system in itself.
Refinement type inference requires programs to have types in two type systems: an expressive type inference system (intersection types with subtyping) and a relatively simple type system (basic polymorphic type inference). Refinement type inference inherits some properties from each of these: as in intersection types with subtyping, we can use the type system to do abstract interpretation; as in basic polymorphic type inference, refinement type inference is decidable (preliminary experiments suggest refinement type inference may be practical as well).
We have implemented refinement type inference for a subset of Standard ML to test these ideas. We have added new syntax, called rectype declarations, to allow the programmer to specify relevant domains for the abstract interpretation. A prototype implementation of refinement type inference can do some interesting case analysis for Standard ML programs; for example, if the programmer uses a rectype declaration to declare interest in whether a boolean expression is in conjunctive normal form (CNF), refinement type inference can efficiently prove that a function for converting boolean expressions to CNF does indeed always return a boolean expression in CNF. Rectype declarations and refinement type inference seem flexible and efficient enough to practically enforce many other useful program properties as well.
TL;DR: The EL1 language contains a number of features specifically designed to simultaneously satisfy both natural problem-oriented notation and efficient implementation, in a context that allows efficient compiled code and compact data representation.
Abstract: In constructing a general purpose programming language, a key issue is providing a sufficient set of data types and associated operations in a manner that permits both natural problem-oriented notation and efficient implementation. The EL1 language contains a number of features specifically designed to simultaneously satisfy both requirements. The resulting treatment of data types includes provision for programmer-defined data types and generaic routines, programmer control over type conversion, and very flexible data type behavior, in a context that allows efficient compiled code and compact data representation.
TL;DR: 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.
Abstract: Conventional Milner-style polymorphic type checkers automatically infer types of functions and simple composite objects such as tuples. Types of recursive data structures (e.g. lists) have to be defined by the programmer through an abstract data type definition. In this paper, we show how abstract data types, involving type union and recursion, can be automatically inferred by a type checker. The language for describing such types is that of regular trees, a generalization of regular expressions to denote sets of tree structured terms. Inference of these types is reducible to the problem of solving simultaneous inclusion inequations over regular trees. We present algorithms to solve such inequations. Using these techniques, programs without any type definitions and type annotations for functions can be type checked.
TL;DR: It is argued that an approach with a combination of static and dynamic type checking gives a reasonable balance and it is concluded that this approach makes it possible to base the type system on the class/subclass mechanism.
Abstract: This paper is concerned with the relation between subtyping and subclassing and their influence on programming language design. Traditionally subclassing as introduced by Simula has also been used for defining a hierarchical type system. The type system of a language can be characterized as strong or weak and the type checking mechanism as static or dynamic. Parameterized classes in combination with a hierarchical type-system is an example of a language construct that is known to create complicated type checking situations. In this paper these situations are analyzed and several different solutions are found. It is argued that an approach with a combination of static and dynamic type checking gives a reasonable balance also here. It is also concluded that this approach makes it possible to base the type system on the class/subclass mechanism.
TL;DR: The approach has been implemented in Generic Haskell, a generic programming extension of the functional language Haskell, and it is shown how to define type-indexed data types, discusses several examples of type- indexes, and shows how to specialize type- indexed data types.
Abstract: A polytypic function is a function that can be instantiated on many data types to obtain data type specific functionality. Examples of polytypic functions are the functions that can be derived in Haskell, such as show, read, and '=='. More advanced examples are functions for digital searching, pattern matching, unification, rewriting, and structure editing. For each of these problems, we not only have to define polytypic functionality, but also a type-indexed data type: a data type that is constructed in a generic way from an argument data type. For example, in the case of digital searching we have to define a search tree type by induction on the structure of the type of search keys. This paper shows how to define type-indexed data types, discusses several examples of type-indexed data types, and shows how to specialize type-indexed data types. The approach has been implemented in Generic Haskell, a generic programming extension of the functional language Haskell.