From: Didier.Remy@inria.fr (Didier Remy)
To: xavier@Theory.Stanford.EDU (Xavier Leroy)
Cc: mael@id.dth.dk, caml-list@margaux.inria.fr
Subject: Re: Documentation for the type-checker for Caml Light
Date: Wed, 2 Mar 1994 15:37:22 +0100 (MET) [thread overview]
Message-ID: <9403021437.AA12106@quincy.inria.fr> (raw)
In-Reply-To: <9403011945.AA24974@Thelonius.Stanford.EDU> from "Xavier Leroy" at Mar 1, 94 11:45:03 am
> The Caml Light typechecker also uses "levels" on type variables to
> implement generalization efficiently. This folklore trick is described
> in Weis and Leroy's book "Le langage Caml" (in French, unfortunately),
> and also (but much more abstractly) in some publications by Didier
> Remy. I believe Didier is on the list, so maybe he can provide more
> references.
What Xavier Leroy refers to is described in the paper [1] together with the
addition of an equational theory on ML types (abstract at the end of this
message).
The idea is to mark all nods & variables of types with integers that keep
track of the first occurrence of those nods & variables in the typing context.
The unification algorithm has to update the marks when merging two types.
Generalization of a type can then be done in time proportional to the number
of nods & variables that have been introduced since the most recent LET
instead of checking through the whole type environment (that might be very
large).
The unification algorithm of Caml Light reuses similar marks, but they are
not updated at the same place.
Didier.
----------------
[1] Didier R\'emy. "Extending ML Type System with a Sorted Equational
Theory". INRIA Research Report 1766, year 1992.
Can be retrieved by anonymous ftp as eq-theory-on-types.{dvi,ps}.Z at
ftp.inria.fr:INRIA/Projects/cristal/Didier.Remy/
prev parent reply other threads:[~1994-03-02 16:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-03-01 15:35 Martin Elsman
1994-03-01 19:45 ` Xavier Leroy
1994-03-02 14:37 ` Didier Remy [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=9403021437.AA12106@quincy.inria.fr \
--to=didier.remy@inria.fr \
--cc=caml-list@margaux.inria.fr \
--cc=mael@id.dth.dk \
--cc=xavier@Theory.Stanford.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