Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Xavier Leroy <Xavier.Leroy@inria.fr>
To: laheadle@midway.uchicago.edu (Lyn A Headley)
Cc: caml-list@inria.fr
Subject: Re: overview of bootstrapping caml light
Date: Wed, 26 Feb 1997 10:58:20 +0100 (MET)	[thread overview]
Message-ID: <199702260958.KAA29329@pauillac.inria.fr> (raw)
In-Reply-To: <199702260449.WAA18628@kimbark.uchicago.edu> from Lyn A Headley at "Feb 25, 97 10:49:33 pm"

> I have been trying to understand the bootstrapping process
> which takes place during caml light installation.  If you'll
> indulge me, I'd like to present my view of what is going on,
> to see if I have the right idea, and then ask some questions.
> 
> The first step is building the runtime system(written in C).  This
> includes an interpreter for the caml light abstract machine.  Then the
> produced executable, "runtime", is invoked on the file "compiler,"
> which I *think* is a byte-compiled implementation of a *subset* of the
> caml-light language. In this way the core library, actual compiler,
> linker, librarian, and toplevel are compiled into bytecode.

No, it's not a subset, it's the previous generation compiler for the
whole language. The essence of bootstrapping is to use the N-th
generation compiler to compile the (N+1)-th generation compiler.

For Caml Light, the N-th generation compiler is composed of the
bytecode files src/{camlcomp,camllink,camllibr,camllex} and the (N+1)-th
generation is built in compiler/camlcomp, linker/camllink,
librar/camllibr, lex/camllex, and toplevel/camltop. The parts written
in C (camlrun and camlyacc) are outside the bootstrapping cycle, since
they can be rebuilt independently at any time.

For general background on bootstrapping, and in particular the use of
T-diagrams to understand what's happening, see section 11.2 of the
Dragon book (Aho, Sethi, Ullman, "Compilers -- principles, techniques
and tools").

Also note that the Caml Light bootstrapping process does not handle
changes in the abstract machine very well. This has been fixed in
Objective Caml, which follows exactly the T-diagram approach.

Hope this helps,

- Xavier Leroy





      reply	other threads:[~1997-02-26 12:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-02-26  4:49 Lyn A Headley
1997-02-26  9:58 ` Xavier Leroy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199702260958.KAA29329@pauillac.inria.fr \
    --to=xavier.leroy@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=laheadle@midway.uchicago.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox