File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,14 @@ class string_builtin_functiont
40
40
41
41
exprt return_code;
42
42
43
+ // / Tells whether the builtin function can be a testing function, that is a
44
+ // / function that does not return a string, for instance like `equals`,
45
+ // / `indexOf` or `compare`.
46
+ virtual bool maybe_testing_function () const
47
+ {
48
+ return true ;
49
+ }
50
+
43
51
private:
44
52
string_builtin_functiont () = default ;
45
53
@@ -84,6 +92,11 @@ class string_transformation_builtin_functiont : public string_builtin_functiont
84
92
85
93
optionalt<exprt>
86
94
eval (const std::function<exprt(const exprt &)> &get_value) const override ;
95
+
96
+ bool maybe_testing_function () const override
97
+ {
98
+ return false ;
99
+ }
87
100
};
88
101
89
102
// / Adding a character at the end of a string
@@ -170,6 +183,11 @@ class string_insertion_builtin_functiont : public string_builtin_functiont
170
183
UNREACHABLE;
171
184
};
172
185
186
+ bool maybe_testing_function () const override
187
+ {
188
+ return false ;
189
+ }
190
+
173
191
protected:
174
192
explicit string_insertion_builtin_functiont (const exprt &return_code)
175
193
: string_builtin_functiont(return_code)
@@ -225,6 +243,11 @@ class string_creation_builtin_functiont : public string_builtin_functiont
225
243
{
226
244
return result;
227
245
}
246
+
247
+ bool maybe_testing_function () const override
248
+ {
249
+ return false ;
250
+ }
228
251
};
229
252
230
253
// / String test
You can’t perform that action at this time.
0 commit comments