Hi--
So I've been using on-demand behavior transfer to pull into a minimal snapshot just what's required to run a particular application from a kitchen-sink snapshot (with a bunch of prerequisites from various authors). I ran into a situation that made me realize that my approach wasn't accurate enough.
What I had been doing was responding to each message not understood by installing a "loader" method [(RemoteMessageDispatcher class)>>loadAndResend and friends]. When run, the loader method fetches the appropriate method from the kitchen-sink system (using a special network client), then resends the message which originally wasn't understood. The whole process gets kicked off by a loader method that represents an entry point for the application in the kitchen-sink system.
I got pretty far doing this. New classes were installed and initialized properly, as a side-effect of transferring method literals. Super-sends and underrides were handled properly, and transfer loops were avoided. But I hadn't considered that the possibility of needing an override before the need for it is detected. In this case, one of the application classes had an implementation of >>name in the kitchen-sink system, and an application object in the minimal system sent that message. The receiver happily ran Object>>name instead of the override; the minimal system had no way of knowing that it should have installed the overriding method first.
This problem seems unsolvable in general (at least, without perfect type inference, which I am not interested in pursuing). Left unchecked, it could yield highly subtle errors, and so renders any session untrustable. So, I've changed my approach to an even more brute-force one. I'm running the kitchen-sink snapshot in the simulator, and reporting every simulated send, after the entry point, to another copy of the kitchen-sink snapshot which is running normally. That snapshot, in turn, will make sure that the involved method is installed in the minimal snapshot.
I appreciate any suggestions or comments. Well, apart from "this is all nuts"; I've already thought of that one. :)
thanks,
-C
-- Craig Latta improvisational musical informaticist craig@netjam.org www.netjam.org [|] Proceed for Truth!
spoon@lists.squeakfoundation.org