Sun Jun 12 00:04:03 CEST 2011

Code generation and quasi-particles


I've had it with this borking real-world stuff.

Time for some seriously wacky ideas.

What I'm trying to do in libprim is to make a compiler and VM at the
same time.  In practice, glossing over this means to take the simplest
representation of that structure (an interpreter), i.e. represented as
the composition A B C, and inserting "virtual particles" (which are
operations and their inverses) at the boundaries of the VM and
compiler.  I.e. A B x x' C, where A B x is the VM and x' C is the

That's the high level mumbo jumbo.  Now, can this be done in practice?
How to express code specialization in an explicit algebraic way,
i.e. as symmetry transforms?

From afar the theory seems sound: you take an element of a group which
represents a function, and you find a representation of that element
such that it can be split in two: a compile time and a run time element.

Then use your understanding of the symmetry of that group to make
automatic search a little bit feasible..