Section: New Results

The Caml language and system

The OCaml system

Participants : Xavier Clerc [team SED] , Damien Doligez, Alain Frisch [Lexifi SAS] , Jacques Garrigue [University of Nagoya] , Fabrice Le Fessant [EPI Asap and OCamlPro start-up company] , Jacques Le Normand [Lexifi SAS] , Xavier Leroy, Nicolas Pouillard, Pierre Weis [EPI Estime] .

This year, we released version 3.12.1 of the OCaml system. This is a minor release that fixes 65 reported bugs and 9 unreported bugs, and introduces 11 small extensions. Damien Doligez acted as release manager for this version.

In parallel, we have been working on the next major release of OCaml. The major innovation is support for generalized algebraic datatypes (GADTs). These non-uniform datatype definitions enable programmers to express some invariants over data structures, and the OCaml type-checker to enforce these invariants. They also support interesting ways of reflecting types into run-time values. GADTs are found in proof assistants such as Coq and in functional languages such as Agda and Haskell. Their integration in OCaml raised delicate issues of partial type inference and principality of inferred types, to which Jacques Garrigue and Jacques Le Normand provided original solutions [43] .

Other features in preparation for the next major release include:

  • More lightweight first-class modules. Signature annotations over first-class modules can now be omitted when they are determined by the context.

  • Better reporting of type errors: shorter but more relevant context is shown; improved tracking of source code locations in modules.

  • Improvements in native-code generation, for instance in the case of partial function applications.

  • Improvements in the generic hashing primitive and the standard library for hash tables.

Customizable unmarshaling for OCaml

Participants : Pascal Cuoq [CEA LIST] , Damien Doligez, Julien Signoles [CEA LIST] .

In collaboration with members of the CEA LIST laboratory, Damien Doligez developed a Caml library for treating marshaled data by applying user-specified on-the-fly transformations during the unmarshaling process. This library is used in CEA's Frama-C software to support marshaling of hash-consed data. The library was presented at the ML workshop [32] .