Hi, It is possible through the PyPy toolchain check if a program is a rPython program? I know the tool Pylint (RPylint) gives an idea, but it seems to me that this tool gives some errors that result from being a little outdated. Thanks, Eva Maia.
On Fri, Jan 21, 2011 at 5:03 PM, Eva Maia <eva_maia@sapo.pt> wrote:
Hi,
It is possible through the PyPy toolchain check if a program is a rPython program?
I know the tool Pylint (RPylint) gives an idea, but it seems to me that this tool gives some errors that result from being a little outdated.
Thanks,
Eva Maia. _______________________________________________
Hi. This tool is completely broken. Primary reason is that this tool operates on the level of source code, while RPython operates on live python objects and that's a huge difference. That said, I don't think there is any other way of finding what's RPython without compiling it. In fact, RPython is defined as a thing that can be accepted by our translation toolchain :-) PS. Why you want to write RPython in the first place? Cheers, fijal
Hi, Eva I assume you are asking if there is a program is a valid rpython program, right? Since rpython is a subset of python, you can check if it is a valid python program and then verify the restrictions imposed by rpython. "RPython: a Step Towards Reconciling Dynamically and Statically Typed OO Languages" lists these. PyPy impementation of rpython appears to check these constraints at "initialization" time, which is in a sense, python runtime. The result is, I think, to try and see if it compiles. Come to think of it, vaildity and correctness are blurred in dynamic languages. Syntax is checked, but then Imports and asserts can affect if all of the program is even considered. Alternatively if you want to quickly distinguish practical rpython code from python, I guess you could look for clues such as what types are used, what modules imported, etc. Dima On 21 January 2011 08:03, Eva Maia <eva_maia@sapo.pt> wrote:
Hi,
It is possible through the PyPy toolchain check if a program is a rPython program?
I know the tool Pylint (RPylint) gives an idea, but it seems to me that this tool gives some errors that result from being a little outdated.
Thanks,
Eva Maia. _______________________________________________ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev
participants (3)
-
Dima Tisnek
-
Eva Maia
-
Maciej Fijalkowski