No-Longer-Foreign: Teaching an ML compiler to speak C ``natively.'' Matthias Blume. In BABEL'01: First workshop on multi-language infrastructure and interoperability, September 2001, Firenze, Italy. (Here is a slightly more detailed early draft of the same paper.)
This paper shows how to encode (almost all of) the C type system using ML. This allows ML and C program to achieve data-level interoperability.
The ML FFI system described in the paper knows how to take C type definitions (h files) and create the ML information automatically.
The paper shows how to represent array types so that array dimensions can be checked statically, using phantom types. I believe Oleg has has implemented similar things in Haskell.
Posted to implementation by Ehud Lamm on 2/25/02; 10:56:09 AM
|