/* logic.c 11-11-89 **** The part of MaGIC.c in which it matters what **** **** logic is being tested for. This comprises **** **** inputting the orders, etc., setting up the **** **** possible values, testing the matrices and **** **** printing out the results. **** **** **** **** Many external variables are required: these **** **** are given in the header of LID.c. The **** **** functions set_poss() (in LOGIC_SET.c) and **** **** Good_matrix() (in LOGIC_TEST.c) are called **** **** from transref(). **** ************************************************************/ #define IFF(x,y) ((x && y) || (!x && !y)) #define F_N (theJob->f_n && theJob->logic>=DW) /***********************************************************/ int C[SZ][SZ], /* The implication matrix */ ord[SZ][SZ], /* The partial order table */ K[SZ][SZ], /* The conjunction matrix */ A[SZ][SZ], /* The disjunction matrix */ fus[SZ][SZ], /* The fusion matrix */ N[SZ], /* The negation matrix */ true[SZ], /* Designated values */ maximal[SZ], /* Maximal guys under ord */ cc[SZ][SZ]; /* Info cell for C[x][y] */ int good, /* Matrices accepted */ negno, /* Negation #, this size */ ordno, /* Order #, this negation */ desno, /* Des #, this order */ matno, /* Matrix #, this des */ des, /* Least designated value */ Vlength, /* Actual vector length */ ii, jj, kk; /* Variables used in Test */ /***********************************************************/ #ifdef PARALLEL #include "logic_io_p.c" #else #include "logic_io_s.c" #endif #include "logic_test.c" #include "logic_set.c"