On Wed, Aug 8, 2012 at 11:12 AM, Tim Henderson <tim.tadh@gmail.com> wrote:
Hi Pypy devs!

I am a graduate student working on mining software repositories, specifically mining programming patterns (or rules) from code bases.[1] I would like to do some work mining patterns from Python programs and I could jump start that work if I could generate dependence graphs from python source files (or from the bytecode).

So I was wondering if Pypy does this already. Actually it would be a big help even if pypy only generated a control flow graph. From my quick skim of some of the source code it seems like it does this for RPython but I wasn't sure about regular python. If I could get a CFG I could then annotate it with the data dependence edges.

Any pointers to where I should look in the Pypy code would be appreciated! Additionally, if you feel having python pDG's would be helpful in Pypy's interpreter perhaps any work I do towards that end could be a starting point.

Thanks for the excellent work on Pypy!

[1] Here is some of my research group's previous work on pattern extraction http://doi.wiley.com/10.1002/smr.532 (if you can't get the paper and would like it let me know)

Cheers
---
Tim Henderson
mail me: tim.tadh@gmail.com
mail me: timothy.henderson@case.edu
github: github.com/timtadh


_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
http://mail.python.org/mailman/listinfo/pypy-dev


You're correct, we only generate full CFGs for RPython.  The Python bytecode compiler for PyPy (and CPython) does have a CFG, but they're just local to functions so I don't think they're what you're looking for.

Alex

--
"I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
"The people's good is the highest law." -- Cicero