## Using Parameterized Signatures to Express Modular Structure (1996)

### Cached

### Download Links

- [www-2.cs.cmu.edu]
- [www.cs.cmu.edu]
- [www.cis.upenn.edu]
- [www.cse.ogi.edu]
- DBLP

### Other Repositories/Bibliography

Venue: | POPL'96 |

Citations: | 67 - 1 self |

### BibTeX

@MISC{Jones96usingparameterized,

author = {Mark P. Jones},

title = {Using Parameterized Signatures to Express Modular Structure},

year = {1996}

}

### Years of Citing Articles

### OpenURL

### Abstract

Module systems are a powerful, practical tool for managing the complexity of large software systems. Previous attempts to formulate a type-theoretic foundation for modular programming have been based on existential, dependent, or manifest types. These approaches can be distinguished by their use of different quantifiers to package the operations that a module exports together with appropriate implementation types. In each case, the underlying type theory is simple and elegant, but significant and sometimes complex extensions are needed to account for features that are im- portant in practical systems, such as separate compilation and propagation of type information between modules. This paper presents a simple type-theoretic fi'amework for modular programming using parameterized signatmes. The use of quantifiers is treated as a necessary, but independent concern. Using familiar concepts of polymorphism, the resulting module system is easy to understaud and admits true separate compilation. It is also very powerful, supporting high-order, polymorphic, and first-class modules without further extension.

### Citations

1562 | The Definition of Standard ML
- Miller, Tofte, et al.
- 1990
(Show Context)
Citation Context ...provides one of the most powerful module systems in widespread use. The overall design is often explained in terms of dependent types, but it is not easy to discern their use in the formal definition =-=[20]-=-. Instead, the definition uses a semantics based on freshly generated tokens called stamps to account for the concepts of sharing and generativity. This approach works well as a method for the specifi... |

936 | A theory of type polymorphism in progra.mming
- Milner
- 1978
(Show Context)
Citation Context ...l role. However, we argue that much can be accomplished without type components. This, we believe, is also more in the spirit of the Hindley-Milner type system. For example, in Milner's original work =-=[19]-=-, types are used as a purely semantic notion, representing subsets of a semantic domain, not as any concrete form of value. A key observation is that type definitions within a module can be lifted to ... |

758 | On understanding types, data abstraction, and polymorphism
- Cardelli, Wegner
- 1985
(Show Context)
Citation Context ...: c ! Float ; : : : g There are three established methods for packaging a collection of operations like this together with a suitable implementation type: ffl Existential types (opaque, or weak sums) =-=[23, 5]-=-. In a module of type 9c:Complex c, the existential quantifier conceals the identity of the implementation type c by making it abstract. This approach allows packages to be treated as first-class valu... |

536 |
The Implementation of Functional Programming Languages
- Jones
- 1987
(Show Context)
Citation Context ...: : : end The solution in this case is to add an extra parameter to the datatype definition before moving it to the top-level, as shown in the following code fragment. This is just a form of -lifting =-=[8, 25]-=-: data f :List t = f :Nil j f :Cons t f :List f :: SIG t ! SIG 0 (f :List t ) f x = : : : Notice how the parameterized signatures in the type for f capture the relationship between the types involved ... |

292 |
Abstract types have existential types
- Mitchell, Plotkin
- 1985
(Show Context)
Citation Context ...powerful, and more effective module systems for practical programming languages. During the past decade, there have been several attempts to provide type-theoretic foundations for modular programming =-=[23, 16, 21, 7, 22, 27, 1, 6, 13, 15, 3]-=-. The main proposals can be distinguished by their use of different constructs to describe the type of a module. To illustrate these alternatives, suppose that we wish to construct a complex number To... |

267 | A type-theoretic approach to higher-order modules with sharing
- Harper, Lillibridge
- 1994
(Show Context)
Citation Context ...powerful, and more effective module systems for practical programming languages. During the past decade, there have been several attempts to provide type-theoretic foundations for modular programming =-=[23, 16, 21, 7, 22, 27, 1, 6, 13, 15, 3]-=-. The main proposals can be distinguished by their use of different constructs to describe the type of a module. To illustrate these alternatives, suppose that we wish to construct a complex number To... |

