From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 84D2FBC75 for ; Sat, 5 Mar 2005 15:37:47 +0100 (CET) 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 j25EbjJ5020544 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Sat, 5 Mar 2005 15:37:47 +0100 Received: from localhost (localhost [127.0.0.1]) by saul.cis.upenn.edu (8.12.10/8.12.9) with ESMTP id j25EbgCP004617; Sat, 5 Mar 2005 09:37:42 -0500 (EST) Date: Sat, 05 Mar 2005 09:37:42 -0500 (EST) Message-Id: <20050305.093742.46637291.eijiro_sumii@anet.ne.jp> To: caml-list@yquem.inria.fr Cc: jon@jdh30.plus.com, sumii@saul.cis.upenn.edu Subject: Re: [Caml-list] MinCaml: an educational compiler for tiny ML subset (documented in Japanese) From: Eijiro Sumii In-Reply-To: <200503050832.42927.jon@jdh30.plus.com> References: <20050303.172652.36931998.eijiro_sumii@anet.ne.jp> <200503050832.42927.jon@jdh30.plus.com> X-Mailer: Mew version 3.2 on Emacs 20.7 / Mule 4.0 (HANANOEN) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 4229C439.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 compiler:01 subset:01 eijiro:01 sumii:01 eijiro:01 sumii:01 ocaml:01 gcc:01 subset:01 polymorphism:01 garbage:01 syntax:01 ocaml:01 inference: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: From: "Jon Harrop" > > Yet, it produces as efficient SPARC code as OCaml and GCC does > > Did you choose SPARC because of availability or for technical reasons? Both - Sun is still strong in universities around me and IA-32 is a mess (for me, at least) compared to RISC... > > for the tiny ML subset and equivalent C programs). > > What features of ML are implemented? Only a _very_ tiny subset: for now, it does not have polymorphism, data types, modules, nor garbage collection (so I shouldn't even call it ML, except that the syntax is a subset of OCaml). However, it _does_ have type inference, higher-order functions, floating-point numbers, tuples, and arrays with destructive update - which are sufficient for minimal examples (such as gcd, ack, matrix, etc.) and one application (raytracing). Also, it does implement optimizations such as known-function calls, tail calls, inlining, constant folding, etc. It can call external functions if you provide the stubs in assembly. The subset is so tiny because MinCaml was developed for an undergraduate course, where I put most energy to the ease of understanding and couldn't include many features. However, adding them would be a nice project for more advanced students. By the way, for the majority of people who do not speak Japanese:-), I am preparing an Enlish documentation. -- Eijiro Sumii (http://www.cis.upenn.edu/~sumii/) Department of Computer and Information Science, University of Pennsylvania