CBMC
Loading...
Searching...
No Matches
jdiff_main.cpp
Go to the documentation of this file.
1/*******************************************************************\
2
3Module: JDIFF Main Module
4
5Author: Peter Schrammel
6
7\*******************************************************************/
8
11
12#include "jdiff_parse_options.h"
13
14#ifdef _MSC_VER
15# include <util/unicode.h>
16#endif
17
18#ifdef IREP_HASH_STATS
19#include <iostream>
20#endif
21
22#ifdef IREP_HASH_STATS
23extern unsigned long long irep_hash_cnt;
24extern unsigned long long irep_cmp_cnt;
25extern unsigned long long irep_cmp_ne_cnt;
26#endif
27
28#ifdef _MSC_VER
29int wmain(int argc, const wchar_t **argv_wide)
30{
31 auto vec = narrow_argv(argc, argv_wide);
32 auto narrow = to_c_str_array(std::begin(vec), std::end(vec));
33 auto argv = narrow.data();
34#else
35int main(int argc, const char **argv)
36{
37#endif
39
40 int res = parse_options.main();
41
42#ifdef IREP_HASH_STATS
43 std::cout << "IREP_HASH_CNT=" << irep_hash_cnt << '\n';
44 std::cout << "IREP_CMP_CNT=" << irep_cmp_cnt << '\n';
45 std::cout << "IREP_CMP_NE_CNT=" << irep_cmp_ne_cnt << '\n';
46#endif
47
48 return res;
49}
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Definition ai.h:562
int main()
Definition example.cpp:18
JDIFF Command Line Option Processing.
output_type narrow(input_type input)
Run-time checked narrowing cast.
Definition narrow.h:34
std::vector< std::string > narrow_argv(int argc, const wchar_t **argv_wide)
Definition unicode.cpp:148
std::vector< const char * > to_c_str_array(It b, It e)
Definition unicode.h:65