265 |
Constructive mathematics and computer programming
- Martin-Löf
- 1982
(Show Context)
Citation Context ...stentials are often too good at hiding implementation types because they do not allow adequate propagation of type information between packages [16]. ffl Dependent types (transparent, or strong sums) =-=[18, 16, 21]-=-. A module of type \Sigmac :Complex c is represented by a pair h; M i containing the typesused to represent complex numbers and an implementation M of type Complexsfor the complex number operators. Th... |

223 | Manifest types, modules, and separate compilation
- Leroy
- 1994
(Show Context)
Citation Context ...powerful, and more effective module systems for practical programming languages. During the past decade, there have been several attempts to provide type-theoretic foundations for modular programming =-=[23, 16, 21, 7, 22, 27, 1, 6, 13, 15, 3]-=-. The main proposals can be distinguished by their use of different constructs to describe the type of a module. To illustrate these alternatives, suppose that we wish to construct a complex number To... |

179 | Lambda lifting: transforming programs to recursive equations
- Johnsson
- 1985
(Show Context)
Citation Context ...: : : end The solution in this case is to add an extra parameter to the datatype definition before moving it to the top-level, as shown in the following code fragment. This is just a form of -lifting =-=[8, 25]-=-: data f :List t = f :Nil j f :Cons t f :List f :: SIG t ! SIG 0 (f :List t ) f x = : : : Notice how the parameterized signatures in the type for f capture the relationship between the types involved ... |

178 | A system of constructor classes: overloading and implicit higher-order polymorphism
- Jones
- 1993
(Show Context)
Citation Context ...ammer to supply explicit kind information, because this can be inferred automatically from a program text. We already have considerable experience with such systems from work with constructor classes =-=[10]-=- which uses the same ideas; we know that they work well in practice. ffl Nested polymorphism: In the general case, we will want to be able to define structures with polymorphic components and to use t... |

138 | A type-based compiler for standard ML
- Shao, Appel
- 1995
(Show Context)
Citation Context ...hout careful restrictions and extensions to ensure a suitable phase distinction [7] and to support features like sharing [14]. Even then, it is still not possible to support true separate compilation =-=[2]-=- or to use modules as firstclass values [22, 12]. ffl Manifest types (transluscent sums) [6, 13] are an attempt to bridge the gap between the weak and strong sum approaches described above. A module t... |

134 | Higher-order modules and the phase distinction
- Harper, Mitchell, et al.
- 1990
(Show Context)
Citation Context |

132 |
Qualified Types: Theory and Practice
- Jones
- 1994
(Show Context)
Citation Context ...ich can appear in types; this is reflected by the fact that the two expressions will be assigned different kinds. With this approach, sharing constraints can be understood as a form of qualified type =-=[9]-=-: prog :: (r :x = s:y) ) SIG r ! SIG 0 s The constraint (r :x = s:y) appearing here indicates that the x and y fields of r and s, respectively, must be equal. Note that we do not need to mention any o... |

125 | Using dependent types to express modular structure
- MacQueen
- 1986
(Show Context)
Citation Context |

106 | Applicative functors and fully transparent higher-order modules
- Leroy
- 1995
(Show Context)
Citation Context |

71 |
The essence of ML
- Mitchell, Harper
- 1988
(Show Context)
Citation Context |

61 | Smartest recompilation
- Shao, Appel
- 1993
(Show Context)
Citation Context ...d the value of a type component. Not surprisingly, this means that it is impossible to provide true separate compilation for SML [2]. Even the smartest recompilation scheme proposed by Shao and Appel =-=[26]-=- does not permit true separate compilation because it delays some type checking, and hence the detection of some type errors, to link-time. The need for type sharing constraints in functor definitions... |

58 | An extension of Standard ML modules with subtyping and inheritance
- Mitchell, Meldal, et al.
- 1991
(Show Context)
Citation Context |

57 | A semantics for higher-order functors
- MacQueen, Tofte
- 1994
(Show Context)
Citation Context ...al problems has been the difficulty in providing sufficiently general and accurate types to capture the fully transparent behaviour of higherorder functors that is predicted by operational frameworks =-=[27, 17]-=-. In recent work, Leroy has shown how a calculus of manifest types can be modified to avoid this problem [15]. His solution requires an extension of the type language to include functor application, f... |

