cprover
cbmc_main.cpp
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: CBMC Main Module
4 
5 Author: Daniel Kroening, kroening@kroening.com
6 
7 \*******************************************************************/
8 
11 
12 /*
13 
14  CBMC
15  Bounded Model Checking for ANSI-C
16  Copyright (C) 2001-2014 Daniel Kroening <kroening@kroening.com>
17 
18 */
19 
20 #include "cbmc_parse_options.h"
21 
22 #include <util/unicode.h>
23 
24 #ifdef IREP_HASH_STATS
25 #include <iostream>
26 #endif
27 
28 #ifdef IREP_HASH_STATS
29 extern unsigned long long irep_hash_cnt;
30 extern unsigned long long irep_cmp_cnt;
31 extern unsigned long long irep_cmp_ne_cnt;
32 #endif
33 
34 #ifdef _MSC_VER
35 int wmain(int argc, const wchar_t **argv_wide)
36 {
37  const char **argv=narrow_argv(argc, argv_wide);
38 #else
39 int main(int argc, const char **argv)
40 {
41 #endif
42  cbmc_parse_optionst parse_options(argc, argv);
43 
44  int res=parse_options.main();
45 
46  #ifdef IREP_HASH_STATS
47  std::cout << "IREP_HASH_CNT=" << irep_hash_cnt << '\n';
48  std::cout << "IREP_CMP_CNT=" << irep_cmp_cnt << '\n';
49  std::cout << "IREP_CMP_NE_CNT=" << irep_cmp_ne_cnt << '\n';
50  #endif
51 
52  return res;
53 }
const char ** narrow_argv(int argc, const wchar_t **argv_wide)
Definition: unicode.cpp:155
virtual int main()
int main(int argc, const char **argv)
Definition: cbmc_main.cpp:39
CBMC Command Line Option Processing.