File tree Expand file tree Collapse file tree 7 files changed +30
-0
lines changed Expand file tree Collapse file tree 7 files changed +30
-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 @@ -119,13 +119,16 @@ class propt
119
119
log .warning () << " CPU limit ignored (not implemented)" << messaget::eom;
120
120
}
121
121
122
+ std::size_t get_number_of_solver_calls () const ;
123
+
122
124
protected:
123
125
virtual resultt do_prop_solve () = 0;
124
126
125
127
// to avoid a temporary for lcnf(...)
126
128
bvt lcnf_bv;
127
129
128
130
messaget log;
131
+ std::size_t number_of_solver_calls = 0 ;
129
132
};
130
133
131
134
#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 @@ -4849,3 +4849,8 @@ exprt smt2_convt::substitute_let(
4849
4849
4850
4850
return expr;
4851
4851
}
4852
+
4853
+ std::size_t smt2_convt::get_number_of_solver_calls () const
4854
+ {
4855
+ return number_of_solver_calls;
4856
+ }
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
Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ std::string smt2_dect::decision_procedure_text() const
36
36
37
37
decision_proceduret::resultt smt2_dect::dec_solve ()
38
38
{
39
+ ++number_of_solver_calls;
40
+
39
41
temporary_filet temp_file_problem (" smt2_dec_problem_" , " " ),
40
42
temp_file_stdout (" smt2_dec_stdout_" , " " ),
41
43
temp_file_stderr (" smt2_dec_stderr_" , " " );
You can’t perform that action at this time.
0 commit comments