#include "defns.i" /* Global variables */ float MINACCURACY = 0.8, /* minimum acceptable accuracy of a clause */ MINALTFRAC = 0.8, /* fraction of best gain to qualify for backup */ DETERMINATE = 0.80; /* use determinate literals */ int MAXPOSSLIT = 5, /* 1 + max backups from single literal position */ MAXALTS = 20, /* max total backups */ MAXVARDEPTH = 4, /* max depth of var in literal */ Verbosity = 1, /* level of output */ MaxConst = 0, /* no. constants */ MaxType = 0, /* no. types */ MaxVar = 0, /* no. variables in training set */ MaxRel = 0, /* highest relation no */ Pos, CyclePos, /* no. pos cases in training set */ Tot, InitialTot, CycleTot, /* no. cases in training set */ TotCovered, /* no. training tuples covered by clause */ PosCovered, /* ditto pos tuples */ NewSize, /* size of next training set */ NCl, /* current clause number */ NLit, /* current literal number */ NDeterminate, /* no. determinate literals found */ WeakLiterals; /* no. no-gain/non-discrim literals */ Relation Reln[MAXRELS+1], /* relations */ RelnOrder[MAXRELS+1], /* order to try relations */ Target; /* relation being induced */ Tuples TrainingSet = Nil, /* tuples in current training set */ InitialTrainingSet = Nil, /* copy at start of first clause */ CopyTrainingSet; /* copy at start of current clause */ float *LogFact, /* LogFact[i] = log2(i!) */ BaseInfo, InitialBaseInfo, MaxPossibleGain, UsedSoFar, /* bits in previous literals */ AvailableBits; /* bits available for this clause */ Clause NewClause; /* clause being constructed */ Boolean NEGLITERALS = true, PartialOrder[MAXARITY+1][MAXARITY+1], /* partial orders on variables */ AnyPartialOrder, **Compatible; /* Compatible[i][j] if types i, j have common value */ char Name[200], SectionDelim, *Variable = "_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", DefVars[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13, 14,15,16,17,18,19,20,21,22,23,24,25,26, 27,28,29,30,31,32,33,34,35,36,37,38,39, 40,41,42,43,44,45,46,47,48,49,50,51,52}, **ConstName = Nil, *Bits; /* used to set bits on tuples */ Const *SortedConst = Nil, VarType[MAXARITY+1], /* VarType[i] = type of variable i */ VarDepth[MAXARITY+1], /* VarDepth[i] = depth of variable i */ Value[MAXARITY+1]; TypeInfo Type[MAXTYPES]; Tuples Found; int NFound; Alternative *ToBeTried; int NToBeTried; PossibleLiteral *Possible; int NPossible;