On May 26, 2009, at 6:14 PM, Mircea Lungu wrote:
Hi Guys,
I looked a bit in more detail at the class extensions problem. Here
I bring a bit more to the discussion table.
I attach a Snaut screenshot of an analysis session of Hapax + Code
Foo.
(seems attachment is too big for the mailinglist so here's a link:
http://www.inf.unisi.ch/phd/lungu/files/ClassExtensionsInMoose.png)
The panel on the right is the detail of the 91 invocations
abstracted in the high-level dependency between Hapax Development
and Visual Works. To the right of every method which is extended in
a different package thabn Base VisualWorks you can see that package.
What you will see is that althoug most of those dependencies are
defined in othe packages than VisualWorks Base they still are
abstracted in the relationship between Hapax and VisualWorks base.
You will see that there is a dependency between hapax and
Number>>pythag: which methoid is defined in Hapax itself.
The reason is the following.
A method, even when it is an extension (isExtension is True)
belongsTo a class. And the class, logically, belongs to the
namespace where it was initially defined and is, logically, packaged
in the package it was initially defined in. When I compute the high-
level depedencies in softwarenaut i aggregate them from methods to
classes and from there up along the namespace of package hierarchy.
Since the extended methods are placed in their original classes, I
end up with dependencies between the wrong packages.
The high-level dependencies in softwarenaut are wrong because the
model can not express the existence of class extensions.
why do you say that?
I'm confused?
Can we get the class extensions from a famix class?
I can see two solutions:
- we introduce a FAMIXClassExtension as an explicit entity which is
a class which has a reference to the extended class. maybe we can
even introduce a new relationship which is Class Extension.
- we piggyback the class extensions on top of the classes in a
similar way the metaclasses are implemented. In our example, for
Collection we would define a Collection class in CodeFoo,
SqueakExtensions, EyeSee and ech one of these would only contain the
methods that it defines.
I am interested if anybody else is interested in this. And I want to
hear your opinions.
Yes I'm. We really want to use Moose on pharo and we have to take into
account class extensions.
May be the extensions we did in cook are dealing with them. I' m
confused right now.
Jannick, simon can you answer?
Now the problem is that cook extensions as implemented in VW are not
really good. Jannik rewrote it for Pharo.
Stef
Cheers,
Mircea.
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev