caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: caml-list@inria.fr
Subject: Re: AGI research using ocaml
Date: Sun, 14 Mar 2010 15:38:50 -0400	[thread overview]
Message-ID: <jwvaauaem37.fsf-monnier+gmane.comp.lang.caml.inria@gnu.org> (raw)
In-Reply-To: <320e992a1003130600m5397f86bwe0023c78c3b0991e@mail.gmail.com>

>> 4) You would like to generate OCaml program fragments instead of Scheme.
>> Your idea is that the type system, imposing more constraints on the legal
>> program, will reduce the search space and accelerate your generator.
> Absolutely.  For simpler function induction problems, I assume this
> could even be done automatically by inducing type constraints over a
> set of examples.  Part of future research, I think.  I am afraid I'll
> have to read many programming language papers!

Depending on how you want to use types, it can help, but not
necessarily:

If you manage to use types to restrict your search, then that's great,
since your programs will be properly typed by construction (and the host
language may even know that, e.g. using GADTs or something equivalent)
and you may indeed be able to interpret them faster.

But if you don't, then you end up with programs which may or may not be
properly typed, in which case types will allow you to reject programs
before running them, but at the cost of having to type-check every
program.  So if the run time of each program is short compared to the
program's size, it may end up more costly to type-check the code than to
just run it.


        Stefan


  parent reply	other threads:[~2010-03-14 19:39 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-13 10:29 Eray Ozkural
2010-03-13 13:21 ` [Caml-list] " blue storm
2010-03-13 13:38   ` pierre.chambart
2010-03-13 14:01     ` Eray Ozkural
2010-07-29 22:44       ` Eray Ozkural
2010-03-13 15:48     ` Eray Ozkural
2010-03-13 16:00       ` blue storm
2010-03-13 16:57         ` Eray Ozkural
2010-03-13 14:00   ` Eray Ozkural
2010-03-13 14:06     ` Basile Starynkevitch
2010-03-13 14:58       ` Eray Ozkural
2010-03-13 15:36         ` Basile Starynkevitch
2010-03-14 19:38     ` Stefan Monnier [this message]
2010-03-13 15:38   ` Eliot Handelman
2010-03-13 15:41     ` Eray Ozkural
2010-03-13 15:02 ` Andre Nathan
2010-03-13 15:39   ` Eray Ozkural
2010-03-13 15:56     ` Andre Nathan
2010-07-31  8:25 oleg

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=jwvaauaem37.fsf-monnier+gmane.comp.lang.caml.inria@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=caml-list@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;
as well as URLs for NNTP newsgroup(s).