@@ -34,14 +34,12 @@ void symex_target_equationt::shared_read(
34
34
unsigned atomic_section_id,
35
35
const sourcet &source)
36
36
{
37
- SSA_steps.push_back ( SSA_stept () );
37
+ SSA_steps.emplace_back (source, goto_trace_stept::typet::SHARED_READ );
38
38
SSA_stept &SSA_step=SSA_steps.back ();
39
39
40
40
SSA_step.guard =guard;
41
41
SSA_step.ssa_lhs =ssa_object;
42
- SSA_step.type =goto_trace_stept::typet::SHARED_READ;
43
42
SSA_step.atomic_section_id =atomic_section_id;
44
- SSA_step.source =source;
45
43
46
44
merge_ireps (SSA_step);
47
45
}
@@ -52,14 +50,12 @@ void symex_target_equationt::shared_write(
52
50
unsigned atomic_section_id,
53
51
const sourcet &source)
54
52
{
55
- SSA_steps.push_back ( SSA_stept () );
53
+ SSA_steps.emplace_back (source, goto_trace_stept::typet::SHARED_WRITE );
56
54
SSA_stept &SSA_step=SSA_steps.back ();
57
55
58
56
SSA_step.guard =guard;
59
57
SSA_step.ssa_lhs =ssa_object;
60
- SSA_step.type =goto_trace_stept::typet::SHARED_WRITE;
61
58
SSA_step.atomic_section_id =atomic_section_id;
62
- SSA_step.source =source;
63
59
64
60
merge_ireps (SSA_step);
65
61
}
@@ -69,11 +65,9 @@ void symex_target_equationt::spawn(
69
65
const exprt &guard,
70
66
const sourcet &source)
71
67
{
72
- SSA_steps.push_back ( SSA_stept () );
68
+ SSA_steps.emplace_back (source, goto_trace_stept::typet::SPAWN );
73
69
SSA_stept &SSA_step=SSA_steps.back ();
74
70
SSA_step.guard =guard;
75
- SSA_step.type =goto_trace_stept::typet::SPAWN;
76
- SSA_step.source =source;
77
71
78
72
merge_ireps (SSA_step);
79
73
}
@@ -82,11 +76,9 @@ void symex_target_equationt::memory_barrier(
82
76
const exprt &guard,
83
77
const sourcet &source)
84
78
{
85
- SSA_steps.push_back ( SSA_stept () );
79
+ SSA_steps.emplace_back (source, goto_trace_stept::typet::MEMORY_BARRIER );
86
80
SSA_stept &SSA_step=SSA_steps.back ();
87
81
SSA_step.guard =guard;
88
- SSA_step.type =goto_trace_stept::typet::MEMORY_BARRIER;
89
- SSA_step.source =source;
90
82
91
83
merge_ireps (SSA_step);
92
84
}
@@ -97,12 +89,10 @@ void symex_target_equationt::atomic_begin(
97
89
unsigned atomic_section_id,
98
90
const sourcet &source)
99
91
{
100
- SSA_steps.push_back ( SSA_stept () );
92
+ SSA_steps.emplace_back (source, goto_trace_stept::typet::ATOMIC_BEGIN );
101
93
SSA_stept &SSA_step=SSA_steps.back ();
102
94
SSA_step.guard =guard;
103
- SSA_step.type =goto_trace_stept::typet::ATOMIC_BEGIN;
104
95
SSA_step.atomic_section_id =atomic_section_id;
105
- SSA_step.source =source;
106
96
107
97
merge_ireps (SSA_step);
108
98
}
@@ -113,12 +103,10 @@ void symex_target_equationt::atomic_end(
113
103
unsigned atomic_section_id,
114
104
const sourcet &source)
115
105
{
116
- SSA_steps.push_back ( SSA_stept () );
106
+ SSA_steps.emplace_back (source, goto_trace_stept::typet::ATOMIC_END );
117
107
SSA_stept &SSA_step=SSA_steps.back ();
118
108
SSA_step.guard =guard;
119
- SSA_step.type =goto_trace_stept::typet::ATOMIC_END;
120
109
SSA_step.atomic_section_id =atomic_section_id;
121
- SSA_step.source =source;
122
110
123
111
merge_ireps (SSA_step);
124
112
}
@@ -134,7 +122,7 @@ void symex_target_equationt::assignment(
134
122
{
135
123
PRECONDITION (ssa_lhs.is_not_nil ());
136
124
137
- SSA_steps.push_back ( SSA_stept () );
125
+ SSA_steps.emplace_back (source, goto_trace_stept::typet::ASSIGNMENT );
138
126
SSA_stept &SSA_step=SSA_steps.back ();
139
127
140
128
SSA_step.guard =guard;
@@ -145,10 +133,8 @@ void symex_target_equationt::assignment(
145
133
SSA_step.assignment_type =assignment_type;
146
134
147
135
SSA_step.cond_expr =equal_exprt (SSA_step.ssa_lhs , SSA_step.ssa_rhs );
148
- SSA_step.type =goto_trace_stept::typet::ASSIGNMENT;
149
136
SSA_step.hidden =(assignment_type!=assignment_typet::STATE &&
150
137
assignment_type!=assignment_typet::VISIBLE_ACTUAL_PARAMETER);
151
- SSA_step.source =source;
152
138
153
139
merge_ireps (SSA_step);
154
140
}
@@ -161,15 +147,13 @@ void symex_target_equationt::decl(
161
147
{
162
148
PRECONDITION (ssa_lhs.is_not_nil ());
163
149
164
- SSA_steps.push_back ( SSA_stept () );
150
+ SSA_steps.emplace_back (source, goto_trace_stept::typet::DECL );
165
151
SSA_stept &SSA_step=SSA_steps.back ();
166
152
167
153
SSA_step.guard =guard;
168
154
SSA_step.ssa_lhs =ssa_lhs;
169
155
SSA_step.ssa_full_lhs =ssa_lhs;
170
156
SSA_step.original_full_lhs =ssa_lhs.get_original_expr ();
171
- SSA_step.type =goto_trace_stept::typet::DECL;
172
- SSA_step.source =source;
173
157
SSA_step.hidden =(assignment_type!=assignment_typet::STATE);
174
158
175
159
// the condition is trivially true, and only
@@ -192,12 +176,10 @@ void symex_target_equationt::location(
192
176
const exprt &guard,
193
177
const sourcet &source)
194
178
{
195
- SSA_steps.push_back ( SSA_stept () );
179
+ SSA_steps.emplace_back (source, goto_trace_stept::typet::LOCATION );
196
180
SSA_stept &SSA_step=SSA_steps.back ();
197
181
198
182
SSA_step.guard =guard;
199
- SSA_step.type =goto_trace_stept::typet::LOCATION;
200
- SSA_step.source =source;
201
183
202
184
merge_ireps (SSA_step);
203
185
}
@@ -209,12 +191,10 @@ void symex_target_equationt::function_call(
209
191
const sourcet &source,
210
192
const bool hidden)
211
193
{
212
- SSA_steps.push_back ( SSA_stept () );
194
+ SSA_steps.emplace_back (source, goto_trace_stept::typet::FUNCTION_CALL );
213
195
SSA_stept &SSA_step=SSA_steps.back ();
214
196
215
197
SSA_step.guard = guard;
216
- SSA_step.type = goto_trace_stept::typet::FUNCTION_CALL;
217
- SSA_step.source = source;
218
198
SSA_step.called_function = function_identifier;
219
199
SSA_step.ssa_function_arguments = ssa_function_arguments;
220
200
SSA_step.hidden = hidden;
@@ -227,12 +207,10 @@ void symex_target_equationt::function_return(
227
207
const sourcet &source,
228
208
const bool hidden)
229
209
{
230
- SSA_steps.push_back ( SSA_stept () );
210
+ SSA_steps.emplace_back (source, goto_trace_stept::typet::FUNCTION_RETURN );
231
211
SSA_stept &SSA_step=SSA_steps.back ();
232
212
233
213
SSA_step.guard = guard;
234
- SSA_step.type = goto_trace_stept::typet::FUNCTION_RETURN;
235
- SSA_step.source = source;
236
214
SSA_step.hidden = hidden;
237
215
238
216
merge_ireps (SSA_step);
@@ -244,12 +222,10 @@ void symex_target_equationt::output(
244
222
const irep_idt &output_id,
245
223
const std::list<exprt> &args)
246
224
{
247
- SSA_steps.push_back ( SSA_stept () );
225
+ SSA_steps.emplace_back (source, goto_trace_stept::typet::OUTPUT );
248
226
SSA_stept &SSA_step=SSA_steps.back ();
249
227
250
228
SSA_step.guard =guard;
251
- SSA_step.type =goto_trace_stept::typet::OUTPUT;
252
- SSA_step.source =source;
253
229
SSA_step.io_args =args;
254
230
SSA_step.io_id =output_id;
255
231
@@ -263,12 +239,10 @@ void symex_target_equationt::output_fmt(
263
239
const irep_idt &fmt,
264
240
const std::list<exprt> &args)
265
241
{
266
- SSA_steps.push_back ( SSA_stept () );
242
+ SSA_steps.emplace_back (source, goto_trace_stept::typet::OUTPUT );
267
243
SSA_stept &SSA_step=SSA_steps.back ();
268
244
269
245
SSA_step.guard =guard;
270
- SSA_step.type =goto_trace_stept::typet::OUTPUT;
271
- SSA_step.source =source;
272
246
SSA_step.io_args =args;
273
247
SSA_step.io_id =output_id;
274
248
SSA_step.formatted =true ;
@@ -283,12 +257,10 @@ void symex_target_equationt::input(
283
257
const irep_idt &input_id,
284
258
const std::list<exprt> &args)
285
259
{
286
- SSA_steps.push_back ( SSA_stept () );
260
+ SSA_steps.emplace_back (source, goto_trace_stept::typet::INPUT );
287
261
SSA_stept &SSA_step=SSA_steps.back ();
288
262
289
263
SSA_step.guard =guard;
290
- SSA_step.type =goto_trace_stept::typet::INPUT;
291
- SSA_step.source =source;
292
264
SSA_step.io_args =args;
293
265
SSA_step.io_id =input_id;
294
266
@@ -300,13 +272,11 @@ void symex_target_equationt::assumption(
300
272
const exprt &cond,
301
273
const sourcet &source)
302
274
{
303
- SSA_steps.push_back ( SSA_stept () );
275
+ SSA_steps.emplace_back (source, goto_trace_stept::typet::ASSUME );
304
276
SSA_stept &SSA_step=SSA_steps.back ();
305
277
306
278
SSA_step.guard =guard;
307
279
SSA_step.cond_expr =cond;
308
- SSA_step.type =goto_trace_stept::typet::ASSUME;
309
- SSA_step.source =source;
310
280
311
281
merge_ireps (SSA_step);
312
282
}
@@ -317,13 +287,11 @@ void symex_target_equationt::assertion(
317
287
const std::string &msg,
318
288
const sourcet &source)
319
289
{
320
- SSA_steps.push_back ( SSA_stept () );
290
+ SSA_steps.emplace_back (source, goto_trace_stept::typet::ASSERT );
321
291
SSA_stept &SSA_step=SSA_steps.back ();
322
292
323
293
SSA_step.guard =guard;
324
294
SSA_step.cond_expr =cond;
325
- SSA_step.type =goto_trace_stept::typet::ASSERT;
326
- SSA_step.source =source;
327
295
SSA_step.comment =msg;
328
296
329
297
merge_ireps (SSA_step);
@@ -334,13 +302,11 @@ void symex_target_equationt::goto_instruction(
334
302
const exprt &cond,
335
303
const sourcet &source)
336
304
{
337
- SSA_steps.push_back ( SSA_stept () );
305
+ SSA_steps.emplace_back (source, goto_trace_stept::typet::GOTO );
338
306
SSA_stept &SSA_step=SSA_steps.back ();
339
307
340
308
SSA_step.guard =guard;
341
309
SSA_step.cond_expr =cond;
342
- SSA_step.type =goto_trace_stept::typet::GOTO;
343
- SSA_step.source =source;
344
310
345
311
merge_ireps (SSA_step);
346
312
}
@@ -351,13 +317,11 @@ void symex_target_equationt::constraint(
351
317
const sourcet &source)
352
318
{
353
319
// like assumption, but with global effect
354
- SSA_steps.push_back ( SSA_stept () );
320
+ SSA_steps.emplace_back (source, goto_trace_stept::typet::CONSTRAINT );
355
321
SSA_stept &SSA_step=SSA_steps.back ();
356
322
357
323
SSA_step.guard =true_exprt ();
358
324
SSA_step.cond_expr =cond;
359
- SSA_step.type =goto_trace_stept::typet::CONSTRAINT;
360
- SSA_step.source =source;
361
325
SSA_step.comment =msg;
362
326
363
327
merge_ireps (SSA_step);
0 commit comments