@@ -111,46 +111,7 @@ class goto_functionst
111
111
// /
112
112
// / The validation mode indicates whether well-formedness check failures are
113
113
// / reported via DATA_INVARIANT violations or exceptions.
114
- void validate (const namespacet &ns, const validation_modet vm) const
115
- {
116
- for (const auto &entry : function_map)
117
- {
118
- const goto_functiont &goto_function = entry.second ;
119
- const auto &function_name = entry.first ;
120
- const symbolt &function_symbol = ns.lookup (function_name);
121
- const code_typet::parameterst ¶meters =
122
- to_code_type (function_symbol.type ).parameters ();
123
-
124
- DATA_CHECK (
125
- vm,
126
- goto_function.type == ns.lookup (function_name).type ,
127
- id2string (function_name) + " type inconsistency\n goto program type: " +
128
- goto_function.type .id_string () +
129
- " \n symbol table type: " + ns.lookup (function_name).type .id_string ());
130
-
131
- DATA_CHECK (
132
- vm,
133
- goto_function.parameter_identifiers .size () == parameters.size (),
134
- id2string (function_name) + " parameter count inconsistency\n " +
135
- " goto program: " +
136
- std::to_string (goto_function.parameter_identifiers .size ()) +
137
- " \n symbol table: " + std::to_string (parameters.size ()));
138
-
139
- auto it = goto_function.parameter_identifiers .begin ();
140
- for (const auto ¶meter : parameters)
141
- {
142
- DATA_CHECK (
143
- vm,
144
- it->empty () || ns.lookup (*it).type == parameter.type (),
145
- id2string (function_name) + " parameter type inconsistency\n " +
146
- " goto program: " + ns.lookup (*it).type .id_string () +
147
- " \n symbol table: " + parameter.type ().id_string ());
148
- ++it;
149
- }
150
-
151
- goto_function.validate (ns, vm);
152
- }
153
- }
114
+ void validate (const namespacet &, validation_modet) const ;
154
115
};
155
116
156
117
#define Forall_goto_functions (it, functions ) \
0 commit comments