Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Re: Compiler translation of array indexing
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Pierre Weis <Pierre.Weis@i...>
Subject: Re: Compiler translation of array indexing
> Instead of translating as in OCAML to Array.get and
> Array.set, they could be translated into some equivalent to
> x.(n)  ->  module_of(type_of x).get(x, n)

There are strong theoretical difficulties to obtain a type_of function
embedded into a statically & strongly type checked language such as
Caml. A (limited) form of this type_of facility is the entire subject of
the following reserch paper:

This is also the subject of Jun Furuse's PHD: he is working since 1996
to implement this type-checking discipline into a working O'Caml
compiler. We also made some progress on the theoretical side, compared
to the above reference, and all these results will be reported in Jun's
thesis (strongly expected before this summer).

This work had also produced a safe value I/O system for Objective
Caml, that is a fully typechecked and safe polymorphic input/output
set of primitives for Objective Caml.
The design and implementation is described into the following
(forcoming) article :
(Limited to those of you who can read french, since it has not yet
been translated into english, sorry for that.)

We also plan to distribute Jun's implementation in the near future, to
let you play with it.

Best regards,

Pierre Weis

INRIA, Projet Cristal,,