Sunday, 21 June 2009

New HLVM examples

The High-Level Virtual Machine (HLVM) project aims to combine the expressiveness of functional programming languages, the performance of C and the interoperability and libraries of an industrial-strength virtual machine. This project was recently updated to include two new example programs built upon HLVM:

  1. A calculator that JIT compiles arithmetic expressions in order to evaluate them, written in only 28 lines of OCaml!
  2. A compiler for a tiny caml-like language that handles unit, char, int, float and tuple types along with some example programs written in only 228 lines of OCaml!

These working examples should help HLVM users. In particular, the design and implementation of the second example, a complete compiler, will be described in the next OCaml Journal article.

Check out HLVM's SVN repository now with:

svn checkout svn://

No comments: