home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / xplatfrm / tierra / declare.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-04-26  |  4.1 KB  |  87 lines

  1. /* declare.h  19-8-91  global variable declarations */
  2. /*** Tierra Simulator V3.0: Copyright (c) 1991 Thomas S. Ray ***/
  3.  
  4. #include "license.h"
  5.  
  6. /*
  7. #ifndef lint
  8. static char  sccsid[] = "@(#)declare.h    1.29 10/6/91";
  9. #endif
  10. */
  11.  
  12. #ifndef  LDECLAR_H
  13. #define  LDECLAR_H
  14.  
  15. FILE  *oufr;
  16. HpInst  soup;
  17. struct ArgInstDef  aid[32]; /* instruction definition for arg.c */
  18. I32s  AverageSize;  /* average size of cells in soup */
  19. I32s  BottomReap; /* index of cell at bottom of reaper queue, last to die */
  20. I32s  BrkupCou; /* count of output files break.n */
  21. I32s  BrkupCum; /* cumulative count of bytes output to break.n */
  22. I32s  comsoc;
  23. I32s  CountFlaw;  /* counter for flaw random number */
  24. I32s  CountMovMut; /* keep track of time since last mov_mut */
  25. I32s  CountMutRate; /* keep track of time since last mut */
  26. I32s  debug_switch;
  27. struct event  DistNext; /* time of next disturbance */
  28. struct event  Disturb;  /* time of disturbance */
  29. I32s  extr;  /* which cell to isolate */
  30. I32s  ExtractCount; /* count of cells manually extracted */
  31. I32s  FirstOutDisk; /* has OutDisk been called */
  32. I32s  fragment;  /* 0 = memory is not fragmented  1 = memory is fragmented  */
  33. I32s  FreeBlocks;  /* number of free blocks of memory */
  34. double Generations;/* count of elapsed generations (AvgPop/TimeBirth-Death) */
  35. I8s  **GenInList; /* pointers to soup_in genome names */
  36. I8s  *GenInBuf;   /* buffer containing soup_in genome names */
  37. struct event  InstExe;  /* counter of instructions executed */
  38. struct inst  is;  /* structure for passing info between parse and execute */
  39. I32s  isolate;  /* isolate the genome of the cell extr */
  40. struct event  LastDiv;  /* instructions executed at last divide */
  41. I8s   mes[7][80];    /* array of strings for message passing to front end */
  42. I32s  num_gen;       /* present number of genotypes saved to disk */
  43. I32s  num_genq;      /* present number of genotypes in RAM bank */
  44. I32s  num_genl;      /* present number of genotypes in *gl lists */
  45. I32s  NumSiz;       /* present number of sizes saved to disk */
  46. I32s  NumSizq;      /* present number of sizes in RAM bank */
  47. I32s  NumSizl;      /* present number of sizes in *sl list */
  48. I32s  PhotonSize; /* number of instructions in photon */
  49. I32s  RandIx1, RandIx2, RandIx3; /* for trand() */
  50. I32s  RateFlaw; /* frequency of flaws */
  51. I32s  RateMovMut;  /* 1 / frequency of mutations per mov event */
  52. I32s  RateMut;  /* number of instructions per mutations */
  53. I32s  reaped;    /* 0 = reaper has not killed, 1 = reaper has killed */
  54. I32s  runflag;
  55. I32s  siz_sl;  /* allocated size of *sl array */
  56. I8s   SLASH;  /* in DOS = \ = 92, in unix = / = 47 */
  57. I8s   soup_fn[85];  /* place for soup_in filename */
  58. I32s  SoupBot;  /* index of FreeMem struct for bottom of soup memory */
  59. I32s  SoupTop;  /* index of FreeMem struct for top of soup memory */
  60. I32s  ThisSlice;  /* index of cell that is currently active */
  61. I32s  TimeBirth;  /* count of births in each million instruction */
  62. I32s  TimeDeath;  /* count of deaths in each million instruction */
  63. double TimePop;   /* sum of ttime * NumCells for each million instructions */
  64. I32s  TopReap;    /* index of cell at top of reaper queue, next to die */
  65. I32s  TotFlaw;  /* total number of flaws in this run */
  66. I32s  TotMovMut;  /* total number of move mutations in this run */
  67. I32s  TotMut;  /* total number of background mutations in this run */
  68. I32u  ONE;         /* a constant */
  69. Instruction  PhotonInst[80];  /* instructional representation of photon */
  70. Ind   FreeMemCurrent;  /* current amount of free memory in soup */
  71. Ind   Search_limit;  /* limit on how far address instructions will search */
  72. Pcells  cells;  /* cells array */
  73. Pmf     FreeMem;  /* free memory array */
  74. Pgl     gl;  /* list of genotypes for genebanker */
  75. Psl     sl;  /* list of unique size classes, number of gts */
  76. double  TrandArray[98]; /* for trand() */
  77. struct LastOut  lo;  /* last data output to disk */
  78. struct gl_index  gq_bot;  /* bottom of gene queue */
  79. struct gl_index  gq_top;  /* top of gene queue */
  80. void (*slicer)();
  81.  
  82. #ifdef __TURBOC__
  83. extern unsigned  _stklen = 32768;
  84. #endif
  85.  
  86. #endif
  87.