@@ -32,89 +32,35 @@ class solver_factoryt
32
32
const optionst &_options,
33
33
const symbol_tablet &_symbol_table,
34
34
message_handlert &_message_handler,
35
- bool _output_xml_in_refinement)
36
- : options(_options),
37
- symbol_table (_symbol_table),
38
- ns(_symbol_table),
39
- message_handler(_message_handler),
40
- output_xml_in_refinement(_output_xml_in_refinement)
41
- {
42
- }
35
+ bool _output_xml_in_refinement);
43
36
44
37
// The solver class,
45
38
// which owns a variety of allocated objects.
46
39
class solvert
47
40
{
48
41
public:
49
- solvert ()
50
- {
51
- }
52
-
53
- explicit solvert (std::unique_ptr<prop_convt> p)
54
- : prop_conv_ptr(std::move(p))
55
- {
56
- }
57
-
58
- solvert (std::unique_ptr<prop_convt> p1, std::unique_ptr<propt> p2)
59
- : prop_ptr(std::move(p2)), prop_conv_ptr(std::move(p1))
60
- {
61
- }
62
-
63
- solvert (std::unique_ptr<prop_convt> p1, std::unique_ptr<std::ofstream> p2)
64
- : ofstream_ptr(std::move(p2)), prop_conv_ptr(std::move(p1))
65
- {
66
- }
67
-
68
- prop_convt &prop_conv () const
69
- {
70
- PRECONDITION (prop_conv_ptr != nullptr );
71
- return *prop_conv_ptr;
72
- }
73
-
74
- propt &prop () const
75
- {
76
- PRECONDITION (prop_ptr != nullptr );
77
- return *prop_ptr;
78
- }
79
-
80
- void set_prop_conv (std::unique_ptr<prop_convt> p)
81
- {
82
- prop_conv_ptr = std::move (p);
83
- }
84
-
85
- void set_prop (std::unique_ptr<propt> p)
86
- {
87
- prop_ptr = std::move (p);
88
- }
89
-
90
- void set_ofstream (std::unique_ptr<std::ofstream> p)
91
- {
92
- ofstream_ptr = std::move (p);
93
- }
42
+ solvert () = default ;
43
+ explicit solvert (std::unique_ptr<prop_convt> p);
44
+ solvert (std::unique_ptr<prop_convt> p1, std::unique_ptr<propt> p2);
45
+ solvert (std::unique_ptr<prop_convt> p1, std::unique_ptr<std::ofstream> p2);
46
+
47
+ prop_convt &prop_conv () const ;
48
+ propt &prop () const ;
49
+
50
+ void set_prop_conv (std::unique_ptr<prop_convt> p);
51
+ void set_prop (std::unique_ptr<propt> p);
52
+ void set_ofstream (std::unique_ptr<std::ofstream> p);
94
53
95
54
// the objects are deleted in the opposite order they appear below
96
55
std::unique_ptr<std::ofstream> ofstream_ptr;
97
56
std::unique_ptr<propt> prop_ptr;
98
57
std::unique_ptr<prop_convt> prop_conv_ptr;
99
58
};
100
59
101
- // returns a solvert object
102
- virtual std::unique_ptr<solvert> get_solver ()
103
- {
104
- if (options.get_bool_option (" dimacs" ))
105
- return get_dimacs ();
106
- if (options.get_bool_option (" refine" ))
107
- return get_bv_refinement ();
108
- else if (options.get_bool_option (" refine-strings" ))
109
- return get_string_refinement ();
110
- if (options.get_bool_option (" smt2" ))
111
- return get_smt2 (get_smt2_solver_type ());
112
- return get_default ();
113
- }
114
-
115
- virtual ~solver_factoryt ()
116
- {
117
- }
60
+ // / Returns a solvert object
61
+ virtual std::unique_ptr<solvert> get_solver ();
62
+
63
+ virtual ~solver_factoryt () = default ;
118
64
119
65
protected:
120
66
const optionst &options;
0 commit comments