File tree Expand file tree Collapse file tree 3 files changed +28
-1
lines changed Expand file tree Collapse file tree 3 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,12 @@ class abstract_goto_modelt
49
49
// / underneath them, so this should only be used to lend a reference to code
50
50
// / that cannot also call get_goto_function.
51
51
virtual const symbol_tablet &get_symbol_table () const = 0;
52
+
53
+ // / Check that the goto model is well-formed
54
+ // /
55
+ // / The validation mode indicates whether well-formedness check failures are
56
+ // / reported via DATA_INVARIANT violations or exceptions.
57
+ virtual void validate (const validation_modet vm) const = 0;
52
58
};
53
59
54
60
#endif
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ class goto_modelt : public abstract_goto_modelt
94
94
// /
95
95
// / The validation mode indicates whether well-formedness check failures are
96
96
// / reported via DATA_INVARIANT violations or exceptions.
97
- void validate (const validation_modet vm) const
97
+ void validate (const validation_modet vm) const override
98
98
{
99
99
symbol_table.validate (vm);
100
100
@@ -138,6 +138,18 @@ class wrapper_goto_modelt : public abstract_goto_modelt
138
138
goto_functions.function_map .end ();
139
139
}
140
140
141
+ // / Check that the goto model is well-formed
142
+ // /
143
+ // / The validation mode indicates whether well-formedness check failures are
144
+ // / reported via DATA_INVARIANT violations or exceptions.
145
+ void validate (const validation_modet vm) const override
146
+ {
147
+ symbol_table.validate (vm);
148
+
149
+ const namespacet ns (symbol_table);
150
+ goto_functions.validate (ns, vm);
151
+ }
152
+
141
153
private:
142
154
const symbol_tablet &symbol_table;
143
155
const goto_functionst &goto_functions;
Original file line number Diff line number Diff line change @@ -243,6 +243,15 @@ class lazy_goto_modelt : public abstract_goto_modelt
243
243
return goto_functions.at (id);
244
244
}
245
245
246
+ // / Check that the goto model is well-formed
247
+ // /
248
+ // / The validation mode indicates whether well-formedness check failures are
249
+ // / reported via DATA_INVARIANT violations or exceptions.
250
+ void validate (const validation_modet vm) const override
251
+ {
252
+ goto_model->validate (vm);
253
+ }
254
+
246
255
private:
247
256
std::unique_ptr<goto_modelt> goto_model;
248
257
You can’t perform that action at this time.
0 commit comments