File tree Expand file tree Collapse file tree 6 files changed +28
-0
lines changed Expand file tree Collapse file tree 6 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -28,5 +28,11 @@ bvt propt::new_variables(std::size_t width)
28
28
29
29
propt::resultt propt::prop_solve ()
30
30
{
31
+ ++number_of_solver_calls;
31
32
return do_prop_solve ();
32
33
}
34
+
35
+ std::size_t propt::get_number_of_solver_calls () const
36
+ {
37
+ return number_of_solver_calls;
38
+ }
Original file line number Diff line number Diff line change @@ -117,13 +117,16 @@ class propt
117
117
log .warning () << " CPU limit ignored (not implemented)" << messaget::eom;
118
118
}
119
119
120
+ std::size_t get_number_of_solver_calls () const ;
121
+
120
122
protected:
121
123
virtual resultt do_prop_solve () = 0;
122
124
123
125
// to avoid a temporary for lcnf(...)
124
126
bvt lcnf_bv;
125
127
126
128
messaget log;
129
+ std::size_t number_of_solver_calls = 0 ;
127
130
};
128
131
129
132
#endif // CPROVER_SOLVERS_PROP_PROP_H
Original file line number Diff line number Diff line change @@ -512,3 +512,8 @@ void prop_conv_solvert::print_assignment(std::ostream &out) const
512
512
for (const auto &symbol : symbols)
513
513
out << symbol.first << " = " << prop.l_get (symbol.second ) << ' \n ' ;
514
514
}
515
+
516
+ std::size_t prop_conv_solvert::get_number_of_solver_calls () const
517
+ {
518
+ return prop.get_number_of_solver_calls ();
519
+ }
Original file line number Diff line number Diff line change @@ -55,6 +55,9 @@ class prop_convt:public decision_proceduret
55
55
56
56
// Resource limits:
57
57
virtual void set_time_limit_seconds (uint32_t ) {}
58
+
59
+ // / Returns the number of incremental solver calls
60
+ virtual std::size_t get_number_of_solver_calls () const = 0;
58
61
};
59
62
60
63
//
@@ -122,6 +125,8 @@ class prop_conv_solvert:public prop_convt
122
125
prop.set_time_limit_seconds (lim);
123
126
}
124
127
128
+ std::size_t get_number_of_solver_calls () const override ;
129
+
125
130
protected:
126
131
virtual void post_process ();
127
132
Original file line number Diff line number Diff line change @@ -4831,3 +4831,8 @@ exprt smt2_convt::substitute_let(
4831
4831
4832
4832
return expr;
4833
4833
}
4834
+
4835
+ std::size_t smt2_convt::get_number_of_solver_calls () const
4836
+ {
4837
+ return number_of_solver_calls;
4838
+ }
Original file line number Diff line number Diff line change @@ -135,6 +135,8 @@ class smt2_convt:public prop_convt
135
135
void convert_type (const typet &);
136
136
void convert_literal (const literalt);
137
137
138
+ std::size_t get_number_of_solver_calls () const override ;
139
+
138
140
protected:
139
141
const namespacet &ns;
140
142
std::ostream &out;
@@ -144,6 +146,8 @@ class smt2_convt:public prop_convt
144
146
bvt assumptions;
145
147
boolbv_widtht boolbv_width;
146
148
149
+ std::size_t number_of_solver_calls = 0 ;
150
+
147
151
void write_header ();
148
152
void write_footer (std::ostream &);
149
153
You can’t perform that action at this time.
0 commit comments