This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
decompiler project (interested hackers?)
- To: guile at sourceware dot cygnus dot com
- Subject: decompiler project (interested hackers?)
- From: Lynn Winebarger <owinebar at free-expression dot org>
- Date: Fri, 5 Nov 1999 20:46:06 -0500 (EST)
Hello again. I was wondering if anyone else is interested in playing
with the code I'm writing for a decompiler. I've almost got the first
2 passes working (first object file->scheme representation of assembly,
2nd pass assembly-> modified RTL). The first pass does work (roughly),
though there are definitely some bugs and features left to be desired.
I have the second pass for a sizeable subset of i386 assembly code
(control flow, assignment, and integer math (sans MMX) instructions).
There's still some more work for it to be useable (at all), but I'm within
a couple of days of work on it. (In particular, someone who's familiar
with GC problems who might be able to figure out why the heap gets really
huge on moderate sized input).
Anyway, the GUILE page mentioned people being interested in "cool
hackage", and I think this is the start of some. I'm probably going to
start working on the higher level stuff as soon as I get the
assembler->RTL pass working - building control flow graphs, doing data
flow analysis to determine variables and their types, and loop detection.
I also think I might be able to gather non-loop control flow graphs into
big letrec (perhaps nested) - i.e. I think that you can get an arbitrary
control flow graph using optimized tail recursion. Then the fun part
would be to try to "de-tailize" the functions/labels by detecting
accumulators.
By the way, is there a pretty printer for lists in guile?
Lynn