[LLVMdev] Embedding LLVM
George Giorgidze
giorgidze at gmail.com
Tue Mar 2 05:52:11 PST 2010
Sean Hunt <rideau3 <at> gmail.com> writes:
>
> Is there a guide anywhere to embedding LLVM into a program to compile
> and run a DSEL?
>
> Thanks,
> Sean
>
Hi Sean,
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/BASIC
http://augustss.blogspot.com/2009/02/more-basic-not-that-anybody-should-
care.html
The above is a nice, small and fun example by Lennart Augustsson that
demonstrates how to embed basic version of BASIC in Haskell. Embedded BASIC
programs are JIT compiled and executed using Haskell bindings of LLVM.
I myself am developing a Haskell embedded DSL for equational modelling and
simulation of physical systems. The language is characterised by repeated
program generation, compilation and execution to enable efficient modelling and
simulation of hybrid, highly dynamic systems.
Related papers and the implementation is on my web page:
http://www.cs.nott.ac.uk/~ggg/
I hope the above helps.
Cheers, George
--
George Giorgidze
http://www.cs.nott.ac.uk/~ggg/
More information about the llvm-dev
mailing list