34 : ui_message_handler(ui_message_handler), options(options)
43 const auto input_assignments =
50 join_strings(out, input_assignments.begin(), input_assignments.end(),
", ");
57 bool print_trace)
const
62 for(
const auto &step : goto_trace.
steps)
67 if(step.io_args.size() == 1)
69 json(step.io_args.front(), ns, ns.
lookup(step.function_id).mode);
70 json_inputs.
push_back(std::move(json_input));
79 json_result[
"coveredGoals"] = std::move(goal_refs);
84 convert(ns, goto_trace, json_trace);
85 json_result[
"trace"] = std::move(json_trace);
93 bool print_trace)
const
95 xmlt xml_result(
"test");
104 for(
const auto &step : goto_trace.
steps)
110 if(step.io_args.size() == 1)
140 log.result() <<
"\nTest suite:\n";
141 for(
const auto &trace : traces.
all())
150 if(
log.status().tellp() > 0)
157 for(
const auto &trace : traces.
all())
165 for(
const auto &trace : traces.
all())
168 log.result() << test_inputs.
to_xml(ns, trace, print_trace);
static bool convert(const irep_idt &identifier, const std::ostringstream &s, symbol_table_baset &symbol_table, message_handlert &message_handler)
Step of the trace of a GOTO program.
const namespacet & get_namespace() const
const std::list< goto_tracet > & all() const
std::set< irep_idt > get_failed_property_ids() const
Returns the property IDs of all failed assertions in the trace.
jsont & push_back(const jsont &json)
Provides methods for streaming JSON arrays.
void push_back(const jsont &json)
Push back a JSON element into the current array stream.
json_stream_objectt & push_back_stream_object()
Add a JSON object child stream.
Provides methods for streaming JSON objects.
json_stream_arrayt & push_back_stream_array(const std::string &key)
Add a JSON array stream for a specific key.
json_arrayt & make_array()
Class that provides messages with a built-in verbosity 'level'.
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
bool lookup(const irep_idt &name, const symbolt *&symbol) const override
See documentation for namespace_baset::lookup().
bool get_bool_option(const std::string &option) const
virtual uit get_ui() const
virtual json_stream_arrayt & get_json_stream()
void set_attribute(const std::string &attribute, unsigned value)
xmlt & new_element(const std::string &key)
const std::string & id2string(const irep_idt &d)
std::string from_expr(const namespacet &ns, const irep_idt &identifier, const exprt &expr)
static void json(json_objectT &result, const irep_idt &property_id, const property_infot &property_info)
xmlt xml(const irep_idt &property_id, const property_infot &property_info)
ranget< iteratort > make_range(iteratort begin, iteratort end)
Stream & join_strings(Stream &&os, const It b, const It e, const Delimiter &delimiter, TransformFunc &&transform_func)
Prints items to an stream, separated by a constant delimiter.