home *** CD-ROM | disk | FTP | other *** search
- /* extern.h 4-10-91 external declarations of global variables */
- /** Tierra Simulator V3.0: Copyright (c) 1991 Thomas S. Ray **/
-
- #include "license.h"
-
- /*
- #ifndef lint
- static char sccsid[] = "@(#)extern.h 1.30 10/6/91";
- #endif
- */
-
- #ifndef LEXTERN_H
- #define LEXTERN_H
-
- extern FILE *oufr;
- extern HpInst soup;
- extern I32s alive; /* run simulator alive * 1,000,000 instructions */
- extern I32s AverageSize; /* average size of cells in soup */
- extern I32s BottomReap; /* index of cell bottom reaper queue, last to die */
- extern I32s BrkupCou; /* count of output files break.n */
- extern I32s BrkupCum; /* cumulative count of bytes output to break.n */
- extern I32s BrkupSiz; /* size of output files break.n in K */
- extern I32s CellsSize; /* number of allocated elements in cells array */
- extern I32s comsoc;
- extern I32s CountFlaw; /* counter for flaw random number */
- extern I32s CountMovMut;
- extern I32s CountMutRate;
- extern I32s debug; /* output info to screen for debugging */
- extern I32s debug_switch;
- extern I32s DiskOut; /* 0 = no output to disk, 1 = output to disk */
- extern struct event Disturb; /* time of disturbance */
- extern float DistFreq; /* freq. of disturbance, in multiples of recovery t */
- extern struct event DistNext; /* time of next disturbance */
- extern float DistProp; /* proportion of cells killed in each disturbance */
- extern I32s DivSameSiz; /* 0 = off, 1 = daughter cell must be same size */
- extern I32s DivSameGen; /* 0 = off, 1 = daught cell must be same genotype */
- extern I32s DropDead; /* millions instruction since last divide till dead */
- extern I32s extr; /* which cell to isolate */
- extern I32s ExtractCount;
- extern I32s FirstOutDisk;
- extern I32s fragment; /* 0 = memory not fragmented 1 = memory fragmented */
- extern I32s FreeBlocks; /* number of free blocks of memory */
- extern I32s GeneBnker; /* 0 = don't keep track genotyes, 1 = keep track */
- extern double Generations; /* elapsed generations (AvgPop/TimeBirth-Death) */
- extern I8s **GenInList; /* pointers to soup_in genome names */
- extern I8s *GenInBuf; /* buffer containing soup_in genome names */
- extern float GenPerBkgMut; /* generations per background mutation */
- extern float GenPerFlaw; /* generations per flaw */
- extern float GenPerMovMut; /* generations per move mutation */
- extern I32s hangup;/* 0 = exit on error, 1 = hangup on error, for debugging*/
- extern struct InstDef id[32];
- extern struct ArgInstDef aid[32];
- extern struct event InstExe; /* counter of instructions executed */
- extern struct inst is; /* struct for passing info between parse & execute */
- extern I32s isolate; /* isolate the genome of the cell extr */
- extern struct event LastDiv; /* instructions executed at last divide */
- extern I32s MaxFreeBlocks; /* number allocated elements in FreeMem array */
- extern float MaxMalMult; /* multiple of cell size allowed for mal() */
- extern I8s mes[5][80];/* array of strings for message passing to frontend */
- extern I32s MinCellSize; /* minimum cell size */
- extern I32s MinTemplSize; /* minimum template size */
- extern float MovPropThrDiv; /* min proportion of daught cell filled by mov */
- extern I32s new_soup; /* 0 = processed soup core, 1 = new soup core */
- extern I32s NumCells; /* present number of cells in soup */
- extern I32s num_gen; /* present number of genotypes saved to disk */
- extern I32s num_genq; /* present number of genotypes in RAM bank */
- extern I32s num_genl; /* present number of genotypes in *gl lists */
- extern I32s NumSiz; /* present number of sizes saved to disk */
- extern I32s NumSizq; /* present number of sizes in RAM bank */
- extern I32s NumSizl; /* present number of sizes in *sl list */
- extern I32u ONE; /* a constant */
- extern I32s PhotonSize; /* number of instructions in photon */
- extern I32s PhotonWidth; /* amount by which photons slide to determine fit */
- extern I32s RamBankSiz; /* number of genotypes stored in RAM */
- extern I32s RandIx1, RandIx2, RandIx3; /* for tsrand() */
- extern I32s RateFlaw; /* frequency of flaws */
- extern I32s RateMovMut; /* 1 / frequency of mutations per mov event */
- extern I32s RateMut; /* number of instructions per mutations */
- extern I32s reaped; /* 0 = reaper has not killed, 1 = reaper has killed */
- extern I32s runflag;
- extern I32s SaveFreq; /* frequency of saving core_out, soup_out and list */
- extern I32s seed; /* seed for random number generator */
- extern I32s SizDepSlice; /* 0 = slice constant, 1 = slice size dependent */
- extern I32s siz_sl; /* allocated size of *sl array */
- extern I8s SLASH; /* in DOS = \ = 92, in unix = / = 47 */
- extern I32s SliceSize; /* number of instructions executed in each slice */
- extern I32s SliceStyle; /* select style of allocating slice size */
- extern I8s soup_fn[85]; /* place for soup_in filename */
- extern I32s SoupBot; /* index FreeMem struct for bottom of soup memory */
- extern I32s SoupTop; /* index of FreeMem struct for top of soup memory */
- extern I32s ThisSlice; /* index of cell that is currently active */
- extern I32s TimeBirth; /* count of births in each million instruction */
- extern I32s TimeDeath; /* count of deaths in each million instruction */
- extern double TimePop; /* sum of ttime * NumCells for each million */
- extern I32s TopReap; /* index of cell at top reaper queue, next to die */
- extern I32s TotFlaw; /* total number of flaws in this run */
- extern I32s TotMovMut; /* total number of move mutations in this run */
- extern I32s TotMut; /* total number of background mutations in this run */
- extern I32s WatchExe; /* mark executed instructions in genome in genebank */
- extern I32s WatchMov; /* set mov bits in genome in genebank */
- extern I32s WatchTem; /* set template bits in genome in genebank */
- extern I8s GenebankPath[80]; /* path for genebank */
- extern I8s OutPath[80]; /* path for disk output */
- extern I8s PhotonWord[80]; /* alphabetic representation of photon */
- extern Instruction PhotonInst[80];/*instructional representation of photon */
- extern Ind FreeMemCurrent; /* current amount of free memory in soup */
- extern float SearchLimit; /* limit on search, as multiple of average size */
- extern Ind Search_limit;/* limit how far address instructions will search */
- extern Ind SoupSize; /* size of soup memory, measured in instructions */
- extern Pcells cells; /* cells array */
- extern Psl sl; /* list of size classes for genebanker */
- extern Pmf FreeMem; /* free memory array */
- extern double PhotonPow; /* power for photon match slice size */
- extern double SlicePow; /* power for size dependent slice */
- extern double TrandArray[98]; /* for trand() */
- extern float SavThrMem; /* thresh memory prop. to save genotype */
- extern float SavThrPop; /* thresh population prop. to save genotype */
- extern float SlicFixFrac; /* fixed fraction of slice size */
- extern float SlicRanFrac; /* random fraction of slice size */
- extern struct gl_index gq_bot; /* bottom of gene queue */
- extern struct gl_index gq_top; /* top of gene queue */
- extern struct LastOut lo; /* last data output to disk */
- extern void (*slicer)();
-
- #endif
-