johnson@m.cs.uiuc.edu (08/17/90)
Thomas Muhr asks whether there is an automatic way to find out which part of the image is not being used by an application and removing it. There not only is no way at present, there is no easy solution on the horizon. The problem is that without type information, it is impossible to tell what parts of the image are actually going to be used. The problem is equivalent to figuring out whether a program could have a doesNotUnderstand. We did an experiment to see how easy it would be to trace an application without type information. We took as an application x+y, and started tracing every plus method, all the methods called by a plus method, and so on. We got the entire image. If you could figure out the type of the image then everything changes. We have a type system for Smalltalk, and we have a program that can trace an application and build a customized image containing it. Our smallest image (without being real image hackers) is about 45K. There are lots of simpler ways that provide 90% solutions. For example, there are lots of classes that are rarely used by applications, and you could automatically delete these classes and then see if your program works. If it doesn't then you know that you deleted too much. If it does work then you probably didn't delete enough. However, if your image is small enough, who cares? In general, though, building specialized images containing only your application takes a lot of thought. Ralph Johnson - University of Illinois at Urbana-Champaign