Sun Sep 20 16:05:47 CEST 2009

DSLs as compiler hints

( In the context of previous post[1] about VLIW optimizations. )

Coming back to the combinator approach: you loose some, because not
all programs can be expressed, and you win some, because specification
can be separated from implementation.

An essential part is that you fix the specification of the solution on
a higher abstraction level such that the compiler doesn't need to
_infer_ properties of your solution (to choose a different

By using a high-level description, properties can be made explicit,
independent of the meaning (correctness) of the program (i.e. as
``aspects'').  These could then be used by a compiler to optimize
over: it can concentrate on searching instead of spending time on

The real problem however is to find a good collection of combinators
(the ``DSL''), and the specification of an escape hatch to lower, more
general purpose levels.  Here _good_ means that it can express most of
the solutions, and provides a good parametrization of possible

[1] entry://20090920-120839