* In a normal compiler, you have the front-end which generates intermediate code in a pseudo-assembly language, and you have the back end that compiles that intermediate code into assembly language (or into JVM or CLR or even JavaScript, these days...)
* In AnyDSL, the front end takes the code and compiles it into, well, the same language, only with decreasing levels of abstraction from the hardware.
I don't know if you're familiar with "shader" languages (for OpenGL and DirectX and similar), but they're written in a syntax that looks very much like C. It's not precisely C, but it looks a whole lot like C -- but every statement effectively generates machine code directly, and they get executed in parallel. So if you're writing a pixel shader that makes everything more red, you'd write a statement like (pseudocode):
output.r += 10;
...and when it drew the texture or polygon to the screen, it would execute your code once for each pixel.In AnyDSL, it looks like the top level language is very much like a normal (functional) language. That language gets "compiled" into an intermediate abstraction language (like the one using @iterate call), and the final "compilation" step is like the shader language, in that it's letting you define a target-specific implementation, which could include vector functions or pixel shaders or whatever.
If this were C, then the second level would be internal to the compiler and completely opaque, and the final level would be the compiler backend+libraries, which might have calls to implement vector math. If you imagine lifting those backend libraries up into the same compiler, where the libraries are written in a similar language syntax, you can imagine that they can do a lot more to optimize the result, because more of the code gets built at the same time, and a lot of intermediate states can be eliminated at compile time.
But yes, it still feels fundamentally like a compiler. Only a compiler where you can't just link in existing C-based libraries, because then it wouldn't be able to do its magic. So you therefore need to reinvent all the wheels?