예제 #1
0
void havoc_loops(goto_modelt &goto_model)
{
  function_modifiest function_modifies(goto_model.goto_functions);

  Forall_goto_functions(it, goto_model.goto_functions)
    havoc_loopst(function_modifies, it->second);
}
예제 #2
0
void mutex_init_instrumentation(
  const symbol_tablet &symbol_table,
  goto_functionst &goto_functions)
{
  // get pthread_mutex_lock

  symbol_tablet::symbolst::const_iterator f_it=
    symbol_table.symbols.find("pthread_mutex_lock");

  if(f_it==symbol_table.symbols.end())
    return;

  // get type of lock argument
  code_typet code_type=to_code_type(to_code_type(f_it->second.type));
  if(code_type.parameters().size()!=1)
    return;

  typet lock_type=code_type.parameters()[0].type();

  if(lock_type.id()!=ID_pointer)
    return;

  Forall_goto_functions(f_it, goto_functions)
    mutex_init_instrumentation(
      symbol_table, f_it->second.body, lock_type.subtype());
}
예제 #3
0
void k_induction(
  goto_functionst &goto_functions,
  bool base_case, bool step_case,
  unsigned k)
{
  Forall_goto_functions(it, goto_functions)
    k_inductiont(it->second, base_case, step_case, k);
}
void remove_pointers(
  goto_functionst &goto_functions,
  symbol_tablet &symbol_table,
  value_setst &value_sets)
{
  namespacet ns(symbol_table);

  optionst options;

  goto_program_dereferencet
    goto_program_dereference(ns, symbol_table, options, value_sets);

  Forall_goto_functions(it, goto_functions)
    goto_program_dereference.dereference_program(it->second.body);
}
예제 #5
0
void remove_skip(goto_functionst &goto_functions)
{
  Forall_goto_functions(f_it, goto_functions)
    remove_skip(f_it->second.body);
}