Simultor frameworks for Squeak

Alan Kay Alan.Kay at squeakland.org
Tue Jul 17 05:08:32 UTC 2001


Here is a very simple scheme for this that we called "Simpula" in the 
old Smalltalk-72 days.

You just need some form of easily inserted sorted list (we used a 
doubly linked one back then). This is called the "Sequencing Set 
(SQS).
      Simula schedules everything via "simulation time" which is just 
a monotonically increasing real number. Instead of using coroutines 
as Simula and Flex did, we simply wrote a method for each phase of 
"life" for an object. If you said "SQS hold: 50.0 with: self do: 
#methodname. ^" then this would sort an entry into the SQS containing 
the object, the method name, and the wakeup time, and exit the method 
you were in. The exit would be to the SQS scheduler which would 
advance the systems time to the number in the first entry in the SQS 
and do a perform to execute it. Etc.
     So this is very simple to do. The real work in making a discrete 
event simulation system has to do with making various statisical 
distributes, etc. I think most of those are in Smalltalk-80 and hence 
in Squeak. I also vaguely recall that there is some discussion about 
this in one of the colored books (I think maybe the Blue Book).
      Also, look at a language called SOL by McNeely and Knuth (ca. 
1963) for some good ideas about event-driven simulations.

It just happens that Andreas Raab has been doing some nifty new 
control structure stuff in Squeak that will allow many of these 
simulation structures to be done very directly and very efficiently. 
I think he is planning to release this code in the near future.

Cheers,

Alan

-------

At 4:57 PM -0500 7/16/01, david at aminal.com wrote:
>I thought it might be interesting to do some simulations of Freenet
>( http://www.freenetproject.org ) and, even better, to use Squeak to
>do them.
>
>I *think* what I need to do this is a discrete event simulator framework,
>does such a thing exist for Squeak?
>
>I did some looking on the swiki and a quick search of the smalltalk archives,
>and didn't come up with anything.
>
>This is a personal project for my own amusement and edification, and I'm
>probably getting into something that's way over my head, but I thought
>I'd ask anyway :-)
>
>David Schutt


-- 




More information about the Squeak-dev mailing list