Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Markus Mottl <mottl@miss.wu-wien.ac.at>
To: Julian Assange <proff@iq.org>
Cc: caml-list@inria.fr
Subject: Re: moderation of caml-list
Date: Wed, 19 Jul 2000 19:56:00 +0200	[thread overview]
Message-ID: <20000719195600.A10482@miss.wu-wien.ac.at> (raw)
In-Reply-To: <wx66q3femd.fsf@suburbia.net>; from proff@iq.org on Wed, Jul 19, 2000 at 05:00:09 +1000

On Wed, 19 Jul 2000, Julian Assange wrote:
> As a side note, I'd like to again express my desire for type-inferment
> of side-effects and exceptions in closures containing them or
> references to functions that do (and so on). Apart from making the
> code easier to read and debug this would also permit:

Although I would also like to see something like this, I fear that
implementing a "good-enough" solution would draw human resources that are
currently probably better invested elsewhere...

In any case: having information of this sort at compile time would allow
some really nice transformations/optimizations, much more powerful ones
than just factoring of common subexpressions or lifting of expressions.

E.g., one could safely apply transformations like partial evaluation,
deforestation/fusion or automatic introduction of accumulators for
tail-recursiveness, etc...

For people interested in program transformations, here is a nice overview:

  @Article{Pettorossi-Proietti96,
    key =          "Pettorossi \& Proietti",
    author =       "Alberto Pettorossi and Maurizio Proietti",
    title =        "Rules and Strategies for Transforming Functional and
                    Logic Programs",
    journal =      "ACMCS",
    volume =       "28",
    number =       "2",
    pages =        "360--414",
    month =        jun,
    year =         "1996",
    annote =       "Many references.",
  }

You can get it from here:  http://www.iasi.rm.cnr.it/~proietti/reports.html

I especially like the example where the straightforward (exponential)
fibonacci function is transformed by a series of automatable rule
applications to one which runs in logarithmic time (yes, I mean
*logarithmic*, not linear - I didn't know of this trick either...).
Such superexponential speedups are indeed very attractive! 8-)
Unfortunately, some transformations require purity...

Best regards,
Markus Mottl

-- 
Markus Mottl, mottl@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl



      reply	other threads:[~2000-07-21  7:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-07-18 19:00 Julian Assange
2000-07-19 17:56 ` Markus Mottl [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=20000719195600.A10482@miss.wu-wien.ac.at \
    --to=mottl@miss.wu-wien.ac.at \
    --cc=caml-list@inria.fr \
    --cc=proff@iq.org \
    /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