[Haskell-cafe] pointers for EDSL design

Stephen Tetley stephen.tetley at gmail.com
Tue Oct 5 11:13:37 EDT 2010


Hello John

If you are wanting variables, lambdas ... it sounds like you might be
"off-shoring" - i.e. building a little language within Haskell that is
executed on something else GPU (compiled to CUDA), compiled to C,
compiled to VHDL, etc.

Generally this is a "deep-embedding" as you need to produce output
code for the target system.

There are many papers on this - as for a survey of techniques there is
one by Keon Claessen and Gordon Pace that gives an (albeit brief)
comparison of shallow and deep embedding for Hardware EDSLs -
"Embedded Hardware Description Languages: Exploring the Design Space".
Also, the recent Kansas Lava combines a shallow embedding and a deep
embedding so it can "run" in Haskell but compile to Verilog or
VHDL(?). Andy Gill and colleagues have various papers describing its
design.

Robert Atkey and co-authors had a paper at the 2009 Haskell Symposium
"Unembedding domain-specific languages".

Conal Elliott's Pan was one of the first Haskell offshore DSLs (maybe
the first?), there is a paper "Compiling Embedded Languages" written
with Sigborn Finne and Oege de Moor. The authors acknowledge Samuel
Kamin's previous work in ML. Later Conal Elliott had a paper
describing Vertigo on GPUs.

Quite a few papers have popped up recently about off-shoring "subsets"
of Haskell to GPUs, see Joel Svensson's Obsidian and GPUgen by Manuel
M. T. Chakravarty and colleagues.

Oleg Kiselyov, Jacques Carette and Chung-chieh Shan have papers
describing embedded DSLs in the "tagless" style. There are also papers
by Jacques Carette and Oleg Kiselyov describing deep embedding in
Ocaml - I think they coined the term "off-shoring", here's one:

http://www.cas.mcmaster.ca/~carette/publications/scp_metamonads.pdf


More information about the Haskell-Cafe mailing list