[LLVMdev] Any experiemnts/evaluations on LLVM and graph rewriting (term-rewriting) systems?

Albert Graef Dr.Graef at t-online.de
Tue Sep 14 00:32:39 PDT 2010


Valery Khamenya wrote:
> are there any attempts to use LLVM in graph-rewriting (term-rewriting)
> language implementations?

Pure is a dynamically typed FPL based on term rewriting:

http://pure-lang.googlecode.com/

It uses the LLVM JIT to compile and execute code on the fly in an
interpreter-like environment, and can also batch-compile code to native
executables. This includes the deterministic (non-backtracking) tree
matching automata needed to implement general term rewriting in an
efficient manner.

> How good is LLVM for this?

There haven't been any other implementations of Pure compilers so that I
can't give you a real comparison. What I can say with confidence is that
LLVM made developing a code generator for Pure very convenient, because
of the readily available optimization passes, cross-platform support and
the integrated JIT.

> E.g., is it natural to expect that the LLVM-based implementation of the
> language Concurrent Clean be any faster than its reference implementation?

You should probably get in touch with David Terei. His LLVM ghc backend
seems to be doing fairly well:
http://donsbot.wordpress.com/2010/02/21/smoking-fast-haskell-code-using-ghcs-new-llvm-codegen/

Albert

-- 
Dr. Albert Gr"af
Dept. of Music-Informatics, University of Mainz, Germany
Email:  Dr.Graef at t-online.de, ag at muwiinfa.geschichte.uni-mainz.de
WWW:    http://www.musikinformatik.uni-mainz.de/ag



More information about the llvm-dev mailing list