There seems to be some link between compiler construction and emergence in complex systems. Essentially, in compilers, we (ab)use emergence to lower between abstraction levels. Does anyone know any literature that explores this?
This ties in with the idea that a compiler is a thing which lowers between abstraction levels. Abstraction levels are "closed" in some sense, i.e. one does not need to know how an abstraction level is implemented physically to execute a program. This also implies that from this perspective abstraction levels are not ordered (unlike we might commonly think, C is not really higher/lower than assembly in this view, as you could lower in both directions)
I feel like you probably already have looked into it, but I'll mention it just in case. The META II paper shows how to build a meta-compiler that targets a very specific register-machine type design, leaving a bit of leeway for variance in the stack underneath. It's very good at doing that, but quite inflexible if you were to map it onto anything else(like say a warren machine, or SECD). There are lateral movements in types of complexity that are much harder to bridge if you look away from algols and register machines. Think, compiling a program to wireworld from lisp, as an example where it's unclear where either sits in relation to the order in terms of high/low levelness.
Odette's Compiling Prolog To Forth's paper gave me a taste recently of how wide or narrow these gaps in architectures are, and the idea of low/high level compilation is completely side-stepped.
@neauoire I was actually not aware of META II. On first glance it looks like this is essentially a parser generator that outputs stack machine code along the way? It seems like a spiritual predecessor (though it seems quite different technically) to the crazy partial evaluation techniques we have today.
It is yes! I meant more to read the preface of the book and its justification, but yes, if you haven't, I recommend implementing META, and then META II on the second architecture in the book, which loops it right back to the pseudo code of the first part of the book.
I think for a more modern version of a project that moves between abstraction layers in the same language is piumarta's cola piumarta.com/software/cola/
In which the machine architecture and the high level smalltalk and lisp sitting on top, are using the same language and primitives.
@neauoire I don't think so, I have done a fair bit of LISP/Scheme things including writing a compiler and then making it self hosting in my youth though. My conclusion from that was that homoiconicity is extremely cool, though in practice taping a macro system to an existing non-homoiconic language solves most problems just as well.
Can Lehmann
in reply to Can Lehmann • • •Can Lehmann
in reply to Can Lehmann • • •Devine Lu Linvega
in reply to Can Lehmann • • •I feel like you probably already have looked into it, but I'll mention it just in case. The META II paper shows how to build a meta-compiler that targets a very specific register-machine type design, leaving a bit of leeway for variance in the stack underneath. It's very good at doing that, but quite inflexible if you were to map it onto anything else(like say a warren machine, or SECD). There are lateral movements in types of complexity that are much harder to bridge if you look away from algols and register machines. Think, compiling a program to wireworld from lisp, as an example where it's unclear where either sits in relation to the order in terms of high/low levelness.
Odette's Compiling Prolog To Forth's paper gave me a taste recently of how wide or narrow these gaps in architectures are, and the idea of low/high level compilation is completely side-stepped.
Can Lehmann
in reply to Devine Lu Linvega • • •Devine Lu Linvega
in reply to Can Lehmann • • •It is yes! I meant more to read the preface of the book and its justification, but yes, if you haven't, I recommend implementing META, and then META II on the second architecture in the book, which loops it right back to the pseudo code of the first part of the book.
I think for a more modern version of a project that moves between abstraction layers in the same language is piumarta's cola
piumarta.com/software/cola/
In which the machine architecture and the high level smalltalk and lisp sitting on top, are using the same language and primitives.
cola (aka idst, jolt, etc.)
piumarta.comDevine Lu Linvega
in reply to Devine Lu Linvega • • •youtube.com/watch?v=SrKj4hYic5…
pllab.is.ocha.ac.jp/~asai/Blac…
- YouTube
www.youtube.comCan Lehmann
in reply to Devine Lu Linvega • • •@neauoire I don't think so, I have done a fair bit of LISP/Scheme things including writing a compiler and then making it self hosting in my youth though. My conclusion from that was that homoiconicity is extremely cool, though in practice taping a macro system to an existing non-homoiconic language solves most problems just as well.
(Just because we are recommending stuff, rn, I think you might enjoy youtube.com/watch?v=mQnKZr97y7…)
- YouTube
www.youtube.comDevine Lu Linvega
in reply to Can Lehmann • • •Devine Lu Linvega
in reply to Can Lehmann • • •