Thu Sep 3 14:42:28 CEST 2009

DFL -> LCL -> ?

This is work-in-progress.  The application that drives this is a small
DSL to express safety constraints.  Other than that the specifications
are unclear.  Anything that's higer level than straight C or some
syntact sugar around it is probably fine.  The main problem is to not
make it _too_ powerful.

Step 1: a data flow language (DFL)

One step up from C by omitting sequential order of evalution.

The code transformation performs abstract evaluation on
ready/not-ready values and outputs a sorted list of functions
satisfying data dependencies.

The Scheme code is here (comments and procedure names might
contain confusing terminology though, and some of it is about

Step 2: local constraint language (LCL)

One step up from DFL by omitting directionality of the operations.
For this I have no code yet.  The idea is that again using
ready/not-ready values, all sequencing can be done statically like the
DFL, but in addition ``directionalizing'' (better word?) the
constraints can be done at compile time.

Step 3: global constraints

I think the story then breaks down because of data value dependencies.
In some cases the global constraints can be turned into local
constraints (i.e. linear equations with M unknowns and N < M
equations) but these are special cases.

However, it might still be useful to add some constraints that need a
search-based approach as long as the inputs for them are also provided
(or they could be slow-changing, like once per day switching on/off a
particular input).  Discrete inputs could then switch between modes,
or could trigger re-compilation of the constraint checker.