cprover
Toggle main menu visibility
Loading...
Searching...
No Matches
json_irep.h
Go to the documentation of this file.
1
/*******************************************************************\
2
3
Module: Util
4
5
Author: Thomas Kiley, thomas.kiley@diffblue.com
6
7
\*******************************************************************/
8
11
12
#ifndef CPROVER_UTIL_JSON_IREP_H
13
#define CPROVER_UTIL_JSON_IREP_H
14
15
#include "
irep.h
"
16
#include "
json.h
"
17
18
class
source_locationt
;
19
20
class
json_irept
21
{
22
public
:
23
explicit
json_irept
(
bool
include_comments
);
24
json_objectt
convert_from_irep
(
const
irept
&)
const
;
25
irept
convert_from_json
(
const
jsont
&)
const
;
26
27
private
:
28
void
convert_sub_tree
(
29
const
std::string &sub_tree_id,
30
const
irept::subt
&sub_trees,
31
json_objectt
&parent)
const
;
32
33
void
convert_named_sub_tree
(
34
const
std::string &sub_tree_id,
35
const
irept::named_subt
&sub_trees,
36
json_objectt
&parent)
const
;
37
38
bool
include_comments
;
39
};
40
41
json_objectt
json
(
const
source_locationt
&);
42
43
#endif
// CPROVER_UTIL_JSON_IREP_H
irept
There are a large number of kinds of tree structured or tree-like data in CPROVER.
Definition
irep.h:364
json_irept::json_irept
json_irept(bool include_comments)
To convert to JSON from an irep structure by recursively generating JSON for the different sub trees.
Definition
json_irep.cpp:22
json_irept::include_comments
bool include_comments
Definition
json_irep.h:38
json_irept::convert_from_json
irept convert_from_json(const jsont &) const
Deserialize a JSON irep representation.
Definition
json_irep.cpp:95
json_irept::convert_from_irep
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.
Definition
json_irep.cpp:31
json_irept::convert_sub_tree
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.
Definition
json_irep.cpp:50
json_irept::convert_named_sub_tree
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.
Definition
json_irep.cpp:74
json_objectt
Definition
json.h:298
jsont
Definition
json.h:27
sharing_treet< irept, forward_list_as_mapt< irep_idt, irept > >::named_subt
typename dt::named_subt named_subt
Definition
irep.h:153
sharing_treet< irept, forward_list_as_mapt< irep_idt, irept > >::subt
typename dt::subt subt
Definition
irep.h:152
source_locationt
Definition
source_location.h:20
irep.h
json.h
json
json_objectt json(const source_locationt &)
Definition
json_irep.cpp:139
util
json_irep.h
Generated by
1.17.0