Re-implemented BER MetaOCaml

49 views
Skip to first unread message

ol...@okmij.org

unread,
Feb 6, 2013, 6:17:57 AM2/6/13
to stag...@googlegroups.com

Hello!

One of the action items of the Shonan meeting was bringing and
keeping MetaOCaml up to date. At the time of the meeting, MetaOCaml
was two major versions behind OCaml. Perhaps some of you have noticed
that this problem has been solved. BER MetaOCaml is now up-to-date,
corresponding to the current version of OCaml, 4.00.1. BER MetaOCaml
has been re-implemented, with an explicit goal of making it easier to
keep it up to date. Here is the complete announcement.

http://okmij.org/ftp/ML/MetaOCaml.html

The announcement includes a research and development program. I have
lots of ideas.

BER MetaOCaml now includes the scope extrusion check. Scope extrusion
is a more devious problem one might think. With old MetaOCaml, scope
extrusion not always resulted in an error message abound an unbound
variable. Sometimes, wrong code was generated without any error
message or any indication that something went wrong:

http://okmij.org/ftp/ML/MetaOCaml.html#got-away

BER MetaOCaml N100 does not permit that. If a variable got away, any
attempt to use the corresponding piece of code raises an exception,
with a good diagnostic. The error is a run-time (generator-time)
exception rather than a type error. Still, we obtain the guarantee
that if the code was generated, it will compile without any type
errors -- whether the generator used mutations or not.

I hope this release incite further research and use
of typed code generation.

Cheers,
Oleg

Reply all
Reply to author
Forward
0 new messages