1 Dec 2005 18:47
Re: Full Python Annotation
Armin Rigo <arigo <at> tunes.org>
2005-12-01 17:47:35 GMT
2005-12-01 17:47:35 GMT
Hi Adam,
On Fri, Nov 25, 2005 at 10:13:25AM -0700, Adam Olsen wrote:
> Notes for description of value annotator
I know that you expect some answer, but there is really not much that we
can discuss about so far. The notes you present are interesting but
they don't really touch the problems particular to Python.
This is similar to existing approaches (Samuele posted some links on
IRC), with aggressive specialization to get very precise results like
integer ranges. I agree that, done right, this range analysis can prove
that many usages of integers in a program cannot actually overflow; I've
seen papers that got good results because user programs typically looked
like:
i = 0
while i < len(container):
...
i += 1
The addition here cannot overflow, because i < len(container) <=
sys.maxint so that i+1 <= sys.maxint.
The problem, though, is that this kind of consideration is not what we
are interested in for PyPy. A more interesting problem to consider
would be the unusual Python object model, where the position in the
class hierarchy of instance attributes is not declared. However, we
already solved this one in our annotator.
(Continue reading)
The interface for extensions is minimal to say the least. There is a todo
on the llvm backend to remove the (somewhat legacy) pyrex interface
wrapper and support a richer set of objects that can be passed to and from
CPython.
Thanks for doing a fix up of the llvm backend.
Cheers,
Richard
RSS Feed