File tree Expand file tree Collapse file tree 10 files changed +38
-333
lines changed Expand file tree Collapse file tree 10 files changed +38
-333
lines changed Original file line number Diff line number Diff line change 11
11
12
12
#include " all_properties_class.h"
13
13
14
- #include < util/time_stopping.h>
14
+ #include < chrono>
15
+
15
16
#include < util/xml.h>
16
17
#include < util/json.h>
17
18
@@ -56,8 +57,8 @@ safety_checkert::resultt bmc_all_propertiest::operator()()
56
57
57
58
solver.set_message_handler (get_message_handler ());
58
59
59
- // stop the time
60
- absolute_timet sat_start= current_time ( );
60
+ auto now = std::chrono::steady_clock::now ();
61
+ auto sat_start = std::chrono::time_point_cast<std::chrono::seconds>(now );
61
62
62
63
bmc.do_conversion ();
63
64
@@ -131,12 +132,12 @@ safety_checkert::resultt bmc_all_propertiest::operator()()
131
132
g.second .status =goalt::statust::SUCCESS;
132
133
}
133
134
134
- // output runtime
135
-
136
135
{
137
- absolute_timet sat_stop=current_time ();
138
- status () << " Runtime decision procedure: "
139
- << (sat_stop-sat_start) << " s" << eom;
136
+ now = std::chrono::steady_clock::now ();
137
+ auto sat_stop = std::chrono::time_point_cast<std::chrono::seconds>(now);
138
+
139
+ status () << " Runtime decision procedure: " << (sat_stop - sat_start).count ()
140
+ << " s" << eom;
140
141
}
141
142
142
143
// report
Original file line number Diff line number Diff line change 11
11
12
12
#include " bmc.h"
13
13
14
+ #include < chrono>
14
15
#include < fstream>
15
16
#include < iostream>
16
17
#include < memory>
17
18
18
19
#include < util/string2int.h>
19
20
#include < util/source_location.h>
20
21
#include < util/string_utils.h>
21
- #include < util/time_stopping.h>
22
22
#include < util/message.h>
23
23
#include < util/json.h>
24
24
#include < util/cprover_prefix.h>
@@ -154,20 +154,20 @@ bmct::run_decision_procedure(prop_convt &prop_conv)
154
154
155
155
prop_conv.set_message_handler (get_message_handler ());
156
156
157
- // stop the time
158
- absolute_timet sat_start= current_time ( );
157
+ auto now = std::chrono::steady_clock::now ();
158
+ auto sat_start = std::chrono::time_point_cast<std::chrono::seconds>(now );
159
159
160
160
do_conversion ();
161
161
162
162
status () << " Running " << prop_conv.decision_procedure_text () << eom;
163
163
164
164
decision_proceduret::resultt dec_result=prop_conv.dec_solve ();
165
- // output runtime
166
165
167
166
{
168
- absolute_timet sat_stop=current_time ();
169
- status () << " Runtime decision procedure: "
170
- << (sat_stop-sat_start) << " s" << eom;
167
+ now = std::chrono::steady_clock::now ();
168
+ auto sat_stop = std::chrono::time_point_cast<std::chrono::seconds>(now);
169
+ status () << " Runtime decision procedure: " << (sat_stop - sat_start).count ()
170
+ << " s" << eom;
171
171
}
172
172
173
173
return dec_result;
Original file line number Diff line number Diff line change 11
11
12
12
#include " bmc.h"
13
13
14
- #include < util/time_stopping.h>
14
+ #include < chrono>
15
+
15
16
#include < util/xml.h>
16
17
#include < util/xml_expr.h>
17
18
#include < util/json.h>
@@ -191,8 +192,8 @@ bool bmc_covert::operator()()
191
192
192
193
solver.set_message_handler (get_message_handler ());
193
194
194
- // stop the time
195
- absolute_timet sat_start= current_time ( );
195
+ auto now = std::chrono::steady_clock::now ();
196
+ auto sat_start = std::chrono::time_point_cast<std::chrono::seconds>(now );
196
197
197
198
// Collect _all_ goals in `goal_map'.
198
199
// This maps property IDs to 'goalt'
@@ -251,12 +252,11 @@ bool bmc_covert::operator()()
251
252
252
253
cover_goals ();
253
254
254
- // output runtime
255
-
256
255
{
257
- absolute_timet sat_stop=current_time ();
258
- status () << " Runtime decision procedure: "
259
- << (sat_stop-sat_start) << " s" << eom;
256
+ now = std::chrono::steady_clock::now ();
257
+ auto sat_stop = std::chrono::time_point_cast<std::chrono::seconds>(now);
258
+ status () << " Runtime decision procedure: " << (sat_stop - sat_start).count ()
259
+ << " s" << eom;
260
260
}
261
261
262
262
// report
Original file line number Diff line number Diff line change @@ -11,12 +11,13 @@ Author: Peter Schrammel
11
11
12
12
#include " fault_localization.h"
13
13
14
+ #include < chrono>
15
+
14
16
#include < util/threeval.h>
15
17
#include < util/arith_tools.h>
16
18
#include < util/symbol.h>
17
19
#include < util/std_expr.h>
18
20
#include < util/message.h>
19
- #include < util/time_stopping.h>
20
21
#include < util/xml_expr.h>
21
22
22
23
#include < solvers/prop/minimize.h>
@@ -245,8 +246,8 @@ fault_localizationt::run_decision_procedure(prop_convt &prop_conv)
245
246
246
247
prop_conv.set_message_handler (bmc.get_message_handler ());
247
248
248
- // stop the time
249
- absolute_timet sat_start= current_time ( );
249
+ auto now = std::chrono::steady_clock::now ();
250
+ auto sat_start = std::chrono::time_point_cast<std::chrono::seconds>(now );
250
251
251
252
bmc.do_conversion ();
252
253
@@ -259,9 +260,10 @@ fault_localizationt::run_decision_procedure(prop_convt &prop_conv)
259
260
// output runtime
260
261
261
262
{
262
- absolute_timet sat_stop=current_time ();
263
- status () << " Runtime decision procedure: "
264
- << (sat_stop-sat_start) << " s" << eom;
263
+ now = std::chrono::steady_clock::now ();
264
+ auto sat_stop = std::chrono::time_point_cast<std::chrono::seconds>(now);
265
+ status () << " Runtime decision procedure: " << (sat_stop - sat_start).count ()
266
+ << " s" << eom;
265
267
}
266
268
267
269
return dec_result;
Original file line number Diff line number Diff line change @@ -13,11 +13,11 @@ Date: March 2016
13
13
14
14
#include " symex_coverage.h"
15
15
16
+ #include < chrono>
16
17
#include < iostream>
17
18
#include < fstream>
18
19
#include < sstream>
19
20
20
- #include < util/time_stopping.h>
21
21
#include < util/xml.h>
22
22
#include < util/string2int.h>
23
23
#include < util/cprover_prefix.h>
@@ -387,6 +387,10 @@ void symex_coveraget::build_cobertura(
387
387
std::string overall_branch_rate_str=
388
388
rate (overall_cov.branches_covered , overall_cov.branches_total );
389
389
390
+ auto now = std::chrono::system_clock::now ();
391
+ auto current_time = std::chrono::time_point_cast<std::chrono::seconds>(now);
392
+ std::time_t tt = std::chrono::system_clock::to_time_t (current_time);
393
+
390
394
// <coverage line-rate="0.0" branch-rate="0.0" lines-covered="1"
391
395
// lines-valid="1" branches-covered="1"
392
396
// branches-valid="1" complexity="0.0"
@@ -404,7 +408,7 @@ void symex_coveraget::build_cobertura(
404
408
xml_coverage.set_attribute (" complexity" , " 0.0" );
405
409
xml_coverage.set_attribute (" version" , " 2.1.1" );
406
410
xml_coverage.set_attribute (" timestamp" ,
407
- std::to_string (current_time (). get_t () ));
411
+ std::to_string (tt ));
408
412
409
413
xmlt &packages=xml_coverage.new_element (" packages" );
410
414
Original file line number Diff line number Diff line change @@ -84,8 +84,6 @@ SRC = arith_tools.cpp \
84
84
tempdir.cpp \
85
85
tempfile.cpp \
86
86
threeval.cpp \
87
- time_stopping.cpp \
88
- timer.cpp \
89
87
type.cpp \
90
88
type_eq.cpp \
91
89
typecheck.cpp \
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments