4 ms·
I made a small tool to script source-to-source transformations and apply them on C programs: https://github.com/lou1306/absentee https://github.com/lou1306/abse
by lou1306 5y ago
I made a small tool to script source-to-source transformations and apply them on C programs: https://github.com/lou1306/absentee https://github.com/lou1306/absentee
I used it during my PhD to automatically instrument benchmark programs for several different software verification tools (there is some form of standardization going on, but there are still a lot of corner cases where the same program will be interpreted, and thus verified, differently by two tools).
It's written in Python 3 and uses pycparser to do most of the heavy lifting. Currently it's a bit on the back burner, but I hope to come back to it soon-ish. Some desiderata:
* pycparser's AST API is not terribly efficient when you have to rewrite large subtrees, but I don't know if there are any nice alternatives.
* That's probably a pipe dream, but I wish there was some easy-to-use library to get semantic info about C programs (like a symbol table). That would help me "teach" the tool some neat tricks, such as SSA.
By the way, thank you OP, as your post convinced me to make the repo public.