swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exasperating memory corruption


From: William S. Shu
Subject: Re: Exasperating memory corruption
Date: Wed, 19 May 1999 15:36:39 +0100

>this is not really helping you right now, but I'm wondering why you have
>three different parallel Swarms. Why not have one Model Swarm with the
>schedule and three subSwarms Person, Mosquito, MalariaPop.

I am building the project incrementally.  First Person, then MalariaPop,
then Mosquito.
By the time I am finished with the project, the swarms (and more) should be
independent swarms with possibly subswarms.  Conceptually and practically,
it should not matter whether it is swarms or subswarms (do I ignore
something here?).  Besides, the current scheduling of activities is entirely
sequential, and I have only ONE activated swarm.  Not activated,  the swarms
for MalariaPop and Mosquito are essentially objects (I think!).

The swarms for Person, Mosquito and MalariaPop currently differ only in
their initialisation and so I initially wanted to make them objects of their
superclass, SmlModelSwarm.  But that called for parameterisation of methods
such as buildObjects (not allowed as they form part of swarm methods) or
using global variables (bug prone, difficult refinements, etc.)


> If these
>subSwarms are only containers for a list of agents, an AgentList class
>with three instances for each type of agent should be all you need.

I was probably not clear.  Each swarm contains a list of an arbitrary number
of agents (currently, all are objects of the same class).  Later, I will
attribute swarm-level activities to them.  Currently, only the Person model
swarm is activated.  This, again, is due to the incremental development of
the project.  I leave stubs, so to speak, for future developments.

For instance, with Person working okay (at least it does not crash), I add
Mosquito.  Since most functions for Mosquitoes are similar to those for
Person (some identical), it makes life easier to copy and modify them.

As part of the development, I had in the past scheduled activities for
Mosquito and MalariaPop agents in the Person model swarm.  This seemed to
have worked.  At any rate, activities of other objects not part of that
swarm had worked (eg. the ticking of the masterClock object.).

> I
>think you're making it more difficult than needed
Probably.  But there may be a no of reasons.
1)    But part of it is possibly due to the incremental way I develop the
project: I took a "vertical slice" of it to develop, so I incrementally
touch a few features, but in depth (perhaps).  This is as opposed to a
"horizontal slice" which would touch almost all features, but in a shallow
manner.  The reason for this is that I define the general structure for the
project, while others work out the detail: I must necessarily be exposed to
a good cross-section of the issues involved!

2)    I learn swarm as I go along.
For instance, I have just discovered that a "Swarm" object is a zone (do I
get this right?).  But I have been using MalariaPop (derived from a Swarm)
like an object (create/drop, assignment/access to instance variables).  I
have no idea if my usage so far of the Swarm superclass is not violating
anything.

3)    It is a procedure using GDB with objective C (at least as installed in
my Win95 environment).  It would be nice to detect when memory is being
corrupted, rather than when a corrupted memory is being used.

I already have to contend with Windows9x (another constraint on the project)
which crashes gratuitously (?); I may not be eager to go exploring various
environments.

3)    The project itself is rather bulky, and the end-users are not expected
to help with any coding, even minimal!



                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]