Creation of Image.

Dwight Hughes dwighth at ipa.net
Mon Jan 18 08:57:38 UTC 1999


Peter William Lount wrote:
> 
> Hi,
> 
> Dwight Hughes wrote the following regarding creating a new image from
> scratch:
> > There is currently no way to do this in Squeak. You might take a look at
> > a bit of discussion on bootstrapping an image in the Squeak FAQ on the
> >Squeak Swiki: http://minnow.cc.gatech.edu/squeak.471
> 
> Following the above link provided by Dwight I found some intersting tidbits
> that provoked these thoughts:
> 
> 1a) Where does Squeak Image file come from?
> 
> Quote from above link: "Some bits in this Squeak are descended from
> Smalltalk-76. They have been loaded and saved in a 'core image' many
> times."

You answered your own question. ;-)

> 1b) Does this mean that Squeak's image file is actually a
> smaltalk-76-modified-copy-modified-copy-etc... of the original Smalltalk 76
> image file? Please confirm and elucidate if possible.

Yes, that is correct. Smalltalk-76 was the first Smalltalk to be based
on the present virtual machine (well, microcode emulator actually) &
virtual image structure -- the design was completed November 1976 and it
was working seven months later [this and more below is from Dan Ingalls'
article "The Evolution of the Smalltalk Virtual Machine" in
"Smalltalk-80: Bits of History, Words of Advice", Glenn Krasner, ed.,
ISBN 0-201-11669-3]. 

> 1c) What is the exact pedigree (so to speak) of the Squeak Image?

I believe it originates from the original Xerox PARC Smalltalk-80 images
licensed to Apple (along with DEC, HP, and Tektronix) back in 1981. So
Squeak and the ParcPlace/ParcPlace-Digitalk/ObjectShare
Smalltalk-80/ObjectWorks/VisualWorks line share a common ancestry.

> 1d) How was the original Smalltalk 76 file generated?

The original Smalltalk-76 image was created by cross-compiling from a
simulation running in Smalltalk-74. Smalltalk-72 and Smalltalk-74 were
image based but were also able to be generated from scratch. Ted Kaehler
created the SystemTracer in Smalltalk-76 to clone and mutate images (and
correct several kinds of problems in the process).

> 2a) LittleSmalltalk can generate it's own Image File
> 
> Quote from above link: "Budd's "Little Smalltalk" has this capability I
> believe (for a greatly simplified implementation)."
> 
> I can confirm that Little Smalltalk does indeed have this ability. In fact
> if you compile the sources for your architecture (as I did for a NextStep
> machine many years ago) you must run a utility to create an image (or
> world file) before you can get LittleSmalltalk running - as easy as eating
> your favorite pie.
> 
> A short C program does the Image birthing procedure (file creation). The
> code is not all that complicated and makes use of C subroutines in the
> LittleSmalltalk VM C source for manipulating the image. Basically core
> objects, such as "true", "false", "nil" and others need to be instantiated.
> A system dictionary needs to be set up. Classes loaded... Basically any
> environmental objects that the VM needs to get running once the image file
> is loaded.
> 
> 2b) It should be straight forward to add this capability to Squeak. What do
> you think? How would you add it?

I would make use of the Squeak image itself -- the Little Smalltalk
approach is too static and cannot be leveraged for other uses. You
already have most of what you need in Squeak already -- add a good
general means to define image formats (which hopefully you can integrate
with the VM code generation to create the corresponding VM
automagically) and subclass the compiler to create a "cross-compiler"
instead to compile code from files and build the new image file [as
usual, the devil is in the details]. This also opens the door to
"declarative" Smalltalk systems with truly separate development and
"application" images, amongst other things. Integrating the SystemTracer
approach with the ImageCreator approach could create something very
interesting.

> 4) A Squeak Custom Image Creation Capability Would Be A Good Thing

Agreed.

-- Dwight





More information about the Squeak-dev mailing list