[pypy-dev] Dependence Graphs in Pypy?
arigo at tunes.org
Wed Aug 8 21:05:57 CEST 2012
An additional remark: if you're looking for a tool that is able to
extract a complete call graph from a random Python program, then it's
impossible. Only approximations can be done, like e.g. done in
pylint, I believe.
Such tools are pointless in PyPy but could be useful in other
projects. For example I can imagine a tool that would statically
compile some version of a random Python program, including all
necessary guards to check at run-time that the assumptions made are
correct. When these guards fail, it would fall back to a regular
The difference with PyPy is that the latter uses a tracing JIT
compiler to do at run-time (partially) the same job as I describe
above. It does it by observation of the run-time behavior, which is a
rather better estimator of the program's general behavior than a
complex static analysis. And it dispenses us from writing any such
analysis. This gives us a result that is not specific to a particular
version of Python (or to Python at all).
More information about the pypy-dev