56 | A syntactic theory of type generativity and sharing
- Leroy
- 1996
(Show Context)
Citation Context ...very powerful --- too powerful in fact to permit compile-time type checking without careful restrictions and extensions to ensure a suitable phase distinction [7] and to support features like sharing =-=[14]-=-. Even then, it is still not possible to support true separate compilation [2] or to use modules as firstclass values [22, 12]. ffl Manifest types (transluscent sums) [6, 13] are an attempt to bridge ... |

54 | Abstract types and the dot notation
- Cardelli, Xavier
- 1990
(Show Context)
Citation Context ...hat can be manipulated by compArith cpx . An alternative approach to existential typing, using dot notation in place of the open construct described above, has been investigated by Cardelli and Leroy =-=[4]-=-. The dot notation allows us to identify the implementation types of two packages if they have the `same name'. This avoids the first problem illustrated above, but not the second. Dot notation is als... |

53 |
The essence of functional programming (invited talk
- Wadler
- 1992
(Show Context)
Citation Context ...e of record types. This subject is discussed in more detail in Section 4.4. We can illustrate the use of both of these features with the following signature which provides a representation for monads =-=[28]-=-: type Monad m = f bind :: 8a:8b:m a ! (a ! m b) ! m b; unit :: 8a:a ! m a g Note that the kind inference mechanisms referred to above can be used to infer that the parameter m of the Monad signature ... |

31 |
An extension of ML with first-class abstract types
- Läufer, Odersky
- 1992
(Show Context)
Citation Context ... ensure a suitable phase distinction [7] and to support features like sharing [14]. Even then, it is still not possible to support true separate compilation [2] or to use modules as firstclass values =-=[22, 12]-=-. ffl Manifest types (transluscent sums) [6, 13] are an attempt to bridge the gap between the weak and strong sum approaches described above. A module type 9c =s:Complex c is much like an existential,... |

30 | Principal signatures for higher-order program modules
- Tofte
- 1992
(Show Context)
Citation Context |

23 | A category-theoretic account of program modules
- Moggi
- 1989
(Show Context)
Citation Context ...eparation; in general, a type of this form may include elements in which the type component of the result depends on the value component of the argument. As an alternative, Harper, Mitchell and Moggi =-=[7, 24]-=- have shown that a suitable phase distinction can be established by modelling functors from \Sigmas :f (s) to \Sigmat :g(t) as values of type \Sigmah :(8s:f (s) ! g(h(s))) where h ranges over function... |

18 | Higher-order functors with transparent signatures
- Biswas
- 1995
(Show Context)
Citation Context |

13 | Extending record typing to type parametric modules with sharing
- Aponte
- 1993
(Show Context)
Citation Context |

10 |
First-class polymorphism for ML
- Kahrs
- 1993
(Show Context)
Citation Context ...dependence of the implementation of a parameterized module from the implementation of its parameters. ffl To allow the definition of polymorphic modules, a useful feature that is not permitted in SML =-=[11]-=-. We believe that the use of polymorphism is natural and easy to understand, particularly for programmers who are already familiar with the type systems of the core languages of SML, Haskell, or simil... |

1 | Separate compilation for Standard NIL - Appel, MacQueen - 1994 |

1 | A type-t, hcoretic approach to higher-order modules with sharing - Harper, Lillibridge - 1994 |

1 | Applicative functors and fully transparent, hig]ler-order modules - Leroy - 1995 |

1 | Using clepeuclent types to express modular structure - hiacQueeu - 1986 |

1 | MacQueeu and Mads Tofte. A semantics for higher-order functors - David - 1994 |

1 | A theory of type polymorphism in programming - Milller - 1978 |

1 | The definitzor~ oj S/andor-d JIL - Tofte, Harper - 1990 |

1 | An extension of Stmdarcl hiL modules with subtyping and inheritance - Mitchell, Meldal, et al. - 1991 |

1 | The implementation of junctional programming languages - Jones - 1987 |