コード例 #1
0
/*
 * Call solver on file given as an argument
 */
int main(int argc, char *argv[]) {
  int resu;

  if (argc != 2) {
    fprintf(stderr, "Usage: %s <input file>\n", argv[0]);
    exit(1);
  }

  resu = build_instance(argv[1], &solver);
  if (resu < 0) {
    exit(2);
  }

  construction_time = get_cpu_time();
  print_problem_size(stdout, &solver, argv[1], construction_time);
  init_handler();
  sat_solve(&solver, NULL, true);
  search_time = get_cpu_time() - construction_time;
  print_results(&solver, construction_time, search_time);

  delete_smt_core(&solver);

  return 0;
}
コード例 #2
0
/*
 * Delete all
 */
static void cleanup(void) {
  delete_bit_blaster(&blaster);
  delete_remap_table(&remap);
  delete_smt_core(&solver);
}
コード例 #3
0
/*
 * Delete both
 */
static void delete_solver(egraph_t *egraph, smt_core_t *core) {
  delete_egraph(egraph);
  delete_smt_core(core);
}