25
25
#include < util/ui_message.h>
26
26
27
27
void show_vcc_plain (
28
- std::ostream &out,
28
+ messaget::mstreamt &out,
29
29
const namespacet &ns,
30
30
const symex_target_equationt &equation)
31
31
{
@@ -63,7 +63,8 @@ void show_vcc_plain(
63
63
{
64
64
if (!p_it->ignore )
65
65
{
66
- out << " {-" << count << " } " << format (p_it->cond_expr ) << ' \n ' ;
66
+ out << messaget::faint << " {-" << count << " } " << messaget::reset
67
+ << format (p_it->cond_expr ) << ' \n ' ;
67
68
68
69
#ifdef DEBUG
69
70
out << " GUARD: " << format (p_it->guard ) << ' \n ' ;
@@ -75,10 +76,10 @@ void show_vcc_plain(
75
76
}
76
77
77
78
// Unicode equivalent of "|--------------------------"
78
- out << u8" \u251c " ;
79
+ out << messaget::faint << u8" \u251c " ;
79
80
for (unsigned i = 0 ; i < 26 ; i++)
80
81
out << u8" \u2500 " ;
81
- out << ' \n ' ;
82
+ out << messaget::reset << ' \n ' ;
82
83
83
84
// split property into multiple disjunts, if applicable
84
85
exprt::operandst disjuncts;
@@ -91,9 +92,12 @@ void show_vcc_plain(
91
92
std::size_t count = 1 ;
92
93
for (const auto &disjunct : disjuncts)
93
94
{
94
- out << ' {' << count << " } " << format (disjunct) << ' \n ' ;
95
+ out << messaget::faint << ' {' << count << " } " << messaget::reset
96
+ << format (disjunct) << ' \n ' ;
95
97
count++;
96
98
}
99
+
100
+ out << messaget::eom;
97
101
}
98
102
}
99
103
@@ -174,7 +178,7 @@ void show_vcc(
174
178
of.open (filename);
175
179
if (!of)
176
180
throw invalid_command_line_argument_exceptiont (
177
- " invalid file to read trace from : " + filename, " --outfile" );
181
+ " failed to open output file : " + filename, " --outfile" );
178
182
}
179
183
180
184
std::ostream &out = have_file ? of : std::cout;
@@ -190,13 +194,18 @@ void show_vcc(
190
194
break ;
191
195
192
196
case ui_message_handlert::uit::PLAIN:
193
- msg.status () << " VERIFICATION CONDITIONS:\n " << messaget::eom;
194
197
if (have_file)
195
- show_vcc_plain (out, ns, equation);
198
+ {
199
+ msg.status () << " Verification conditions written to file"
200
+ << messaget::eom;
201
+ stream_message_handlert mout_handler (out);
202
+ messaget mout (mout_handler);
203
+ show_vcc_plain (mout.status (), ns, equation);
204
+ }
196
205
else
197
206
{
207
+ msg.status () << " VERIFICATION CONDITIONS:\n " << messaget::eom;
198
208
show_vcc_plain (msg.status (), ns, equation);
199
- msg.status () << messaget::eom;
200
209
}
201
210
break ;
202
211
}
0 commit comments