Simultor frameworks for Squeak

Edmund Ronald eronald at rome.polytechnique.fr
Tue Jul 17 10:35:59 UTC 2001


Simple simulators are lots of fun to write, and watch :)

As Alan indicates, there are about one hundred pages of simulation related
material in the present-day purple covered Goldberg/Robson (Smalltalk 80
The Language) book. There seem to be some simulation framework examples,
and the subindex p444 scovers discrete probability distributions
(Bernouilli, Binomial, Geometric, Poisson) and continuous ones (Uniform,
Exponential, Gamma, Normal), thereby solving the random variable
generation problems for you.

It might be worth getting some domain-specific information. The telecoms
people scutinize qualiy of service issues with the help of a branch of
mathematics called queuing theory, which even has its own measurement unit
- ever hear of the Erlang ?

While writing this post I stumbled on a language called Erlang.

And also some weird arcanum, a language called brainf*ck, An 
Eight-Instruction Turing-Complete Programming Language
which had a 240 byte-long compiler :)
http://www.muppetlabs.com/~breadbox/bf/

Enough digressions -

Edmund


On Mon, 16 Jul 2001, Alan Kay wrote:

> 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