Other development tools
We have restricted ourselves up to now to the Objective CAML distribution.
Nevertheless the community of developers using this language is active, as
demonstrated by the number of messages on the firstname.lastname@example.org
mailing list. Numerous tools, libraries, and extensions are used to
facilitate development. In the following we detail the use of tools for
editing, syntax extension, interfacing with other languages and parallel
programming. We mention as well the numerous graphical interface
libraries. Most of these contributions can be found on the ``Caml Hump''
There are several modes recognizing Objective CAML syntax for the emacs
editor. These modes are used to automatically indent text in the course of
entering it, making it more readable. This is an alternative to the
interaction window under Windows. Since emacs runs under
Windows, the Objective CAML toplevel can be launched within one of its
The lexical and syntactic analysis tools provided by the distribution are
already quite complete, but they don't support extending the syntax of the
language itself. The camlp4 tool (see the link on page
??) is used in place and instead of Objective CAML's syntactic
analyzer. The latter's compilers have only to proceed to typing and code
generation. This tool allows the user to extend the syntax of the
language, or to change to the original syntax. Moreover it offers
pretty-printing facilities for the generated syntax trees. In this way it
becomes easy to write a new toplevel for any Objective CAML syntax extension,
or even another language implemented in Objective CAML.
Interoperability with other languages
Chapter 12 detailed how to interface the Objective CAML language with
C. A multi-language application takes advantage of the features of each
one, all while making different codes sharing a single memory space live in
harmony. Nevertheless encapsulating C functions to make them callable from
Objective CAML requires some tedious work. To simplify it, the camlIDL
tool (see the link on page ??) supplies an interface
generator and tools for importing COM (Windows) components into Objective CAML.
The interfaces are generated from an IDL interface description file.
The Graphics library allows the development of drawings and simple
interactions, but it can't be considered a graphical interface worthy of
the name. Chapter 13 has shown how this library
could be extended to construct graphical components responding to some
interactions. Using Graphics as a base allows us to preserve the
portability of the interface between different platforms (X-Windows,
Windows, MacOS), but limits its use to the low level of events and
Several projects attempt to fill this gap, unfortunately none succeeds in
being complete, portable, documented, and simple to use. Here is a list
(extracted from the ``Caml Hump'') of the main projects:
Despite the efforts of the community, there is a real lack of tools for
constructing portable interfaces. It may be hoped that LabTk becomes
portable to different systems.
OlibRt: under this sweet name, it is a veritable toolbox, constructed
under X-Windows, but not documented. Its distribution contains complete
examples and in particular numerous games.
- camlTk is a complete and well documented interface to the Tk toolkit.
Its weak point is its dependency on particular versions of Tcl/Tk, which
makes it difficult to install. It was used to build the web browser
mmm [Rou96] written in Objective CAML.
- The Xlib library has been rewritten in Objective CAML.
Efuns, a mini-clone of emacs, was developed using it.
Xlib is not really a toolbox, and is not portable to graphical
systems other than X-Windows.
- mlGtk is an interface built on Gtk. It is in development and has no
documentation. Its interest lies in being portable under Unix and
Windows (because Gtk is) in a simpler fashion than Tk. Besides it uses
Objective CAML's object-oriented layer---which doesn't happen without sometimes
posing some problems.
- LabTk is an interface to Tcl/Tk, for Unix, using extensions to
Objective CAML which will be integrated into the next version (see appendix
B). It includes its own Tcl/Tk distribution which
Parallel programming and distributionThreads and sockets already offer basic mechanisms for concurrent and
distributed programming. Interfacing with the C language allows the use
of classic parallel programming libraries. The only thing missing is an
interface with CORBA for invoking methods of remote objects. On the other
hand, there are numerous libraries and language extensions which use
different models of parallelism.
The two main parallel programming libraries,
MPI (Message Passing Interface) and PVM
(Parallel Virtual Machine), are interfaced with Objective CAML. Documentation,
links, and sources for these libraries can be found on the site
The ``Caml Hump'' contains the various HTTP addresses from which the
versions interfaced with Objective CAML can be downloaded.
Numerous parallel extensions of Caml-Light or Objective CAML have been
Caml-Flight ([FC95]) is a SPMD (Simple Program Multiple
Data) extension of the Caml-Light language. A program executes a copy of
itself on a fixed number of processes. Communications are explicit, there
is only one communication operation get which can only be executed
from within the synchronization operation sync.
- BSML [BLH00] is an extension by BSP operations. The
language preserves compositionality and allows precise predictions of
performance if the number of processors is fixed.
- OCAMLP3 [DDLP98]
is a parallel programming environment based on the skeleton model of
the P3L language. The various predefined skeletons can overlap.
Programs may be tested either in sequential mode or parallel mode, thus
supporting reuse of Objective CAML's own tools.
- JoCAML [CL99] is based on the join-calculus model which
supports high-level operations for concurrency, communication, and
synchronization in the presence of distributed objects and mobile code, all
while preserving automatic memory management.
- Lucid Synchrone ([CP95])
is a language dedicated to the implemenation of reactive systems. It
combines the functionality of Objective CAML and the features of
data-flow synchronous languages.