## Types for Modules (1998)

### Cached

### Download Links

- [www-2.cs.cmu.edu]
- [www.cs.cmu.edu]
- [www.lfcs.inf.ed.ac.uk]
- [www.research.microsoft.com]
- [www.lfcs.informatics.ed.ac.uk]
- [www.dcs.ed.ac.uk]
- [research.microsoft.com]
- [www.mpi-sws.org]
- [www.mpi-sws.org]
- [www.mpi-sws.org]
- [www.mpi-sws.org]
- [research.microsoft.com]
- [research.microsoft.com]
- [www.mpi-sws.org]
- [www.mpi-sws.org]
- [www.mpi-sws.org]
- [www.mpi-sws.org]
- [www.mpi-sws.org]
- [www.mpi-sws.org]
- [www.mpi-sws.org]
- [www.mpi-sws.org]
- [research.microsoft.com]
- [www.research.microsoft.com]
- [research.microsoft.com]
- DBLP

### Other Repositories/Bibliography

Citations: | 70 - 9 self |

### BibTeX

@TECHREPORT{Russo98typesfor,

author = {Claudio V. Russo},

title = {Types for Modules},

institution = {},

year = {1998}

}

### OpenURL

### Abstract

The programming language Standard ML is an amalgam of two, largely orthogonal, languages. The Core language expresses details of algorithms and data structures. The Modules language expresses the modular architecture of a software system. Both languages are statically typed, with their static and dynamic semantics specified by a formal definition.

### Citations

