From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 3FEE1BC57 for ; Sun, 14 Mar 2010 20:39:04 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsQAADLYnEtQW+UMmWdsb2JhbACabRUBAQEBAQgLCgcTIrV3hHsEiw8 X-IronPort-AV: E=Sophos;i="4.49,639,1262559600"; d="scan'208";a="55121054" Received: from lo.gmane.org ([80.91.229.12]) by mail1-smtp-roc.national.inria.fr with ESMTP; 14 Mar 2010 20:39:03 +0100 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1NqteQ-0008Pa-Q4 for caml-list@inria.fr; Sun, 14 Mar 2010 20:39:02 +0100 Received: from 69-196-191-106.dsl.teksavvy.com ([69.196.191.106]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 14 Mar 2010 20:39:02 +0100 Received: from monnier by 69-196-191-106.dsl.teksavvy.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 14 Mar 2010 20:39:02 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Stefan Monnier Subject: Re: AGI research using ocaml Date: Sun, 14 Mar 2010 15:38:50 -0400 Message-ID: References: <320e992a1003130229v1f39f6aek752c32a677c3ac87@mail.gmail.com> <527cf6bc1003130521p203013bbo1c62ff66479cff6a@mail.gmail.com> <320e992a1003130600m5397f86bwe0023c78c3b0991e@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 69-196-191-106.dsl.teksavvy.com User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.93 (gnu/linux) Cancel-Lock: sha1:y3lQhbb+f/MRS98CoN+bfMiOxoE= X-Spam: no; 0.00; ocaml:01 ocaml:01 fragments:01 short:01 restrict:02 constraints:03 constraints:03 interpret:03 programming:03 typed:04 typed:04 size:95 types:05 types:05 scheme:05 >> 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