26 May 2000 shapr   » (Journeyer)

Well, crap. I got pretty far into ClassReferences() and discovered that I should really be using the Abstract Syntax Tree regexps module to ask these questions. I wish I had already written the AST regexps. Oh well. So now I'm working on the parse tree searching stuff, once it's done, I'll refactor the analysis methods to use it.

The one thing I don't know how to deal with is the primitive analysis function 'IsExclusive().' The IsExclusive analysis function is supposed to determine if a variable is only used by a single instance of a class at a time. I can safely assume that variables that are set on self in the __init__ function satisfy that criterion, but what about other variables? The original RB assumes true unless it discovers something to the contrary. The rough part is that it instruments the class to detect access by more than one instance and then executes the test suite. That seems like a pretty weak test to me, and a lot of code to write to get the results of that weak test.

I think I may just work on the Python2C AST to Python source problem and let these thoughts simmer in the back of my head. That's the problem with PeterPrincipleProgramming, you don't know what you're doing until you've already done it, and then you get to do it over.

I got a nifty Object Inspector from Anthony Lander (lead architect for TOPlink/Smalltalk) that intregrates nicely with IDLE and looks very much like a Smalltalk Object Inspector. It's cool code, and the first code contribution to the Python Refactoring Browser project.

People who have contributed to this project so far: Erno Kuusela, Taral, and Anthony Lander. (and me) thanks guys! and thanks to demoncrat for coding advice and answer to questions about Smalltalk.

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!