Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Benjamin Pierce <bcpierce@cis.upenn.edu>
To: Pierre Weis <Pierre.Weis@inria.fr>
Cc: caml-list@pauillac.inria.fr
Subject: Re: WWW Page of Team PLClub (Re: ICFP programming contest: results)
Date: Mon, 09 Oct 2000 01:51:25 -0400	[thread overview]
Message-ID: <14194.971070685@localhost.localdomain> (raw)
In-Reply-To: Your message of Sat, 07 Oct 2000 10:35:21 +0200. <200010070835.KAA28303@pauillac.inria.fr>

Fanning the fire on deBruijn indices...

> - you have to manipulate indices anyway to mimmick alpha-conversion
> when performing beta-reduction (the operation is named the ``lifting''
> of De Bruijn indices), and you know that this is at least as difficult
> and error prone as performing alpha-renaming. As an example, consider
> ...

There's an important difference, though, in the ways that these errors
show up: bugs in deBruijn-indexing schemes tend to manifest immediately
and catastrophically -- if you miss a 'shift' everything quickly gets all
screwed up and you can see that you did something wrong and fix it right
away -- while name-based implementations of substitution tend to fail
only six months later, when someone makes an unlucky choice of variable
names. 

There's a story that a substitution bug in the original LCS theorem
prover persisted for six *years* before anybody noticed...

> - as a consequence of these two properties, debugging code that
> manipulates and transforms lambda code in De Bruijn form is just a
> nightmare (each time I had to do it, I ended by writing a
> pretty-printer that reverts De Bruijn notation to good old names for
> variables!)

I usually do this too.  The pretty-printer can also do a little
consistency checking on the deBruijn indices: each variable is
represented as a pair of its index and the expected size of the context;
if the printing routine sees that the actual context does not have this
size, it complains.  

One drawback of deBruijn indices that you did not mention is that, at
least when implemented naively, they are pretty expensive in terms of
the amount of consing that's required to perform substitutions. 

At the end of the day, I'm not that big a fan of *either* deBruijn or
named presentations of terms... both are pretty ugly to work with, in
different ways.  In fact, I find both distressing and fascinating that,
after so many years of thought by so many smart people, we're still in
such an unsatisfactory state wrt. binding.

    B



  parent reply	other threads:[~2000-10-10 12:04 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-05 10:33 David McClain
2000-10-05 20:20 ` Stefan Monnier
2000-10-06 19:26   ` eijiro_sumii
2000-10-07  8:19     ` automatic translation in Team PLClub ICFP'2000 entry Julian Assange
2000-10-07 16:30       ` eijiro_sumii
2000-10-06  8:07 ` WWW Page of Team PLClub (Re: ICFP programming contest: results) Xavier Leroy
2000-10-07  8:35   ` Pierre Weis
2000-10-07  9:55     ` Markus Mottl
2000-10-07 10:24       ` Pierre Weis
2000-10-08 21:26     ` John Max Skaller
2000-10-10 10:23       ` Pierre Weis
2000-10-09  5:51     ` Benjamin Pierce [this message]
2000-10-09  7:19     ` de Bruijn indices (Re: WWW Page of Team PLClub) Eijiro Sumii
2000-10-10 10:36       ` Pierre Weis
2000-10-10 14:04       ` de Bruijn indices Gerard Huet
2000-10-10 17:29         ` Chet Murthy
2000-10-11 22:35           ` John Max Skaller
  -- strict thread matches above, loose matches on Subject: below --
2000-10-05 22:46 WWW Page of Team PLClub (Re: ICFP programming contest: results) David McClain
2000-09-21  7:12 ICFP programming contest: results Xavier Leroy
2000-09-24  3:36 ` Eijiro Sumii
2000-10-04 18:40   ` WWW Page of Team PLClub (Re: ICFP programming contest: results) eijiro_sumii
2000-10-05 21:19     ` malc
2000-10-06  9:46       ` Julian Assange
2000-10-06 19:10       ` eijiro_sumii
2000-10-06 20:13         ` eijiro_sumii
2000-10-06 20:05       ` eijiro_sumii
     [not found]         ` <200010070759.JAA00538@pauillac.inria.fr>
2000-10-07 16:21           ` eijiro_sumii
2000-10-08 21:06             ` Pierre Weis

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=14194.971070685@localhost.localdomain \
    --to=bcpierce@cis.upenn.edu \
    --cc=Pierre.Weis@inria.fr \
    --cc=caml-list@pauillac.inria.fr \
    /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