1613 | The Definition of Standard ML
- Milner, Tofte, et al.
- 1990
(Show Context)
Citation Context ...Overview of Standard ML The aim of this section is to briefly review the main features of the programming language Standard ML. A terse and completely formal semantics of Standard ML appears in [43]; =-=[42]-=- is an extensive commentary on this definition, sketching some of its meta-theory. A revised definition, with the two-fold aim of simplifying the semantics and meeting some user requests, appears in [... |

970 |
A Machine-oriented Logic Based on the Resolution Principle
- Robinson
- 1965
(Show Context)
Citation Context ...ypVar.u �≡ ′ b on Rule (R-3) ensures that only Rule (R-2) applies in the special case that both types are distinct variables. This implementation is based on Robinson’s original unification pr=-=ocedure [50]. Its co-=-rrectness is captured by the following theorem: Theorem 8.4 (Correctness of Unification [50]). For any simple types u and u ′ : Termination The appeal ⊢ u = u ′ a substitution, or failure. ↓ t... |

626 |
The Definition of Standard ML (Revised
- Milner, Tofte, et al.
- 1997
(Show Context)
Citation Context ...le module systems is so vast and fragmented that, to an outsider, it must surely be bewildering. Many non-standard type-theoretic [18, 16, 26, 25, 41, 9] (as well as several ad hoc, nontype-theoretic =-=[30, 31, 3]-=-) methodologies have been developed for explaining, defining, studying, and evolving the ML module systems, most with subtle semantic differences that are not spelled out clearly and are known only to... |

575 | Featherweight Java: A minimal core calculus for Java and GJ
- Igarashi, Pierce, et al.
(Show Context)
Citation Context ...idence of this simplicity, the inference rules comprising our elaboration translation are (with only one mild exception) short and sweet. For purposes of comparison, the semantics of Featherweight GJ =-=[21]-=- has roughly the same number of inference rules as our elaboration translation. 1 However, Featherweight GJ only defines a toy version of GJ, whereas our elaboration defines the semantics of a full-fe... |

461 |
The formulae-as-types notion of constructions
- Howard
- 1980
(Show Context)
Citation Context ...ms can be put in one-to-one relation with the inference rules of the logic. Such a correspondence is known as a Curry-Howard isomorphism,andgives rise to the interpretation of “propositions as types=-=” [15, 24]-=-. Each proposition is identified with a type, and each proof of the proposition with a term of that type. The correspondence goes deeper than this because the notions of equivalent proofs and equivale... |

378 |
ML for the Working Programmer
- Paulson
(Show Context)
Citation Context ...antics and meeting some user requests, appears in [44]. Numerous research reports and textbooks provide more tutorial introductions to programming in Standard ML. We recommend the textbook by Paulson =-=[48] a-=-nd the report by Tofte [56]. Our overview is intentionally informal — the syntax and static semantics of the language will be formalised in Chapter 3. Note that the syntax of our examples, although ... |

340 | Foundations for Programming Languages - Mitchell - 1996 |

311 | Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the Church-Rosser Theorem
- Bruijn
- 1972
(Show Context)
Citation Context ...gure 6.3 exploits an indexed reference to fully specify the problematic type of the structure expression Y in Figure 6.1. Our technique is essentially a combination of named identifiers and de Bruijn =-=[17]-=- indices. Although terms written in pure de Bruijn notation are notoriously difficult for humans to read, our scheme seems more acceptable in realistic programming situations. First, we need only use ... |

299 |
Abstract types have existential type
- Mitchell, Plotkin
- 1988
(Show Context)
Citation Context ...n the result type τ ′ : this guarantees that the type of the complete phrase is independent of the actual witness to α. As a programming construct, existential types correspond to abstract data ty=-=pes [46]-=-. Informally, an abstract data type consists of a set with a hidden representation and one or more operations over that representation, packaged up in a way that limits access to the representation ac... |

290 | A logic programming language with lambda-abstraction, function variables, and simple unification
- Miller
- 1991
(Show Context)
Citation Context ... construct realisations for type variables that occur in types that take the restricted form of higher-order patterns. Theclassof higher-order patterns was originally identified and studied by Miller =-=[39]. Definition 5-=-.25 (Algorithm ∀P.∀R ⊢O�O ′ ↓ ). Figure 5.18 defines the rules of an algorithm that, given as inputs two sets of type variables P and R, and a pair of semantic objects O and O ′ , be the... |

269 | A Type-Theoretic Approach to Higher-Order Modules with Sharing
- Harper, Lillibridge
- 1994
(Show Context)
Citation Context ...de to formally relate the existing semantics of Standard ML to HML . 50s2.3.3 Type-Theoretic Alternatives to Standard ML Modules 2.3.3.1 Harper & Lillibridge’s Translucent Sums Harper and Lillibridg=-=e [18]-=- present a type-theoretic alternative to Standard ML. They introduce a new type-theoretic construct called a translucent sum. Translucent sum terms are similar to the structures of Standard ML and the... |

224 | Manifest Types, Modules and Separate Compilation
- Leroy
- 1994
(Show Context)
Citation Context ... its curtailing signature. Arguing that the discrepancy between syntactic and semantic types is the root obstacle to separate compilation, Leroy proposes an alternative to the semantics of Modules in =-=[28]-=-. His approach is to eliminate the discrepancy by formulating a type theory that relies solely on syntactic type information, thus removing the need for semantic objects. Syntactically, his language i... |

156 |
Programmmg in Modula-2
- WIRTH
- 1982
(Show Context)
Citation Context ...rget languages, there probably never will be. 52s2.3.3.2 Leroy’s Modules Historically, the goal of designing a simple separate compilation scheme for Standard ML Modules, akin to Modula-2’s mechan=-=ism [59]-=-, has remained elusive. In particular, the naive scheme that identifies implementations of compilation units with curtailed structures, and interfaces of these units with their curtailing signatures, ... |

141 | Typeful programming
- Cardelli
- 1991
(Show Context)
Citation Context ...es not directly address other desirable features of modules languages, notably mechanisms for name space control and subtyping on module interfaces. 2.3.1.2 Cardelli’s Quest Cardelli’s language Qu=-=est [6, 8, 11, 9]-=- is an early type-theoretic programming language designed explicitly for the construction of modular programs. Quest is equipped with a form of dependent record, which allows sequences of related type... |

138 | Higher-order modules and the phase distinction
- Harper, Mitchell, et al.
- 1990
(Show Context)
Citation Context ...alogy was first expressed in MacQueen’s language DL [35], elaborated in Harper and Mitchell’s XML [20], and ultimately refined to account for the phase distinction in Harper, Mitchell and Moggi’=-=s HML [21]. -=-Certain aspects of this analogy, in particular the reliance on first-order dependent types, can still be found in the type-theoretic alternatives to Standard ML, namely Leroy’s Modules [28, 31, 29],... |

134 |
The undecidability of the second-order unification problem
- Goldfarb
- 1981
(Show Context)
Citation Context ...of [= τ : κ] → [= τ2[τ/β] : κ ′ ], which in turn will only hold if τ1[τ/α] ≡ τ2[τ/β]. Since κ may be a higher kind, this amounts to a higher-order unification problem, which is undecidable in general =-=[14]-=-. Fortunately, under minimal assumptions about the initial environment, we can show that such problematic cases never arise during elaboration. More precisely, we can show that, whenever we invoke Σ ≤... |

126 | Using dependent types to express modular structure
- MacQueen
- 1986
(Show Context)
Citation Context ...argument to its result. Like SOL, Quest supports first-class modules and avoids Standard ML’s stratification between Core and Modules. 2.3.1.3 MacQueen’s DL In an influential position paper, MacQu=-=een [35] c-=-riticises module languages in which the only facility for grouping related definitions of types and terms is provided by existential types. MacQueen’s argument is that existential types do not give ... |

125 | Unification under a mixed prefix
- Miller
- 1992
(Show Context)
Citation Context ...over simple types. To respect the scope of parameters, we will use a first-order variant of Miller’s more general algorithm for performing higher-order unification under a mixed prefix of quantifier=-=s [40]-=-. Our unification algorithm will take one additional argument, called the prefix to the unification problem. The prefix sets the scene for the unification algorithm by declaring the role and scope of ... |

116 |
A unification algorithm for typed λ-calculus
- Huet
- 1975
(Show Context)
Citation Context ...imply typed λ-calculus (cf. Remark 5.4.1). Although, in general, higher-order unification of typed λ-terms is undecidable and non-unitary (i.e. there may be more than one solution to a given problem=-=) [25]-=-, we shall find that the matching problems encountered during type checking belong to a restricted class of problem for which matching is both decidable and unitary. Indeed, we will only need to const... |

109 |
An algorithm for testing conversion in type theory
- Coquand
(Show Context)
Citation Context ... and unifying the body of the original abstraction with the body of the η-expansion. This trick for dealing with η-equivalence is inspired by Coquand’s algorithm for testing conversion in Type The=-=ory [12]. 304sQ⊢d=d ′ ↓ σ Q⊢d=d ′ ↓-=- σ (U-14) (U-14) If both types are definable types, we simply unify the definable types. Q⊢d=η(ν) ↓ σ Q⊢d=ν ↓ σ (U-15) Q⊢η(ν)=d ↓ σ Q⊢ν=d ↓ σ (U-16) (U-15),(U-16) These rule... |

108 | Applicative functors and fully transparent higher-order modules
- Leroy
- 1995
(Show Context)
Citation Context ...ors, in the sense that every application of a given functor yields equivalent abstract types, instead of generating fresh ones. The idea of an applicative semantics for functors originates with Leroy =-=[29]-=-. Unfortunately, our approach to an applicative semantics is too naive and fails to 111sFigure 4.3 A sound phrase that nevertheless fails to type-check due to the generativity of functor application. ... |

104 | On the type structure of standard ML
- Harper, Mitchell
- 1993
(Show Context)
Citation Context ...(Σα:⋆.triv):⋆. Thus we essentially have a type of all types. Much as admitting a set of all set leads to an inconsistent set theory, admitting a type of all types leads to an inconsistent type t=-=heory [23, 20]-=-. In this case, the inconsistency follows from the existence of well-typed, but non-normalising, terms. By the same token, the term equivalence judgement is undecidable. Because we have types dependin... |

102 | Type Theory and Functional Programming - Thompson - 1991 |

98 |
Type Assignment in Programming Languages
- Damas
- 1985
(Show Context)
Citation Context ...ent should be clearly distinguished from the judgement C⊢e:v (required by Hypothesis 3.19) that classifies an expression by a value type, i.e. a universally quantified simple type. As for ordinary M=-=L [41, 16]-=-, it is a property of Core-ML that every typable value expression has a principal,ormost general, value type. The judgements are defined by the following rules: 3.2.3.1 Denotation Rules Simple Types C... |

94 | Operational Semantics and Polymorphic Type Inference
- Tofte
- 1988
(Show Context)
Citation Context ...ompile-time equational reasoning on module terms is a distinct departure from the rigid phase-distinction enjoyed by Standard ML. 56s2.3.4 Miscellaneous Related Work The second part of Tofte’s thesi=-=s [55] i-=-nvestigates a skeletal, first-order modules language. The language supports signatures, structures and functors but no core types or values. This is a kernel system for a forerunner of Standard ML’s... |

92 | A type-theoretic interpretation of Standard ML
- Harper, Stone
- 1998
(Show Context)
Citation Context ...mpositional translation into vanilla Fω, under plain Fω typing environments. Our approach thus synthesizes elements of the two alternative definitions of Standard ML modules given by Harper and Stone =-=[20]-=- and Russo [37]. Like the former, we define our semantics by elaboration; but whereas Harper and Stone elaborate ML modules into yet another module type system (a variant of Harper-Lillibridge [16]), ... |

86 | ECC an Extended Calculus of Constructions - Luo - 1989 |

85 | Engineering Formal Metatheory
- Aydemir, Charguéraud, et al.
- 2008
(Show Context)
Citation Context ...borating the simplicity of our approach (and also as an excuse to learn Coq), we mechanized the soundness of our elaboration translation in Coq using the “locally nameless” approach of Aydemir et al. =-=[1]-=-. Towards the end of the paper (Section 7), we report on our mechanization experience, which, while ultimately successful, was not as pleasant as we had hoped. In general, we have tried to give this p... |

83 | R.: A type system for higher-order modules
- Dreyer, Crary, et al.
- 2003
(Show Context)
Citation Context ... believe the problem is that the literature on the semantics of ML-style module systems is so vast and fragmented that, to an outsider, it must surely be bewildering. Many non-standard type-theoretic =-=[18, 16, 26, 25, 41, 9]-=- (as well as several ad hoc, nontype-theoretic [30, 31, 3]) methodologies have been developed for explaining, defining, studying, and evolving the ML module systems, most with subtle semantic differen... |

80 | A modular module system
- Leroy
(Show Context)
Citation Context ... not depend on) some local abstract type. As principal signatures are important for practical typechecking, dependent module type systems typically either lack complete typechecking algorithms (e.g., =-=[28, 27]-=-) or else require (at least in some cases) extra signature annotations when leaving the scope of an abstract type (e.g., [41, 9]). In contrast, under our approach the avoidance problem does not arise ... |

80 | System F with type equality coercions
- Sulzmann, Chakravarty, et al.
- 2007
(Show Context)
Citation Context ...y predominant. Why is this so? Are ML modules really more difficult to program/implement/understand than other ambitious modularity mechanisms, such as GHC’s type classes with type equality coercions =-=[44]-=- or Java’s classes with generics and wildcards [45]? We think not (although this is obviously a fundamentally subjective question). One can certainly engage in a constructive debate about whether the ... |

77 | Towards a mechanized metatheory of Standard ML
- Lee, Crary, et al.
- 2007
(Show Context)
Citation Context ...resh Fω variables (which may not). In this way, source identifiers are used to determine record labels, while their twinned variables are used to translate free occurrences of identifiers. Lee et al. =-=[24]-=- use a similar trick in their Twelf mechanization of Standard ML. Our use of a non-injective record encoding means that different semantic signatures may be encoded by the same type. To avoid ambiguit... |

65 | Using parameterized signatures to express modular structure
- Jones
- 1996
(Show Context)
Citation Context ...r a more radical but conceptually simpler approach to modules, based on interpreting some, but not all, of the features of Standard ML Modules directly in an extension of the Core language, see Jones =-=[26]-=-. The companion paper by Nicklish and Peyton Jones [47] offers an informal comparison of the two approaches. 2.3.5 Summary One characteristic feature of Standard ML Modules is the ability to define st... |

64 | A semantic basis for Quest
- Cardelli, Longo
- 1991
(Show Context)
Citation Context ...es not directly address other desirable features of modules languages, notably mechanisms for name space control and subtyping on module interfaces. 2.3.1.2 Cardelli’s Quest Cardelli’s language Qu=-=est [6, 8, 11, 9]-=- is an early type-theoretic programming language designed explicitly for the construction of modular programs. Quest is equipped with a form of dependent record, which allows sequences of related type... |

63 | Recursive structures for Standard ML
- Russo
- 2001
(Show Context)
Citation Context ...and elimination of existential types. Given the non-dependent, Fω-like structure of the semantic objects, it was also relatively straightforward to extend them to higher-order and first-class modules =-=[37, 38]-=-. Our approach also scales to handle more ambitious modulelanguage extensions, at least if one is willing to beef up the target language somewhat. Inspired by Russo’s work, Dreyer proposed an extensio... |

63 | State-dependent representation independence - Ahmed, Dreyer, et al. - 2009 |

60 | Translucent sums : a foundation for higher-order module systems
- Lillibridge
- 1997
(Show Context)
Citation Context ... little to clarify the semantics of Standard ML presented in [43, 44]. Furthermore, there is currently no proof3 that this translation is faithful to the original semantics. The thesis of Lillibridge =-=[33]-=- develops the meta-theory of a drastically simplified type theory that is presented as a kernel version of the translucent sum calculi underlying [18, 53, 22]. 3 Given the size of both the source and ... |

59 | A semantics for higher-order functors
- MacQueen, Tofte
- 1994
(Show Context)
Citation Context ...le module systems is so vast and fragmented that, to an outsider, it must surely be bewildering. Many non-standard type-theoretic [18, 16, 26, 25, 41, 9] (as well as several ad hoc, nontype-theoretic =-=[30, 31, 3]-=-) methodologies have been developed for explaining, defining, studying, and evolving the ML module systems, most with subtle semantic differences that are not spelled out clearly and are known only to... |

58 | A kernel language for abstract data types and modules - Burstall - 1984 |

56 | A syntactic theory of type generativity and sharing
- Leroy
- 1996
(Show Context)
Citation Context ...f choosing between different non-dependent subtypes of a functor: as a result, these calculi fail to enjoy the principal (i.e. minimal) typing property. Another variant of these calculi, presented in =-=[31], -=-adopts a restricted grammar that only allows applications of functors to paths. Although this restriction seems to avoid the problem with principal types, it fails to capture Standard ML’s ability t... |

54 | Abstract types and the dot notation
- Cardelli, Leroy
- 1990
(Show Context)
Citation Context ...re accessed by a restricted form of the dot notation rather than the more unwieldy open phrase. This use of the dot notation to eliminate existentials is studied further in Cardelli and Leroy’s pape=-=r [10]. -=-Quest is rather different from Standard ML. Although Quest’s record terms are similar to structure bodies, type components of Quest records are invariably abstract. As a result, interpreting a struc... |

44 | The Objective Caml system, documentation, and user's guide - Leroy - 1998 |

43 | Understanding and Evolving the ML Module System
- Dreyer
- 2005
(Show Context)
Citation Context ...ch as Harper’s draft book on SML [15] and Paulson’s book [34]. For the latter, we refer the reader to Harper and Pierce [19], as well as the early chapters of the second and third authors’ PhD theses =-=[37, 6]-=-. 2. The Module Language Figure 1 presents the syntax of our module language. We assume a core language consisting of syntax for kinds, types, and expressions, whose details do not matter for our deve... |

39 | An interpretation of Standard ML in type theory
- Harper, Stone
- 1997
(Show Context)
Citation Context ... core language is subsumed by enriching the modules language directly with computational mechanisms normally associated with the core. This is made more explicit in follow-on work by Harper and Stone =-=[53, 22]-=-, that describes an interpretation of Standard ML into a variant of the translucent sum calculus, extended directly with state and exceptions. These papers give an involved syntactic translation, whic... |

36 |
A theory of type polymorphism in programming languages
- Milner
- 1978
(Show Context)
Citation Context ...lows. Avaluetypev enriches another value type v ′ , written v � v ′ , if and only if, for every simple type u, v ≻ u whenever v ′ ≻ u. It is well-known that closed under realisation. � i=-=s a pre-order [41]-=-. It is easy to show that it is 3.2.3 Static Semantics Definition 3.29 (Core-ML Judgements (cf. Hypothesis 3.19). The denotation and classification judgements of Core-ML are presented in Figure 3.14. ... |

34 | Extensional equivalence and singleton types
- Stone, Harper
- 2006
(Show Context)
Citation Context ...ifferences that are not spelled out clearly and are known only to experts. As a rich type theory has developed around a number of these methodologies—e.g., the beautiful metatheory of singleton kinds =-=[43]-=-—it is perfectly understandable for someone encountering a paper on module systems for the first time to feel intimidated by the apparent depth and breadth of knowledge required to understand module t... |

31 | Principal signatures for higher-order program modules
- Tofte
- 1992
(Show Context)
Citation Context ...ructure sharing constraints to principal semantic objects. Aponté [1] suggests a more modern, alternative treatment of the notion of structure identity and sharing actually adopted in Standard ML. In=-= [57, 58]-=-, Tofte describes preliminary work towards a direct extension of Standard ML with higher-order functors. In particular, he proves the existence of principal semantic objects for signatures that contai... |

29 | Transparent modules with fully syntactic signatures
- Shao
- 1999
(Show Context)
Citation Context ... believe the problem is that the literature on the semantics of ML-style module systems is so vast and fragmented that, to an outsider, it must surely be bewildering. Many non-standard type-theoretic =-=[18, 16, 26, 25, 41, 9]-=- (as well as several ad hoc, nontype-theoretic [30, 31, 3]) methodologies have been developed for explaining, defining, studying, and evolving the ML module systems, most with subtle semantic differen... |

26 |
Pebble, a kernel language for modules and abstract data types
- Lampson, Burstall
- 1988
(Show Context)
Citation Context ... advocates the use of dependent types as a basis for modular programming, drawing inspiration from the novel adoption of dependent types in Burstall and Lampson’s experimental modules language Pebbl=-=e [4, 5]. Ma-=-cQueen sketches the language DL, which is presented as a “de-sugared” version of the Standard ML Modules language originally proposed by him in [19]. DL exploits a combination of strong higher-ord... |

26 |
Recursive type generativity
- DREYER
(Show Context)
Citation Context ... scales to handle more ambitious modulelanguage extensions, at least if one is willing to beef up the target language somewhat. Inspired by Russo’s work, Dreyer proposed an extension of Fω called RTG =-=[7]-=-, which he and coauthors later used as the target of an elaboration semantics for recursive modules [5], mixin modules [11], and modules in the presence of type inference [8]. These elaboration semant... |