Mon Jul 7 18:08:52 CEST 2008
not writing a single line of C code..
Attempt to generate C code for Sobel + Hough transform, based on a
higher order macro specification. Basicly the same as hough.ss but
with partial evaluation of some functions.
* start from a purely functional description in HOF combinator form
* prove some transformation laws for the combinators
* use these to transform the algorithm
The real problem is making the X and Y combinators combine into
something that can be easily compiled out into n x m rectangular
region combinators. Basicly, start with the loop you want to end up
with, and factor it into separate parameterizable pieces.
It seems like 'adding parameters' to an inner loop is what makes this
difficult. This can be solved with HOFs and partial application. When
going that way (fixed arity) maybe using a stack approach can be done
EDIT: see onward entry://20080710-121719