Go to the first, previous, next, last section, table of contents.


Thinking out aloud.

This stuff is strictly thinking out aloud, musings that may well have little to do with the program, may be plain wrong out of date whatever. No attempt has been made to reflect the current state of the program in this chapter, this is just to brain storm.

Most stuff can be done as a Context Free grammar, except referencing of other cells/species requires a bit of monkeying in the background to extract the context. Why? When referring to own cell/specie one must use the current value of the variable. When referring to other cell/specie's one must use the value at the last time step, or evaluation order dependant behaviour occurs.

Need things like :-
  mullet.optimal@tewate_bay
  mullet@tewate_bay
  mullet  // Refers to current cell
  optimal // Refers to current specie and current cell
          // fullname is specieName.optimal
  optimal@tewate_bay // Refers to current specie some cell.]
  mullet.optimal // Refers to current cell
  level@tewate_bay 

Maybe one can shift the problem to the interpreter stage.

If we have 
  specieName - 
    op_loadImmediate cellList index
    op_specieCell specieList index

  specieName@cellName
    op_loadImmediate cellList index
    op_specieCell specieList index

  variable -
    op_loadImmediate cellList index
    op_loadImmediate specieVarlist index
    op_refer specieList index

Shifted to the specieName.variableName@cellName format instead of the specieName.variableName[ cellName] approach. Why? Easier to create '@' names on the idList. See See section Referencing internals for resolution of referencing problems.

Referencing internals

Resolved referencing problems by pushing three items onto the stack for every reference.

If specie or cell number was not applicable to particular reference, I push AIKONA instead. On a get() if specie number or cell number doesn't match with current specie/cell number, the old value is given, else the current value. On set() it is always the current value that is modified.

CAUTION: If you break the paradigm by letting specie A assign values to species B, then evaluation order specific behaviour will ensue. You can break the paradigm if you want to, but then it is up to you to bear the consequences.


Go to the first, previous, next, last section, table of contents.