[Types-sig] Plea for help.

Paul Prescod paul@prescod.net
Wed, 08 Dec 1999 09:41:01 -0500


> I have two possible approaches for the type checker in mind currently
> that leverage current Python; one is an AST based type checker, and
> another is a bytecode based typechecker. I'm not sure which one would be
> easier as I don't know enough about either Python's ASTs or bytecodes,
> but in the happy abstract space of insufficient information I can wrap
> my mind better around a bytecode based checker than around an AST based
> checker. 

My feeling is the opposite. The AST follows the structure of the Python
syntax more closely. Plus it has a superset of the bytecode information.
Plus the Python grammar is the same for JPython but the bytecodes are
not.

The one virtue I can see in doing the checks on the bytecode is for
Java-style opaque bytecode security.

Here's my plea for help: among the many "Python compiler" projects out
there there must be some good Python code for walking around ASTs
building type (or at least module) representation objects. I think that
JPython is wirtten in Java. What else should I be looking at?

-- 
 Paul Prescod  - ISOGEN Consulting Engineer speaking for himself
Floggings will increase until morale improves.