Team Gallium

Overall Objectives
Scientific Foundations
Application Domains
New Results
Contracts and Grants with Industry
Other Grants and Activities

Section: New Results

First-class module systems

Participants : Benoît Montagu, Didier Rémy.

Advanced module systems have now been in use for two decades in modern, statically typed languages. Modules are easy to understand intuitively and also easy to use in simple cases. However, they remain surprisingly difficult to formalize and also often become harder to use in larger, more complex but practical examples. In fact, useful extensions such as recursive modules or mixin modules are technically challenging and still an active topic of research.

This persisting gap between the apparent simplicity and formal complexity of modules is surprising. Benoît Montagu and Didier Rémy have identified at least two orthogonal sources of complexity, width-wise and depth-wise. On the one hand, the stratified presentation of modules as a small calculus of functions and records on top of the underlying base language duplicates the base constructs and therefore complicates the language as a whole. On the other hand, the use of paths to designate abstract types relatively to value variables, in order to keep track of sharing, pulls the whole not-so-simple formalism of dependent types, even though only a very limited form of dependent types is effectively used.

Benoît Montagu and Didier Rémy's work aims at providing a new presentation of modules that is conceptually more economical while retaining (or increasing) the expressiveness and conciseness of the actual approaches. This presentation relies on first-class modules to avoid duplications of constructs, a new form of open existential types to represent type abstraction, and the theory of singleton kinds to handle type definitions and to preserve the conciseness of writing.

Open existential types improve over existential types with a novel, open-scoped, unpacking construct that is the essence of type abstraction in modules, and can also easily handle recursive modules. This work was presented at the symposimum on Principles of Programming Languages (POPL 2009) that was held in Savannah, USA in January 2009 [21] .

Benoît Montagu and Didier Rémy currently focus their efforts on the study of the singleton kinds system, more specifically on giving an alternative definition in which type equivalence would be based on $ \beta$$ \eta$ -conversion. This work would give a more operational presentation of the singleton kinds system and hopefully facilitate extensions.


Logo Inria