30 for(symex_target_equationt::SSA_stepst::const_iterator s_it =
35 if(!s_it->is_assert())
43 if(s_it->source.pc->source_location().is_not_nil())
46 if(!s_it->comment.empty())
47 out << s_it->comment <<
'\n';
49 symex_target_equationt::SSA_stepst::const_iterator p_it =
53 symex_target_equationt::SSA_stepst::const_iterator last_it =
54 has_threads ? equation.
SSA_steps.end() : s_it;
56 for(std::size_t count = 1; p_it != last_it; p_it++)
57 if(p_it->is_assume() || p_it->is_assignment() || p_it->is_constraint())
62 <<
format(p_it->cond_expr) <<
'\n';
65 out <<
"GUARD: " <<
format(p_it->guard) <<
'\n';
75 for(
unsigned i = 0; i < 26; i++)
82 if(s_it->cond_expr.id() == ID_or)
85 disjuncts.push_back(s_it->cond_expr);
87 std::size_t count = 1;
88 for(
const auto &disjunct : disjuncts)
91 <<
format(disjunct) <<
'\n';
116 for(symex_target_equationt::SSA_stepst::const_iterator s_it =
121 if(!s_it->is_assert())
128 s_it->source.pc->source_location();
130 object[
"sourceLocation"] =
json(source_location);
132 const std::string &s = s_it->comment;
137 symex_target_equationt::SSA_stepst::const_iterator last_it =
138 has_threads ? equation.
SSA_steps.end() : s_it;
142 for(symex_target_equationt::SSA_stepst::const_iterator p_it =
148 (p_it->is_assume() || p_it->is_assignment() || p_it->is_constraint()) &&
151 std::ostringstream string_value;
152 string_value <<
format(p_it->cond_expr);
157 std::ostringstream string_value;
158 string_value <<
format(s_it->cond_expr);
159 object[
"expression"] =
json_stringt(string_value.str());
162 out <<
",\n" << json_result;
172 const std::string &filename = options.
get_option(
"outfile");
174 output_filet output_file{filename.empty() ?
"-" : filename};
175 bool have_file = output_file.
is_file();
177 std::ostream &out = output_file.
stream();
179 switch(ui_message_handler.
get_ui())
192 msg.
status() <<
"Verification conditions written to file"
std::vector< exprt > operandst
jsont & push_back(const jsont &json)
json_arrayt & make_array()
json_objectt & make_object()
source_locationt source_location
Class that provides messages with a built-in verbosity 'level'.
static const commandt reset
return to default formatting, as defined by the terminal
static const commandt faint
render text with faint font
mstreamt & status() const
const std::string get_option(const std::string &option) const
RAII container for an output stream that is either stdout or a file.
bool is_file() const
True if the output is a file (not stdout).
Inheriting the interface of symex_targett this class represents the SSA form of the input program as ...
virtual uit get_ui() const
Output file container that handles stdout ("-") and regular files.
static void json(json_objectT &result, const irep_idt &property_id, const property_infot &property_info)
static void show_vcc_plain(messaget::mstreamt &out, const symex_target_equationt &equation)
Output equations from equation in plain text format to the given output stream out.
static void show_vcc_json(std::ostream &out, const symex_target_equationt &equation)
Output equations from equation in the JSON format to the given output stream out.
void show_vcc(const optionst &options, ui_message_handlert &ui_message_handler, const symex_target_equationt &equation)
Output equations from equation to a file or to the standard output.
Output of the verification conditions (VCCs).
const or_exprt & to_or_expr(const exprt &expr)
Cast an exprt to a or_exprt.
Generate Equation using Symbolic Execution.