Browse thread
MinCaml: an educational compiler for tiny ML subset (documented in Japanese)
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Eijiro Sumii <eijiro_sumii@a...> |
| Subject: | Re: [Caml-list] MinCaml: an educational compiler for tiny ML subset (documented in Japanese) |
From: "Jon Harrop" <jon@jdh30.plus.com> > > 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