[<<][staapl][>>][..]
Tue Sep 23 16:00:06 CEST 2008

MetaOcaml

Before I can make a roadmap for adding static analysis to Staapl, on
top of the already mentioned move to proper algebraic data types and
intensional Coma code representation, it might be a good idea to dig a
bit deeper into MetaOcaml.

The ideal application point is generation of PF's C-code video
processing primitives from high level staged algorithms.

Useful:
http://www.mpi-sws.mpg.de/~rossberg/sml-vs-ocaml.html

Let's start at the examples page:
http://www.metaocaml.org/examples/

Looks like this is the most interesting part:
http://www.metaocaml.org/examples/fft.ml


Hello world in MetaOcaml -> C

M-x tuareg-run-caml
metaocaml

# .!{Trx.run_gcc}(.<123>.);;
- : int = 123

And generates the following file as a side-effect:
--------------

void initializer() ;


#ifdef OCAML_COMPILE

#include "/usr/local/lib/ocaml/caml/mlvalues.h"

#endif
void initializer()
{
}


#ifdef OCAML_COMPILE
int main()
{
  return 123;
}


#endif
--------------




[Reply][About]
[<<][staapl][>>][..]