Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Caml-list] Resources for compiler/interpreter writers

4 views
Skip to first unread message

Joel Reymont

unread,
Jul 31, 2006, 7:58:18 PM7/31/06
to caml-list
Folks,

What are good OCaml resources for an aspiring compiler or interpreter
writer? I already know about the "One-day Compiler" presentation.

I would like to write a translator from a proprietary trading
language that's very Pascal-like (EasyLanguage for Omega
TradeStation). This seems like a fun starter project to me.

Thanks, Joel

--
http://wagerlabs.com/

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

David MENTRE

unread,
Aug 1, 2006, 3:39:29 AM8/1/06
to Joel Reymont, caml-list
Hello,

2006/8/1, Joel Reymont <joe...@gmail.com>:


> What are good OCaml resources for an aspiring compiler or interpreter
> writer? I already know about the "One-day Compiler" presentation.

Could you give a pointer to those slides?

> I would like to write a translator from a proprietary trading
> language that's very Pascal-like (EasyLanguage for Omega
> TradeStation). This seems like a fun starter project to me.

In the original Caml book ("Le Langage Caml",
http://caml.inria.fr/pub/old_caml_site/books-eng.html#camlprimer) in
French, you have a description of a short Pascal-like compiler, as
well as a description of a basic Caml type inference system.
Unfortunately, this book is hard to find.

You'll find some interesting information on MinCaml web site and code:
http://min-caml.sourceforge.net/index-e.html

BTW, I'm also interested in information for wanabee compiler writer.

Best wishes,
d.

Florian Hars

unread,
Aug 1, 2006, 4:19:50 AM8/1/06
to David MENTRE, caml-list
David MENTRE wrote:
>> I already know about the "One-day Compiler" presentation.
>
> Could you give a pointer to those slides?

http://www.venge.net/graydon/talks/mkc/html/mgp00001.html

Jean-Marie Gaillourdet

unread,
Aug 1, 2006, 4:21:33 AM8/1/06
to caml-list
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

I am not sure what kind of information you are interested in. Do you
know: Andrew W. Appel: "Modern Compiler Implementation in ML" ? It
covers SML and not Caml or OCaml but I'd say most concepts should be
translated easily.

Best Regards,
Jean-Marie

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFEzwlZNIUNP/I5YOgRAmjJAKCM6Bpt0IzLwH8WmK3uSUSTGooAyACgmX5D
0ahxKvolgo5/UL5RbaNUwwQ=
=08tI
-----END PGP SIGNATURE-----

David MENTRE

unread,
Aug 1, 2006, 4:47:14 AM8/1/06
to Ocaml
Hello,

2006/8/1, Jean-Marie Gaillourdet <j...@gaillourdet.net>:


> I am not sure what kind of information you are interested in. Do you
> know: Andrew W. Appel: "Modern Compiler Implementation in ML" ? It
> covers SML and not Caml or OCaml but I'd say most concepts should be
> translated easily.

Yes, I have a copy of it. But I'm also interested in small compilers
(even with reduced capabilities) like MinCaml that are easier to
understand for a beginner, as well as ML specific items like type
inference, pattern matching, garbage collection, ... That's probably
the most difficult on the compilation topic: there is a lot of books,
articles, etc. but it is sometimes hard for a beginner to determine
the minimal set of knowledge needed to start and the improved
algorithms that can be learned later. For a hobby compiler, one not
necessarily looks for the most efficient algorithms but simpler ones
that are easier to grasp.

Best wishes,
d.

Nicolas Cannasse

unread,
Aug 1, 2006, 8:51:47 AM8/1/06
to David MENTRE, Ocaml
> Yes, I have a copy of it. But I'm also interested in small compilers
> (even with reduced capabilities) like MinCaml that are easier to
> understand for a beginner, as well as ML specific items like type
> inference, pattern matching, garbage collection, ...

You can have a look at the Neko and NekoML compilers
(http://nekovm.org). Both are written in NekoML which is similar to
OCaml in many points.

Nicolas

William D. Neumann

unread,
Aug 1, 2006, 11:24:07 AM8/1/06
to David MENTRE, Ocaml
On Tue, 1 Aug 2006, David MENTRE wrote:

> Yes, I have a copy of it. But I'm also interested in small compilers
> (even with reduced capabilities) like MinCaml that are easier to
> understand for a beginner, as well as ML specific items like type
> inference, pattern matching, garbage collection, ...

While not so much about compilers directly, an excellent resource is
Benjamin Pierce's Types and Programming Languages, which includes
implementations of a number of different type systems in OCaml.

William D. Neumann

---

"There's just so many extra children, we could just feed the
children to these tigers. We don't need them, we're not doing
anything with them.

Tigers are noble and sleek; children are loud and messy."

-- Neko Case

Life is unfair. Kill yourself or get over it.
-- Black Box Recorder

0 new messages