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
4040
4141 exprt return_code;
4242
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+
4351private:
4452 string_builtin_functiont () = default ;
4553
@@ -84,6 +92,11 @@ class string_transformation_builtin_functiont : public string_builtin_functiont
8492
8593 optionalt<exprt>
8694 eval (const std::function<exprt(const exprt &)> &get_value) const override ;
95+
96+ bool maybe_testing_function () const override
97+ {
98+ return false ;
99+ }
87100};
88101
89102// / Adding a character at the end of a string
@@ -170,6 +183,11 @@ class string_insertion_builtin_functiont : public string_builtin_functiont
170183 UNREACHABLE;
171184 };
172185
186+ bool maybe_testing_function () const override
187+ {
188+ return false ;
189+ }
190+
173191protected:
174192 explicit string_insertion_builtin_functiont (const exprt &return_code)
175193 : string_builtin_functiont(return_code)
@@ -225,6 +243,11 @@ class string_creation_builtin_functiont : public string_builtin_functiont
225243 {
226244 return result;
227245 }
246+
247+ bool maybe_testing_function () const override
248+ {
249+ return false ;
250+ }
228251};
229252
230253// / String test
You can’t perform that action at this time.
0 commit comments