/* Count Boolean theories of up to n = 4 variables,
modulo complementation of literals and interchange of variables
Author: V.R. Pratt
Date: 6/12/05
*/
#include
#include
uint p[4] = {0xaaaa, 0xcccc, 0xf0f0, 0xff00}; /* p_0 through p_3 */
uint r[65536]; /* r[t] = reduct of theory t */
uint chng;
#define min(a,b) ((a)<(b)? (a): (b))
void
join(uint t, uint s)
{
chng |= (r[s] != r[t]); /* record pending change in r */
r[s] = r[t] = min(r[s], r[t]); /* join the reducts of s and t */
}
int
main(int argc, char **argv)
{
uint i, j, t, cnt, n;
n = (argc > 1)? atoi(argv[1]): 4;
if (n < 0 || n > 4)
printf("%s n where n is between 0 and 4\n", argv[0]), exit(1);
for (t = 1; t < (1<<(1<> (1<*> ((1<*