Comparing object graphs (was: The future of SM...)

Chris Muller afunkyobject at yahoo.com
Mon Jul 19 17:33:50 UTC 2004


>> So... I want a smart Smalltalk diff/patch but for *objects* and not 
>> Strings. Anyone up to the task? Magma should in essence already have 
>> this capability somewhere in there I think. :)
>
> Well, I've been working on something a bit like this for Monticello. 
> The thing is, a general diff/patch algorithm for arbitrary graphs of 
> objects is really, really hard..

I tried to conquer this problem, but eventually gave up.  The code for my
attempt is still in the MagmaTester on SM, for anyone interested.  Once loaded,
look at the class MaObjectGraphComparer.  You create an instance of that by
providing two objects you want to compare.  It then does serialization and
compares the buffers to do its work.

It's been a long time since I messed with it, and my goal was only a reasonable
determination of whether two object-graphs were equivalent (so I could use it
for Magma's test cases).  It was too hard to get it to work with complex
graphs.

An interesting, very tough problem..  Too tough for me.

 - Chris



More information about the Squeak-dev mailing list