48 json_failure[
"sourceLocation"] = location;
66 const jsont &json_location = conversion_dependencies.
location;
72 lhs_object.has_value()?lhs_object->get_identifier():
irep_idt();
74 json_assignment[
"stepType"] =
json_stringt(
"assignment");
77 json_assignment[
"sourceLocation"] = json_location;
79 std::string value_string, type_string, full_lhs_string;
94 explicit comment_base_name_visitort(
const namespacet &ns) : ns(ns)
100 if(expr.
id() == ID_symbol)
107 "base_name comment does not match symbol's base_name");
113 comment_base_name_visitort comment_base_name_visitor(ns);
114 simplified.
visit(comment_base_name_visitor);
117 full_lhs_string =
from_expr(ns, identifier, simplified);
124 "full_lhs_value in assignment must not be nil");
126 if(!ns.
lookup(identifier, symbol))
130 if(type_string.empty())
188 mode = function_name->
mode;
192 for(
const auto &arg : step.
io_args)
199 json_output[
"sourceLocation"] = location;
230 mode = function_name->
mode;
234 for(
const auto &arg : step.
io_args)
241 json_input[
"sourceLocation"] = location;
271 json_call_return[
"function"] =
277 json_call_return[
"sourceLocation"] = location;
284 json_location_only[
"stepType"] =
287 json_location_only[
"thread"] =
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
virtual void operator()(exprt &)
Base class for all expressions.
void visit(class expr_visitort &visitor)
These are pre-order traversal visitors, i.e., the visitor is executed on a node before its children h...
Step of the trace of a GOTO program.
assignment_typet assignment_type
std::optional< symbol_exprt > get_lhs_object() const
There are a large number of kinds of tree structured or tree-like data in CPROVER.
const irept & find(const irep_idt &name) const
const irep_idt & id() const
irept & add(const irep_idt &name)
jsont & push_back(const jsont &json)
json_objectt convert_from_irep(const irept &) const
To convert to JSON from an irep structure by recursively generating JSON for the different sub trees.
json_arrayt & make_array()
static jsont json_boolean(bool value)
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().
irep_idt base_name
Base (non-scoped) name.
const irep_idt & display_name() const
Return language specific display name if present.
source_locationt location
Source code location of definition of symbol.
typet type
Type of symbol.
irep_idt mode
Language mode.
void convert_assert(json_objectt &json_failure, const conversion_dependenciest &conversion_dependencies)
Convert an ASSERT goto_trace step.
void convert_output(json_objectt &json_output, const conversion_dependenciest &conversion_dependencies)
Convert an OUTPUT goto_trace step.
void convert_input(json_objectt &json_input, const conversion_dependenciest &conversion_dependencies)
Convert an INPUT goto_trace step.
void convert_decl(json_objectt &json_assignment, const conversion_dependenciest &conversion_dependencies, const trace_optionst &trace_options)
Convert a DECL goto_trace step.
void convert_return(json_objectt &json_call_return, const conversion_dependenciest &conversion_dependencies)
Convert a FUNCTION_RETURN goto_trace step.
void convert_default(json_objectt &json_location_only, const default_trace_stept &default_step)
Convert all other types of steps not already handled by the other conversion functions.
std::string from_expr(const namespacet &ns, const irep_idt &identifier, const exprt &expr)
std::string from_type(const namespacet &ns, const irep_idt &identifier, const typet &type)
static void json(json_objectT &result, const irep_idt &property_id, const property_infot &property_info)
exprt simplify_expr(exprt src, const namespacet &ns)
#define DATA_INVARIANT(CONDITION, REASON)
This condition should be used to document that assumptions that are made on goto_functions,...
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast an exprt to a symbol_exprt.
std::string to_string(const string_not_contains_constraintt &expr)
Used for debug printing.
This is structure is here to facilitate passing arguments to the conversion functions.
const goto_trace_stept & step
Options for printing the trace using show_goto_trace.
bool json_full_lhs
Add rawLhs property to trace.
std::string default_step_name(const default_step_kindt &step_type)
Turns a default_step_kindt into a string that can be used in the trace.
std::optional< default_trace_stept > default_step(const goto_trace_stept &step, const source_locationt &previous_source_location)
xmlt full_lhs_value(const goto_trace_stept &step, const namespacet &ns)