From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id CCA5EBC75 for ; Thu, 3 Mar 2005 23:26:57 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j23MQvcs027259 for ; Thu, 3 Mar 2005 23:26:57 +0100 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id XAA06207 for ; Thu, 3 Mar 2005 23:26:56 +0100 (MET) Received: from saul.cis.upenn.edu (SAUL.CIS.upenn.edu [158.130.12.4]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j23MQsig002442 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Thu, 3 Mar 2005 23:26:56 +0100 Received: from localhost (SAUL.CIS.upenn.edu [158.130.12.4]) by saul.cis.upenn.edu (8.12.10/8.12.9) with ESMTP id j23MQqCP023816; Thu, 3 Mar 2005 17:26:52 -0500 (EST) Date: Thu, 03 Mar 2005 17:26:52 -0500 (EST) Message-Id: <20050303.172652.36931998.eijiro_sumii@anet.ne.jp> To: caml-list@inria.fr Cc: sumii@saul.cis.upenn.edu Subject: MinCaml: an educational compiler for tiny ML subset (documented in Japanese) From: Eijiro Sumii X-Mailer: Mew version 3.2 on Emacs 20.7 / Mule 4.1 (AOI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 42278F31.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 42278F2E.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; compiler:01 subset:01 eijiro:01 sumii:01 eijiro:01 sumii:01 compiler:01 subset:01 sourceforge:01 sourceforge:01 ocaml:01 ocaml:01 gcc:01 ackermann:01 gcc:01 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: Hi, I have implemented a simple but efficient compiler from a tiny ML subset to the SPARC assembly language. http://min-caml.sourceforge.net/min-caml.tar.gz The primary purpose is advanced education: the compiler is well documented (only in Japanese for now, unfortunately) http://min-caml.sourceforge.net/ and has been used in a class at Tokyo for years. The compiler consists of only 2000 lines of OCaml. Yet, it produces as efficient SPARC code as OCaml and GCC does (for the tiny ML subset and equivalent C programs). A typical functional program (Ackermann): GCC 6.8s OCaml 0.9s MinCaml 0.9s A typical imperative program (raytracing): GCC 14.7s OCaml 36.7s (could perhaps be improved by using BigArray) MinCaml 17.0s So, please take a look if you are interested. Even if you don't understand Japanese, you may be able to understand OCaml!:-) Best, -- Eijiro Sumii (http://www.cis.upenn.edu/~sumii/) Department of Computer and Information Science, University of Pennsylvania