4 ms·
There's some prior art on DSLs for efficient interpreters, like Anton Ertl's vmgen. https://www.complang.tuwien.ac.at/anton/vmgen/ https://www.complang.tuwien.a
by abecedarius 4y ago
There's some prior art on DSLs for efficient interpreters, like Anton Ertl's vmgen. https://www.complang.tuwien.ac.at/anton/vmgen/ https://www.complang.tuwien.ac.at/anton/vmgen/
- touisteur 4y agoNice, do you know whether this DSL was ever used successfully fir other endeavours (abstract interpretation, lowering to Why3, any kind of symbolic execution? or a language server?). I've been looking for a 'flex/bison with complete semantics' and it might be a piece of the puzzle.
- abecedarius 4y agoI don't know -- there were at least a couple papers about it, but I haven't been following. At the time it was first announced I used some of the ideas in one of my projects (https://github.com/darius/idel/blob/master/src/opcodes.awk https://github.com/darius/idel/blob/master/src/opcodes.awk) but unfortunately didn't develop it further.
- riffraff 4y agoah, I remembered this but could not find it again, thanks. Many, many years ago there was even someone trying to write a ruby VM with it[1]. Wow, I'm old. [1] https://savannah.nongnu.org/projects/carbone https://savannah.nongnu.org/projects/carbone
- UncleEntity 4y agoThe main difference I see is this project seems to be using C++ (plus C macros?) directly instead of a DSL. And some llvm magic thrown in for good measure.
- abecedarius 4y agoFair. I think of DSLs as a way of thinking about the program you want to write; if a scheme is realizable with few compromises in an existing language, it can still be considered "DSL style". SICP calls this style "stratified design".
- UncleEntity 4y agoYou can do all sorts of “stratified design” with C++ templates which I assume is underneath the covers of this system. boost::spirit is probably the most excessive use of this that I’ve seen so far.