From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 51983BBAF for ; Fri, 18 Jun 2010 08:31:57 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnoBADewGkzRVda2mGdsb2JhbACSMIxKCBUBAQEBAQgJDAcRIrFLhVqIfQEBAwWFFASOPQ X-IronPort-AV: E=Sophos;i="4.53,437,1272837600"; d="scan'208";a="64834892" Received: from mail-iw0-f182.google.com ([209.85.214.182]) by mail4-smtp-sop.national.inria.fr with ESMTP; 18 Jun 2010 08:31:29 +0200 Received: by iwn7 with SMTP id 7so1046833iwn.27 for ; Thu, 17 Jun 2010 23:31:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=mPuNRxsj4EkXLJSPASRLjsQ+14eWwMo/7v/H0kWnwyw=; b=oo26hAHRt9Z9LiI3EMiYmuLOC5aM4W/Abz72LyrzEiXm6BOOR6bvoX6WOLt9QpibYf ndv5gZe9WIVzGMWH57ZZGlrGM4l1+y8xflwVY29C4tRQjwxS9f+69sj7bojU/kExoAGA 06Y6DWJbXoAK2hjQpQlNC4drGYq7VLh1ouxLA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=VDr7PfiikTYFVZwSsQmVHVhg52jPUuIZZpjymz3egvBN1fy4i3mgpwHKMjcyCiX4xh pBfVTxy6MiwTxYNqqAtgmpWlxNAA7aytTY/BObZ8mDzqm352qBf5FIWEdr7TfKFYUU0V lna6xrY63ermbHc8whrQ5aG8AEWYYTgulMFhY= MIME-Version: 1.0 Received: by 10.231.187.2 with SMTP id cu2mr790170ibb.63.1276842687664; Thu, 17 Jun 2010 23:31:27 -0700 (PDT) Sender: david.mentre@gmail.com Received: by 10.231.208.76 with HTTP; Thu, 17 Jun 2010 23:31:27 -0700 (PDT) In-Reply-To: <29817.37781.qm@web113719.mail.gq1.yahoo.com> References: <29817.37781.qm@web113719.mail.gq1.yahoo.com> Date: Fri, 18 Jun 2010 08:31:27 +0200 X-Google-Sender-Auth: 4S5MyFJ3okBYXP3v-FVl4XzB5_Q Message-ID: Subject: Re: [Caml-list] Seeking (Meta)Ocaml / compiler writing help From: David MENTRE To: Simon P Cc: caml-list , metaocaml-users Content-Type: text/plain; charset=ISO-8859-1 X-Spam: no; 0.00; ocaml:01 compiler:01 c-like:01 inlining:01 compiler:01 ml-like:01 inlining:01 sourceforge:01 sourceforge:01 partial:01 caml-list:01 compiling:02 describing:06 translation:07 sparc:07 Hello, 2010/6/17 Simon P : > We want to build a small domain specific language and convert it to > a C-like language. In the process of this source-to-source translation, we want to try partial evaluation followed by relatively simple optimizations (dead code elimination, common subexpression elimination, constant folding, inlining). It might be interested for you to look at Min-Caml compiler: http://min-caml.sourceforge.net/index-e.html Paper describing the compiler: http://min-caml.sourceforge.net/paper.pdf MinCaml is a complete ML-like compiler compiling to Sparc in about 2,000 lines of code. As far as I remember, it does common subexpression elimination, constant folding and inlining. Sincerely yours, david