コード例 #1
0
ファイル: havoc_loops.cpp プロジェクト: theyoucheng/cbmc
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
ファイル: k_induction.cpp プロジェクト: rbavishi/iCBMC
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);
}
コード例 #4
0
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
ファイル: remove_skip.cpp プロジェクト: ssvlab/esbmc-gpu
void remove_skip(goto_functionst &goto_functions)
{
  Forall_goto_functions(f_it, goto_functions)
    remove_skip(f_it->second.body);
}