[Grace-core] super in Grace

Ewan Tempero e.tempero at cs.auckland.ac.nz
Sun Feb 6 18:44:28 PST 2011


Hi all,

On 02/02/11 22:58, James Noble wrote:
> So we have the following design space for "super"
>
> * full generality of Smalltalk/Java super sends?
> - change method name & arguments
> * full call-next-method
> - changes arguments but NOT method name
> * restricted call-next-method
> - calls next method with same arguments

Attached is a chart showing a first go at this for Java. The x-axis is measurements for a
"system version". There are 585 of these across 106 different systems (there are 10 - 50
versions for some systems) listed in alphabetical order. Generally the flat looking areas
will be different versions of the same systems.

Each measurement shows the proportion of super invocations made to a method with the same
name (ie covers the bottom 2 options of James' list above). So value of 0.85 says 85% of
the super invocations were to a method with the same name as the method the invocation was
made.

Of the 585 measurements, 32 are < 0.7, across 15 different systems, and 8 of these are due
to the fact that there are no super invocations at all (which is recorded as 0.0)

I actually do distinguish between the bottom two options, but if my results are to be
trusted (grain of salt there, given how quickly this was thrown together), there are no
cases where a method invokes a method with the same name but different parameters. Of
course, if there is very little overloading going on, this is probably not so surprising.

These results don't really answer James' question. E.g., without knowing how many super
invocations are involved (is the 0.75 30/40 or 3/4?) it's hard to know whether ruling out
changing name & arguments is really a good idea. If there's interest, I can put together a 
more complete set of results.

cheers
--ewan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: super.png
Type: image/png
Size: 4005 bytes
Desc: not available
URL: <https://mailhost.cecs.pdx.edu/mailman/private/grace-core/attachments/20110207/0af7ffb8/attachment-0001.png>


More information about the Grace-core mailing list