예제 #1
0
/*
 * Print model, including the aliased terms
 * - one line per term
 * - if model->has_alias is true, then the value of all terms in
 *   the alias table is displayed
 * - if model->has_alias is false, then this is the same as model_print
 */
void model_pp_full(yices_pp_t *printer, model_t *model) {
  evaluator_t eval;
  ivector_t v;
  term_t *a;
  uint32_t n;

  if (model->has_alias && model->alias_map != NULL) {
    init_evaluator(&eval, model);

    // collect all terms that have a value
    init_ivector(&v, 0);
    model_collect_terms(model, true, model->terms, term_to_print, &v);

    n = v.size;
    a = v.data;
    eval_pp_bool_assignments(printer, &eval, a, n);
    eval_pp_arithmetic_assignments(printer, &eval, a, n);
    eval_pp_bitvector_assignments(printer, &eval, a, n);
    eval_pp_constant_assignments(printer, &eval, a, n);
    eval_pp_tuple_assignments(printer, &eval, a, n);
    eval_pp_function_assignments(printer, &eval, a, n);
    vtbl_pp_queued_functions(printer, &model->vtbl, true);
    delete_evaluator(&eval);
    delete_ivector(&v);
  } else {
    model_pp(printer, model);
  }
}
예제 #2
0
 void boogie_proof::pp(std::ostream& out) {
     if (m_proof) {
         pp_proof(out);
     }
     if (m_model) {
         model_pp(out, *m_model);
     }
 }