Edgar J. De Cleene
edgardec2001 at yahoo.com.ar
Thu Jun 14 09:19:57 UTC 2007
El 6/13/07 5:01 PM, "Pavel Krivanek" <squeak1 at continentalbrno.cz> escribió:
> Hi all,
> I have played with a very simple, extremely slow but powerful shrinking
> - take some very small image
> - create a task you want to do, for example some basic script like
> (FileStream forceNewFileNamed: 'out.txt') nextPutAll: (Compiler
> evaluate: '3+4') asString; close.
> SmalltalkImage current snapshot: true andQuit: false.
> - define the correct outputs (the file out.txt includes the text '7')
> - create a control image (with OSProcess) that takes the small image
> and starts to remove method by method and tests if the resultant image
> is not broken and returns correct outputs ;-)
> - the result is an image with the minimal possible count of methods
> for this task
> Of course it isn't so simple in real but this is the basic principle.
> I got the result 1944 methods the Squeak 3.10 (Squeak 2.2 mini image
> has more than 4000 methods). The image and the lists of methods can
> be downloaded here:
> For example the only Methods for UndefinedObject are
> UndefinedObject >> notNil
> UndefinedObject >> handleSignal:
> UndefinedObject >> isEmptyOrNil
> UndefinedObject >> isNil
> If you're expecting extremely small image with few kilobytes, I have
> to disappoint you - the image has about 1,2 MB. That's because it
> includes lot of the other garbage. The main purpose is to show the
> Squeak code base.
> In fact the image can do much more than evaluate the script - it can
> shrink yourself to this size and test if the methods were removed
> properly. It can write the number of instances of a class etc. Some
> methods are redundant because I included it during shrinking manually.
> Of course it removed the platform specific code that it doesn't need
> so I expect that it will be runnable only on Linux.
> Maybe it opens the new interesting way how to continue with the
> license change. Only very few people can help with the license audit
> but all have computers and somebody may have access to powerful
> If the output conditions will be: "file-in the removed code back and
> perform basic tests", we may get relatively small set of methods for
> the license conversion. So we can have small MIT kernel and the rest
> of "non-free" Squeak code can be downloaded and loaded manually by
> -- Pavel
You work is always inspirational, bravo.
What if I wish produce a daughter image with my own final class set ?
I could as example take the class list of my proposal MinimalAgreement (that
is MinimalMorphic plus some I know need )
And build a clean image ?
Or I misunderstood some ?
More information about the Squeak-dev