Example #1
0
tactic * mk_ufbv_tactic(ast_manager & m, params_ref const & p) {
    params_ref main_p(p);
    main_p.set_bool("mbqi", true);
    main_p.set_uint("mbqi.max_iterations", UINT_MAX);
    main_p.set_bool("elim_and", true);

    tactic * t = and_then(repeat(mk_ufbv_preprocessor_tactic(m, main_p), 2),
                          mk_smt_tactic_using(false, main_p));

    t->updt_params(p);

    return t;
}
void engine()
{
  int i,j;
  static int lasttick = 0;
  int start = 0;

  for(i=0;i<4;i++)
    for(j=0;j<MAX_SPRITE_Z;j++){
      sp_list[i][j].used = 0;
    }

  init_mem();
  init_p();

  i = 0;
  while(1){
    while(tick - lasttick < REFRESH_TICKS);
    lasttick = tick;

    disable_irq(CLOCK_IRQ);
    disable_irq(KEYBOARD_IRQ);

    draw_rect(0,0,320,200,0);

    if(start == 0){
      int key = get_lastkey();

      if(key == VKEY_START){
        start = 1;
        srand(tick/REFRESH_TICKS);
      }
    } else {
      main_p();

      for(i=0;i<4;i++)
        for(j=0;j<MAX_SPRITE_Z;j++){
          if(sp_list[i][j].used == 1){
            sp_list[i][j].sp->t(sp_list[i][j].sp);
            sp_list[i][j].sp->d(sp_list[i][j].sp);
          }
        }
    }


    keys_len = 0;

    fill_screen(buf);
    enable_irq(KEYBOARD_IRQ);
    enable_irq(CLOCK_IRQ);
  }
}
Example #3
0
tactic * mk_qfbv_tactic(ast_manager& m, params_ref const & p, tactic* sat, tactic* smt) {

    params_ref local_ctx_p = p;
    local_ctx_p.set_bool("local_ctx", true);

    params_ref solver_p;
    solver_p.set_bool("preprocess", false); // preprocessor of smt::context is not needed.

    params_ref no_flat_p;
    no_flat_p.set_bool("flat", false);

    params_ref ctx_simp_p;
    ctx_simp_p.set_uint("max_depth", 32);
    ctx_simp_p.set_uint("max_steps", 50000000);


    params_ref big_aig_p;
    big_aig_p.set_bool("aig_per_assertion", false);

    tactic* preamble_st = mk_qfbv_preamble(m, p);
    tactic * st = main_p(and_then(preamble_st,
                                  // If the user sets HI_DIV0=false, then the formula may contain uninterpreted function
                                  // symbols. In this case, we should not use the `sat', but instead `smt'. Alternatively,
								  // the UFs can be eliminated by eager ackermannization in the preamble.
                                  cond(mk_is_qfbv_eq_probe(),
                                       and_then(mk_bv1_blaster_tactic(m),
                                                using_params(smt, solver_p)),
                                       cond(mk_is_qfbv_probe(),
                                            and_then(mk_bit_blaster_tactic(m),
                                                     when(mk_lt(mk_memory_probe(), mk_const_probe(MEMLIMIT)),
                                                          and_then(using_params(and_then(mk_simplify_tactic(m),
                                                                                         mk_solve_eqs_tactic(m)),
                                                                                local_ctx_p),
                                                                   if_no_proofs(cond(mk_produce_unsat_cores_probe(),
                                                                                     mk_aig_tactic(),
                                                                                     using_params(mk_aig_tactic(),
                                                                                                  big_aig_p))))),
                                                     sat),
                                            smt))));

    st->updt_params(p);
    return st;

}