@@ -96,21 +96,21 @@ class ai_baset
96
96
// / use \ref get_state or \ref find_state to access the actual underlying
97
97
// / state.
98
98
// / PRECONDITION(l is dereferenceable)
99
- // / \param l: The location we want the domain before
100
- // / \return The domain before `l`. We return a pointer to a copy as the method
101
- // / should be const and there are some non-trivial cases including merging
102
- // / domains , etc.
99
+ // / \param l: The location before which we want the abstract state
100
+ // / \return The abstract state before `l`. We return a pointer to a copy as
101
+ // / the method should be const and there are some non-trivial cases
102
+ // / including merging abstract states , etc.
103
103
virtual std::unique_ptr<statet> abstract_state_before (locationt l) const = 0;
104
104
105
105
// / Get a copy of the abstract state after the given instruction, without
106
106
// / needing to know what kind of domain or history is used. Note: intended
107
107
// / for users of the abstract interpreter; derived classes should
108
108
// / use \ref get_state or \ref find_state to access the actual underlying
109
109
// / state.
110
- // / \param l: The location we want the domain after
111
- // / \return The domain after `l`. We return a pointer to a copy as the method
112
- // / should be const and there are some non-trivial cases including merging
113
- // / domains , etc.
110
+ // / \param l: The location before which we want the abstract state
111
+ // / \return The abstract state after `l`. We return a pointer to a copy as
112
+ // / the method should be const and there are some non-trivial cases
113
+ // / including merging abstract states , etc.
114
114
virtual std::unique_ptr<statet> abstract_state_after (locationt l) const
115
115
{
116
116
// / PRECONDITION(l is dereferenceable && std::next(l) is dereferenceable)
@@ -119,18 +119,18 @@ class ai_baset
119
119
return abstract_state_before (std::next (l));
120
120
}
121
121
122
- // / Reset the domain
122
+ // / Reset the abstract state
123
123
virtual void clear ()
124
124
{
125
125
}
126
126
127
- // / Output the domains for a whole program
127
+ // / Output the abstract states for a whole program
128
128
virtual void output (
129
129
const namespacet &ns,
130
130
const goto_functionst &goto_functions,
131
131
std::ostream &out) const ;
132
132
133
- // / Output the domains for a whole program
133
+ // / Output the abstract states for a whole program
134
134
void output (
135
135
const goto_modelt &goto_model,
136
136
std::ostream &out) const
@@ -139,7 +139,7 @@ class ai_baset
139
139
output (ns, goto_model.goto_functions , out);
140
140
}
141
141
142
- // / Output the domains for a function
142
+ // / Output the abstract states for a function
143
143
void output (
144
144
const namespacet &ns,
145
145
const goto_programt &goto_program,
@@ -148,7 +148,7 @@ class ai_baset
148
148
output (ns, goto_program, " " , out);
149
149
}
150
150
151
- // / Output the domains for a function
151
+ // / Output the abstract states for a function
152
152
void output (
153
153
const namespacet &ns,
154
154
const goto_functionst::goto_functiont &goto_function,
@@ -157,57 +157,57 @@ class ai_baset
157
157
output (ns, goto_function.body , " " , out);
158
158
}
159
159
160
- // / Output the domains for the whole program as JSON
160
+ // / Output the abstract states for the whole program as JSON
161
161
virtual jsont output_json (
162
162
const namespacet &ns,
163
163
const goto_functionst &goto_functions) const ;
164
164
165
- // / Output the domains for a whole program as JSON
165
+ // / Output the abstract states for a whole program as JSON
166
166
jsont output_json (
167
167
const goto_modelt &goto_model) const
168
168
{
169
169
const namespacet ns (goto_model.symbol_table );
170
170
return output_json (ns, goto_model.goto_functions );
171
171
}
172
172
173
- // / Output the domains for a single function as JSON
173
+ // / Output the abstract states for a single function as JSON
174
174
jsont output_json (
175
175
const namespacet &ns,
176
176
const goto_programt &goto_program) const
177
177
{
178
178
return output_json (ns, goto_program, " " );
179
179
}
180
180
181
- // / Output the domains for a single function as JSON
181
+ // / Output the abstract states for a single function as JSON
182
182
jsont output_json (
183
183
const namespacet &ns,
184
184
const goto_functionst::goto_functiont &goto_function) const
185
185
{
186
186
return output_json (ns, goto_function.body , " " );
187
187
}
188
188
189
- // / Output the domains for the whole program as XML
189
+ // / Output the abstract states for the whole program as XML
190
190
virtual xmlt output_xml (
191
191
const namespacet &ns,
192
192
const goto_functionst &goto_functions) const ;
193
193
194
- // / Output the domains for the whole program as XML
194
+ // / Output the abstract states for the whole program as XML
195
195
xmlt output_xml (
196
196
const goto_modelt &goto_model) const
197
197
{
198
198
const namespacet ns (goto_model.symbol_table );
199
199
return output_xml (ns, goto_model.goto_functions );
200
200
}
201
201
202
- // / Output the domains for a single function as XML
202
+ // / Output the abstract states for a single function as XML
203
203
xmlt output_xml (
204
204
const namespacet &ns,
205
205
const goto_programt &goto_program) const
206
206
{
207
207
return output_xml (ns, goto_program, " " );
208
208
}
209
209
210
- // / Output the domains for a single function as XML
210
+ // / Output the abstract states for a single function as XML
211
211
xmlt output_xml (
212
212
const namespacet &ns,
213
213
const goto_functionst::goto_functiont &goto_function) const
@@ -216,30 +216,33 @@ class ai_baset
216
216
}
217
217
218
218
protected:
219
- // / Initialize all the domains for a single function. Override this to do
220
- // / custom per-domain initialization.
219
+ // / Initialize all the abstract states for a single function. Override this to
220
+ // / do custom per-domain initialization.
221
221
virtual void initialize (const goto_programt &goto_program);
222
222
223
- // / Initialize all the domains for a single function.
223
+ // / Initialize all the abstract states for a single function.
224
224
virtual void initialize (const goto_functionst::goto_functiont &goto_function);
225
225
226
- // / Initialize all the domains for a whole program. Override this to do custom
227
- // / per-analysis initialization.
226
+ // / Initialize all the abstract states for a whole program. Override this to
227
+ // / do custom per-analysis initialization.
228
228
virtual void initialize (const goto_functionst &goto_functions);
229
229
230
- // / Override this to add a cleanup step after fixedpoint has run
230
+ // / Override this to add a cleanup or post-processing step after fixedpoint
231
+ // / has run
231
232
virtual void finalize ();
232
233
233
- // / Ensure the entry point to a single function has a reasonable state
234
- void entry_state (const goto_programt &goto_functions);
234
+ // / Set the abstract state of the entry location of a single function to the
235
+ // / entry state required by the analysis
236
+ void entry_state (const goto_programt &goto_program);
235
237
236
- // / Ensure the entry point to a whole program has a reasonable state
237
- void entry_state (const goto_functionst &goto_program);
238
+ // / Set the abstract state of the entry location of a whole program to the
239
+ // / entry state required by the analysis
240
+ void entry_state (const goto_functionst &goto_functions);
238
241
239
- // / Output the domains for a single function
242
+ // / Output the abstract states for a single function
240
243
// / \param ns: The namespace
241
244
// / \param goto_program: The goto program
242
- // / \param identifier: the identifier used to find a symbol to identify the
245
+ // / \param identifier: The identifier used to find a symbol to identify the
243
246
// / source language
244
247
// / \param out: The ostream to direct output to
245
248
virtual void output (
@@ -248,21 +251,21 @@ class ai_baset
248
251
const irep_idt &identifier,
249
252
std::ostream &out) const ;
250
253
251
- // / Output the domains for a single function as JSON
254
+ // / Output the abstract states for a single function as JSON
252
255
// / \param ns: The namespace
253
256
// / \param goto_program: The goto program
254
- // / \param identifier: the identifier used to find a symbol to identify the
257
+ // / \param identifier: The identifier used to find a symbol to identify the
255
258
// / source language
256
259
// / \return The JSON object
257
260
virtual jsont output_json (
258
261
const namespacet &ns,
259
262
const goto_programt &goto_program,
260
263
const irep_idt &identifier) const ;
261
264
262
- // / Output the domains for a single function as XML
265
+ // / Output the abstract states for a single function as XML
263
266
// / \param ns: The namespace
264
267
// / \param goto_program: The goto program
265
- // / \param identifier: the identifier used to find a symbol to identify the
268
+ // / \param identifier: The identifier used to find a symbol to identify the
266
269
// / source language
267
270
// / \return The XML object
268
271
virtual xmlt output_xml (
0 commit comments