5 die "Usage:\nrun_till_fix CNF_Filename [Num_Max_Iterations]" if (@ARGV < 1);
8 my $max_iteration = @ARGV > 1 ? $ARGV[1] : 1000;
9 my $last_cls_count = 0;
10 my $filename = $file."_itr_0";
11 $filename =~ s/.*\///;
13 system("cp $file $filename");
17 for (my $i = 0; $i < $max_iteration; ++$i) {
19 open INPUT, "<$filename" or die "$!\n";
25 last if ($tokens[0] eq "p");
28 last if $tokens[3] == $last_cls_count;
30 $last_cls_count = $tokens[3];
32 system("zchaff $filename");
33 system("zverify_df $filename resolve_trace -core");
35 $filename = $file."_itr_".$j;
36 system("mv unsat_core.cnf $filename");