@@ -5,22 +5,32 @@ Module: Main
5
5
Author: Eugene Goldberg, [email protected]
6
6
7
7
******************************************************/
8
- #include < queue>
9
- #include < set>
10
- #include < map>
8
+
9
+ // clang-format off
10
+ // The order of these matter.
11
+ #include < util/cmdline.h>
12
+ #include < util/ui_message.h>
13
+
14
+ #include < ebmc/ebmc_properties.h>
15
+
16
+ #include < trans-netlist/netlist.h>
17
+ #include < trans-netlist/trans_to_netlist.h>
18
+
11
19
#include < algorithm>
12
20
#include < iostream>
13
-
14
- #include < ebmc/ebmc_base.h>
21
+ #include < map>
22
+ #include < queue>
23
+ #include < set>
15
24
16
25
#include " minisat/core/Solver.h"
17
26
#include " minisat/simp/SimpSolver.h"
27
+
18
28
#include " dnf_io.hh"
19
29
#include " ccircuit.hh"
20
30
#include " m0ic3.hh"
21
31
22
- #include < util/cmdline.h>
23
32
#include " ebmc_ic3_interface.hh"
33
+ // clang-format off
24
34
25
35
hsh_tbl htable_lits;
26
36
long long gcount = 0 ;
@@ -53,13 +63,21 @@ int ic3_enginet::operator()()
53
63
read_parameters ();
54
64
55
65
try {
56
- transition_system =
66
+ auto transition_system =
57
67
get_transition_system (cmdline, message.get_message_handler ());
58
68
59
- if (make_netlist (netlist)) {
60
- message.error () << " Failed to build netlist" << messaget::eom;
61
- return 2 ;
62
- }
69
+ // make net-list
70
+ message.status () << " Generating Netlist" << messaget::eom;
71
+
72
+ convert_trans_to_netlist (
73
+ transition_system.symbol_table ,
74
+ transition_system.main_symbol ->name ,
75
+ netlist,
76
+ message.get_message_handler ());
77
+
78
+ message.statistics () << " Latches: " << netlist.var_map .latches .size ()
79
+ << " , nodes: " << netlist.number_of_nodes ()
80
+ << messaget::eom;
63
81
64
82
properties = ebmc_propertiest::from_command_line (
65
83
cmdline, transition_system, message.get_message_handler ());
@@ -70,7 +88,11 @@ int ic3_enginet::operator()()
70
88
return 1 ;
71
89
}
72
90
}
73
-
91
+ catch (const std::string &error_str)
92
+ {
93
+ message.error () << error_str << messaget::eom;
94
+ return 1 ;
95
+ }
74
96
catch (const char *error_msg) {
75
97
message.error () << error_msg << messaget::eom;
76
98
return 1 ;
0 commit comments