8 #include <boost/scoped_ptr.hpp> 
   16 using namespace osl::checkmate;
 
   17 using namespace osl::misc;
 
   21   cerr << 
"Usage: " << prog << 
" [-d depth] csa-filenames " 
   32 int main(
int argc, 
char **argv)
 
   34   const char *program_name = argv[0];
 
   36   bool error_flag = 
false;
 
   41   while ((c = getopt(argc, argv, 
"d:vh")) != EOF)
 
   45     case 'd':   depth = atoi(optarg);
 
   49     default:    error_flag = 
true;
 
   55   if (error_flag || (argc < 1))
 
   58   std::cerr << 
"depth " << depth << 
"\n";
 
   61     for (
int i=0; i<argc; ++i)
 
   68   catch (std::exception& e)
 
   70     std::cerr << e.what() << 
"\n";
 
   77   const Record rec=CsaFile(filename).getRecord();
 
   78   NumEffectState state(rec.getInitialState());
 
   84   const ProofDisproof pdp = searcher.hasCheckmateMoveOfTurn(depth, best_move);
 
   86   const int count = searcher.getCount();
 
   91     std::cerr << 
"win by " << best_move << 
"\n";
 
   96     std::cerr << 
"no checkmate\n";
 
  101     std::cerr << 
"unknown " << pdp << 
"\n";
 
  104   PerfMon::message(total_cycles, 
"total ", count);