File tree Expand file tree Collapse file tree 4 files changed +39
-8
lines changed
regression/cbmc-incr-oneloop/alarm2 Expand file tree Collapse file tree 4 files changed +39
-8
lines changed Original file line number Diff line number Diff line change 1+ CORE
2+ main.c
3+ --incremental-loop main.0 --unwind-min 5 --unwind-max 10 --json-ui
4+ ^EXIT=10$
5+ ^SIGNAL=0$
6+ "messageText": "VERIFICATION FAILED"
7+ "currentUnwinding": 1
8+ --
9+ ^warning: ignoring
Original file line number Diff line number Diff line change 11CORE
22main.c
33--incremental-loop main.0 --unwind-min 5 --unwind-max 10
4+ Current unwinding: 1
45^EXIT=10$
56^SIGNAL=0$
67^VERIFICATION FAILED$
Original file line number Diff line number Diff line change @@ -88,14 +88,7 @@ bool symex_bmc_incremental_one_loopt::should_stop_unwind(
8888 abort_unwind_decision.is_known (), " unwind decision should be taken by now" );
8989 bool abort = abort_unwind_decision.is_true ();
9090
91-
92- if (output_ui == ui_message_handlert::uit::XML_UI)
93- {
94- xmlt xml (" current-unwinding" );
95- xml.data = std::to_string (unwind);
96- log.statistics () << xml;
97- }
98-
91+ log_unwinding (unwind);
9992 log.statistics () << (abort ? " Not unwinding" : " Unwinding" ) << " loop " << id
10093 << " iteration " << unwind;
10194
@@ -142,3 +135,29 @@ bool symex_bmc_incremental_one_loopt::resume(
142135
143136 return should_pause_symex;
144137}
138+ void symex_bmc_incremental_one_loopt::log_unwinding (unsigned unwind)
139+ {
140+ const std::string unwind_num = std::to_string (unwind);
141+ switch (output_ui)
142+ {
143+ case ui_message_handlert::uit::PLAIN:
144+ {
145+ log.statistics () << " Current unwinding: " << unwind_num << messaget::eom;
146+ break ;
147+ }
148+ case ui_message_handlert::uit::XML_UI:
149+ {
150+ xmlt xml (" current-unwinding" );
151+ xml.data = unwind_num;
152+ log.statistics () << xml << messaget::eom;
153+ break ;
154+ }
155+ case ui_message_handlert::uit::JSON_UI:
156+ {
157+ json_objectt json;
158+ json[" currentUnwinding" ] = json_numbert (unwind_num);
159+ log.statistics () << json << messaget::eom;
160+ break ;
161+ }
162+ }
163+ }
Original file line number Diff line number Diff line change @@ -47,6 +47,8 @@ class symex_bmc_incremental_one_loopt : public symex_bmct
4747 const call_stackt &context,
4848 unsigned unwind) override ;
4949
50+ void log_unwinding (unsigned unwind);
51+
5052 ui_message_handlert::uit output_ui;
5153};
5254
You can’t perform that action at this time.
0 commit comments