@@ -52,18 +52,26 @@ class taint_instrumentation_propst
52
52
{
53
53
public:
54
54
datatype_infot (
55
+ const taint_datatype_idt &id,
56
+ const typet type,
55
57
const bool requires_subclass,
56
58
const bool is_primitive_type,
57
59
const std::set<taint_tokent::namet> &tokens)
58
- : requires_subclass(requires_subclass)
60
+ : id(id)
61
+ , type(type)
62
+ , requires_subclass(requires_subclass)
59
63
, is_primitive_type(is_primitive_type)
60
64
, tokens(tokens)
61
65
{}
66
+ const taint_datatype_idt &get_id () const { return id; }
67
+ typet get_type () const { return type; }
62
68
bool subclass_required () const { return requires_subclass; }
63
69
bool is_primitive () const { return is_primitive_type; }
64
70
const std::set<taint_tokent::namet> &get_tokens () const { return tokens; }
65
71
void add_token (const taint_tokent::namet &tname) { tokens.insert (tname); }
66
72
private:
73
+ taint_datatype_idt id;
74
+ typet type;
67
75
bool requires_subclass;
68
76
bool is_primitive_type;
69
77
std::set<taint_tokent::namet> tokens;
@@ -125,6 +133,8 @@ class taint_instrumentation_propst
125
133
from_typenames_to_tokennames_mapt datatypes;
126
134
};
127
135
136
+ typedef taint_instrumentation_propst::datatype_infot taint_datatype_infot;
137
+
128
138
/* ******************************************************************\
129
139
130
140
Function: taint_build_instrumentation_props
@@ -144,6 +154,12 @@ void taint_build_instrumentation_props(
144
154
const taint_programt &program,
145
155
std::vector<taint_instrumentation_propst> &output);
146
156
157
+ bool is_primitive_type (const typet type);
158
+ std::string parse_type_name (const typet &type, const namespacet &ns);
159
+ bool is_java_array_type_name (const std::string &datatype);
160
+ bool does_instrumentation_of_type_require_subclass (
161
+ const std::string &datatype, const typet &type);
162
+
147
163
void dump_as_json (const taint_instrumentation_propst &props, json_objectt &out);
148
164
149
165
#endif
0 commit comments