[libre-riscv-dev] POWER simulator
luke.leighton at gmail.com
Wed Apr 1 16:55:31 BST 2020
i just wanted to write a bit to everyone about what it's like when
using parsers like this. it's... very weird :) you create all these
pieces, you don't know if any of them will work, and then all of a
sudden the work's entirely done and it all works and you can go home.
it's horribly confusing. the effectiveness is so high that it's
like... "is that it?? surely it had to be harder than that??"
the last time i did something like this it was with Webkit, first
adding gobject bindings and then also adding python bindings i think
i mentioned before: it took me under 10 days to add support for python
bindings, by taking:
* Mozilla's HTML5 IDL compiler and getting it to understand the 350
Webkit-formatted HTML5 IDL files (1 day)
* python-gobject's compiler and getting it to understand the AST that
came out of the Mozilla IDL compiler (1 day)
* writing some code-generators for creating python c-based modules (3 days)
* writing some python "recognisers" for Webkit c++ datatypes (2-3 days)
* debugging (2-3 days)
that was *it*. 350 classes, 2,000 functions, and over TWENTY thousand
properties - all auto-generated - done in 10 days. full python
this is no different, just on a smaller scale. it means placing quite
a lot of trust in auto-generated code, which is where the unit tests
come critically into play.
the code-fragments are actually compiled into a python AST, however i
discovered a library that can turn those back into actual python code.
this can be used to actually *output* python source code, which means
that we have something to examine (for bugs).
More information about the libre-riscv-dev