diff --git a/borrowed/jenny/jenny.c b/borrowed/jenny/jenny.c index d3ed6ef1e6..90b1ae2aef 100644 --- a/borrowed/jenny/jenny.c +++ b/borrowed/jenny/jenny.c @@ -1645,101 +1645,6 @@ cover_tuples( state *s) my_free((char *)curr_test); } -static void -prepare_reduce( state *s) -{ - feature tuple[MAX_N]; - ub1 n = s->n_final; - ub4 t, d; - - for (t=0; tntests; ++t) { - for (d=0; dndim; ++d) { - s->onec[t][d] = 0; - } - } - - /* Iterate through all the tuples */ - start_builder( s, tuple, n); - - for (;;) { - sb4 i; - ub2 thistest; - - for (i=0; ituple_tester->f[tuple[i].d] = tuple[i].f; - } - if (count_withouts(s->tuple_tester, s->wc2) || - count_withouts(s->tuple_tester, s->wc3)) - goto make_next_tuple; - - for (i=0; intests; ++i) { - ub1 j; - for (j=0; jt[i]->f[tuple[j].d] != tuple[j].f) - break; - if (j == n) - break; /* this test contains this tuple */ - } - - /* no tests cover this tuple */ - if (i==s->ntests) { - printf("error: some tuple not covered at all\n"); - } else { - thistest = i; - for (++i; intests; ++i) { - ub1 j; - for (j=0; jt[i]->f[tuple[j].d] != tuple[j].f) - break; - if (j == n) - break; /* this test contains this tuple */ - } - if (i == s->ntests) { - ub1 j; - for (j=0; jone[thistest][tuple[j].d], n, - &s->onec[thistest][tuple[j].d]); - (void)insert_tuple(s, &ctx, tuple); - } - } - } - - make_next_tuple: - for (i=0; ituple_tester->f[tuple[i].d] = (ub2)~0; - } - if (!next_builder( s, tuple, n)) - break; - } -} - -/* find a test to try to eliminate */ -static int -which_test( state *s) -{ - ub4 t; - ub4 mincount = ~0; - ub4 mint = 0; /* test with the fewest once-covered tuples */ - for (t=0; tntests; ++t) { - ub4 i, j=0; - for (i=0; indim; ++i) { - j += s->onec[t][i]; - } - if (j <= mincount) { - mincount = j; - mint = t; - } - } - return mint; -} - -static void -reduce_tests( state *s) -{ - prepare_reduce( s); -} - /* Confirm that every tuple is covered by either a testcase or a without */ static int confirm( state *s) @@ -1818,7 +1723,6 @@ driver( int argc, char *argv[]) if (parse(argc, argv, &s)) { /* read the user's instructions */ cover_tuples(&s); /* generate testcases until all tuples are covered */ - /* reduce_tests(&s); */ /* try to reduce the number of testcases */ if (confirm(&s)) /* doublecheck that all tuples really are covered */ report_all(&s); /* report the results */ else