DeltaStreams and MC2

Matthew Fulmer tapplek at gmail.com
Wed Oct 3 21:10:04 UTC 2007


On Wed, Oct 03, 2007 at 10:16:55AM +0200, Damien Cassou wrote:
> 2007/10/3, G??ran Krampe <goran at krampe.se>:
> > In short: I think the two code bases are quite different and aim for
> > different goals. But we touch upon "cooperative ground" like SystemEditor
> > and SystemChangeNotifier etc - both of which we have improved in our work
> > on Deltas - so cooperation and mutual understanding is *important* but I
> > do not think the two systems are that much overlapping in the end. I can
> > always be proved wrong. :)
> 
> You might want to have a look at the smalltalk model classes in MC2
> (one class from Class, one class for inst vars...)

I looked at the model classes for MC2 before I started on
DeltaStreams. The DS kernel model is:
DSChange
    DSClassChange
        DSInstVarChange
        DSClassCommentChange
        ...
        DSMethodChange
            DSMethodSourceChange
            DSMethodProtocolChange
            ...
    DSDoIt
    DSCompositeChange
        DSChangeSequence
            DSDelta
            ...
        DSChangeCategorizer

DSVisitor
    DSApplier
        DSSystemEditorApplier
    ...
DSVisitor provides a ton of double-dispatch methods:
    applyChange:
    applyMethodSourceChange
    applyInstVarsChange
    apply:
    applyClassChange:
    applyCompositeChange:
    applyDelta:
    etc.

Every DSClassChange has both a "before" and "after" state.
Before working on DS, I worked with the MC1 MCPatchOperation,
which provides similar capabilities as DSChange, but is not
double-dispatch visitable. This made writing a readable diff for
SqueakSource commit emails very difficult

DSChange withAllSubclasses size "34"
DSVisitor withAllSubclasses size "11"

I don't know if this is the best, or even a good model, but it
provides exactly what is needed to make deltas appliable,
revertable, groupable, searchable, validatable, and condensable.
It quite possibly has way to many classes. Using something
more generic like PRCommands may make the model more generic,
but that is not the immediate goal. I do want to try using the
Pier model for this task someday, though...

-- 
Matthew Fulmer -- http://mtfulmer.wordpress.com/
Help improve Squeak Documentation: http://wiki.squeak.org/squeak/808



More information about the Squeak-dev mailing list