Go to the documentation of this file.
25 include_comments(_include_comments)
53 const std::string &sub_tree_id,
57 if(!sub_trees.empty())
60 for(
const irept &sub_tree : sub_trees)
65 parent[sub_tree_id]=sub_objects;
77 const std::string &sub_tree_id,
81 if(!sub_trees.empty())
84 for(
const auto &sub_tree : sub_trees)
88 sub_objects[
id2string(sub_tree.first)] = sub_object;
90 parent[sub_tree_id]=sub_objects;
102 "irep JSON representation must be an object");
110 const auto it = json_object.
find(
"id");
112 if(it != json_object.
end())
114 out.
id(it->second.value);
119 const auto it = json_object.
find(
"sub");
121 if(it != json_object.
end())
129 const auto it = json_object.
find(
"namedSub");
131 if(it != json_object.
end())
const irep_idt & get_function() const
static bool is_comment(const irep_namet &name)
Thrown when failing to deserialize a value from some low level format, like JSON or raw bytes.
iterator find(const std::string &key)
irept & add(const irep_namet &name)
const irep_idt & get_column() const
typename dt::named_subt named_subt
json_arrayt & to_json_array(jsont &json)
const irep_idt & get_line() const
const std::string & id2string(const irep_idt &d)
named_subt & get_named_sub()
const std::string & id_string() const
const irep_idt & id() const
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.
void convert_named_sub_tree(const std::string &sub_tree_id, const irept::named_subt &sub_trees, json_objectt &parent) const
To convert to JSON from a map of ireps that are in a named subtree.
void convert_sub_tree(const std::string &sub_tree_id, const irept::subt &sub_trees, json_objectt &parent) const
To convert to JSON from a list of ireps that are in an unlabelled subtree.
const irep_idt & get_java_bytecode_index() const
json_objectt & to_json_object(jsont &json)
json_irept(bool include_comments)
To convert to JSON from an irep structure by recursively generating JSON for the different sub trees.
json_objectt json(const source_locationt &location)
const irep_idt & get_file() const
There are a large number of kinds of tree structured or tree-like data in CPROVER.
const irep_idt & get_working_directory() const
jsont & push_back(const jsont &json)
irept convert_from_json(const jsont &) const
Deserialize a JSON irep representation.