goto_programt::targett add_inv_prog(invariant_programt &prog,
    goto_programt::targett pos, const size_t max_solution_size,
    const goto_programt::targett &decl)
{
  symbol_tablet &st=prog.st;
  goto_functionst &gf=prog.gf;
  const std::string base_name(get_prog_var_name(st, decl));
  const typet size_type(unsigned_int_type());
  const constant_exprt size(from_integer(max_solution_size, size_type));
  const symbol_typet instr_type(CEGIS_INSTRUCTION_TYPE_NAME);
  const array_typet prog_type(instr_type, size);
  pos=declare_cegis_meta_variable(st, gf, pos, base_name, prog_type);
  execute_inv_prog(st, gf, max_solution_size, decl);
  return pos;
}
size_t default_cegis_constant_strategy(symbol_tablet &st, goto_functionst &gf)
{
  const std::vector<constant_exprt> literals(collect_integer_literals(st, gf));
  size_t max_word_width=0u;
  size_t const_index=0u;
  goto_programt::targett pos=get_entry_body(gf).instructions.begin();
  // XXX: Literals strategy, benchmark performance
  for (const constant_exprt &expr : literals)
  {
    // XXX: Debug
    //std::cout << "<id>" << const_index << "</id>" << std::endl;
    //std::cout << "<value>" << expr.to_string() << "</value>" << std::endl;
    // XXX: Debug
    const std::string base_name(get_name(const_index++));
    pos=declare_cegis_meta_variable(st, gf, pos, base_name, expr.type());
    pos=assign_cegis_meta_variable(st, gf, pos, base_name, expr);
    max_word_width=std::max(max_word_width, get_min_word_width(expr));
  }
  return max_word_width;
}