File tree 9 files changed +142
-79
lines changed
9 files changed +142
-79
lines changed Original file line number Diff line number Diff line change @@ -538,18 +538,24 @@ void custom_bitvector_domaint::transform(
538
538
539
539
case CATCH:
540
540
case THROW:
541
+ DATA_INVARIANT (false , " Exceptions must be removed before analysis" );
542
+ break ;
541
543
case RETURN:
542
- case ATOMIC_BEGIN:
543
- case ATOMIC_END:
544
- case END_FUNCTION:
545
- case LOCATION:
546
- case START_THREAD:
547
- case END_THREAD:
548
- case SKIP:
549
- case ASSERT:
550
- case ASSUME:
544
+ DATA_INVARIANT (false , " Returns must be removed before analysis" );
545
+ break ;
546
+ case ATOMIC_BEGIN: // Ignoring is a valid over-approximation
547
+ case ATOMIC_END: // Ignoring is a valid over-approximation
548
+ case END_FUNCTION: // No action required
549
+ case LOCATION: // No action required
550
+ case START_THREAD: // Require a concurrent analysis at higher level
551
+ case END_THREAD: // Require a concurrent analysis at higher level
552
+ case SKIP: // No action required
553
+ case ASSERT: // No action required
554
+ case ASSUME: // Ignoring is a valid over-approximation
555
+ break ;
551
556
case INCOMPLETE_GOTO:
552
557
case NO_INSTRUCTION_TYPE:
558
+ DATA_INVARIANT (false , " Only complete instructions can be analyzed" );
553
559
break ;
554
560
}
555
561
}
Original file line number Diff line number Diff line change @@ -253,21 +253,30 @@ void escape_domaint::transform(
253
253
// This is the edge to the call site.
254
254
break ;
255
255
256
- case GOTO:
256
+ case GOTO: // Ignoring the guard is a valid over-approximation
257
+ break ;
257
258
case CATCH:
258
259
case THROW:
260
+ DATA_INVARIANT (false , " Exceptions must be removed before analysis" );
261
+ break ;
259
262
case RETURN:
260
- case ATOMIC_BEGIN:
261
- case ATOMIC_END:
262
- case LOCATION:
263
- case START_THREAD:
264
- case END_THREAD:
265
- case ASSERT:
266
- case ASSUME:
267
- case SKIP:
263
+ DATA_INVARIANT (false , " Returns must be removed before analysis" );
264
+ break ;
265
+ case ATOMIC_BEGIN: // Ignoring is a valid over-approximation
266
+ case ATOMIC_END: // Ignoring is a valid over-approximation
267
+ case LOCATION: // No action required
268
+ case START_THREAD: // Require a concurrent analysis at higher level
269
+ case END_THREAD: // Require a concurrent analysis at higher level
270
+ case ASSERT: // No action required
271
+ case ASSUME: // Ignoring is a valid over-approximation
272
+ case SKIP: // No action required
273
+ break ;
268
274
case OTHER:
275
+ DATA_INVARIANT (false , " Unclear what is a safe over-approximation of OTHER" );
276
+ break ;
269
277
case INCOMPLETE_GOTO:
270
278
case NO_INSTRUCTION_TYPE:
279
+ DATA_INVARIANT (false , " Only complete instructions can be analyzed" );
271
280
break ;
272
281
}
273
282
}
Original file line number Diff line number Diff line change @@ -129,23 +129,32 @@ void global_may_alias_domaint::transform(
129
129
break ;
130
130
}
131
131
132
- case FUNCTION_CALL:
133
- case GOTO:
132
+ case FUNCTION_CALL: // Probably safe
133
+ case GOTO: // Ignoring the guard is a valid over-approximation
134
+ break ;
134
135
case CATCH:
135
136
case THROW:
137
+ DATA_INVARIANT (false , " Exceptions must be removed before analysis" );
138
+ break ;
136
139
case RETURN:
137
- case ATOMIC_BEGIN:
138
- case ATOMIC_END:
139
- case LOCATION:
140
- case START_THREAD:
141
- case END_THREAD:
142
- case ASSERT:
143
- case ASSUME:
144
- case SKIP:
145
- case END_FUNCTION:
140
+ DATA_INVARIANT (false , " Returns must be removed before analysis" );
141
+ break ;
142
+ case ATOMIC_BEGIN: // Ignoring is a valid over-approximation
143
+ case ATOMIC_END: // Ignoring is a valid over-approximation
144
+ case LOCATION: // No action required
145
+ case START_THREAD: // Require a concurrent analysis at higher level
146
+ case END_THREAD: // Require a concurrent analysis at higher level
147
+ case ASSERT: // No action required
148
+ case ASSUME: // Ignoring is a valid over-approximation
149
+ case SKIP: // No action required
150
+ case END_FUNCTION: // No action required
151
+ break ;
146
152
case OTHER:
153
+ DATA_INVARIANT (false , " Unclear what is a safe over-approximation of OTHER" );
154
+ break ;
147
155
case INCOMPLETE_GOTO:
148
156
case NO_INSTRUCTION_TYPE:
157
+ DATA_INVARIANT (false , " Only complete instructions can be analyzed" );
149
158
break ;
150
159
}
151
160
}
Original file line number Diff line number Diff line change @@ -110,18 +110,26 @@ void interval_domaint::transform(
110
110
111
111
case CATCH:
112
112
case THROW:
113
+ DATA_INVARIANT (false , " Exceptions must be removed before analysis" );
114
+ break ;
113
115
case RETURN:
114
- case ATOMIC_BEGIN:
115
- case ATOMIC_END:
116
- case END_FUNCTION:
117
- case START_THREAD:
118
- case END_THREAD:
119
- case ASSERT:
120
- case LOCATION:
121
- case SKIP:
116
+ DATA_INVARIANT (false , " Returns must be removed before analysis" );
117
+ break ;
118
+ case ATOMIC_BEGIN: // Ignoring is a valid over-approximation
119
+ case ATOMIC_END: // Ignoring is a valid over-approximation
120
+ case END_FUNCTION: // No action required
121
+ case START_THREAD: // Require a concurrent analysis at higher level
122
+ case END_THREAD: // Require a concurrent analysis at higher level
123
+ case ASSERT: // No action required
124
+ case LOCATION: // No action required
125
+ case SKIP: // No action required
126
+ break ;
122
127
case OTHER:
128
+ DATA_INVARIANT (false , " Unclear what is a safe over-approximation of OTHER" );
129
+ break ;
123
130
case INCOMPLETE_GOTO:
124
131
case NO_INSTRUCTION_TYPE:
132
+ DATA_INVARIANT (false , " Only complete instructions can be analyzed" );
125
133
break ;
126
134
}
127
135
}
Original file line number Diff line number Diff line change @@ -77,16 +77,19 @@ void invariant_set_domaint::transform(
77
77
78
78
case CATCH:
79
79
case THROW:
80
- case DEAD:
81
- case ATOMIC_BEGIN:
82
- case ATOMIC_END:
83
- case END_FUNCTION:
84
- case LOCATION:
85
- case END_THREAD:
86
- case SKIP:
80
+ DATA_INVARIANT (false , " Exceptions must be removed before analysis" );
81
+ break ;
82
+ case DEAD: // No action required
83
+ case ATOMIC_BEGIN: // Ignoring is a valid over-approximation
84
+ case ATOMIC_END: // Ignoring is a valid over-approximation
85
+ case END_FUNCTION: // No action required
86
+ case LOCATION: // No action required
87
+ case END_THREAD: // Require a concurrent analysis at higher level
88
+ case SKIP: // No action required
89
+ break ;
87
90
case INCOMPLETE_GOTO:
88
91
case NO_INSTRUCTION_TYPE:
89
- // do nothing
92
+ DATA_INVARIANT ( false , " Only complete instructions can be analyzed " );
90
93
break ;
91
94
}
92
95
}
Original file line number Diff line number Diff line change @@ -310,20 +310,29 @@ void local_bitvector_analysist::build()
310
310
311
311
case CATCH:
312
312
case THROW:
313
+ DATA_INVARIANT (false , " Exceptions must be removed before analysis" );
314
+ break ;
313
315
case RETURN:
314
- case ATOMIC_BEGIN:
315
- case ATOMIC_END:
316
- case LOCATION:
317
- case START_THREAD:
318
- case END_THREAD:
319
- case SKIP:
316
+ DATA_INVARIANT (false , " Returns must be removed before analysis" );
317
+ break ;
318
+ case ATOMIC_BEGIN: // Ignoring is a valid over-approximation
319
+ case ATOMIC_END: // Ignoring is a valid over-approximation
320
+ case LOCATION: // No action required
321
+ case START_THREAD: // Require a concurrent analysis at higher level
322
+ case END_THREAD: // Require a concurrent analysis at higher level
323
+ case SKIP: // No action required
324
+ case ASSERT: // No action required
325
+ case ASSUME: // Ignoring is a valid over-approximation
326
+ case GOTO: // Ignoring the guard is a valid over-approximation
327
+ case END_FUNCTION: // No action required
328
+ break ;
320
329
case OTHER:
321
- case ASSERT:
322
- case ASSUME:
323
- case GOTO:
324
- case END_FUNCTION:
330
+ DATA_INVARIANT (
331
+ false , " Unclear what is a safe over-approximation of OTHER" );
332
+ break ;
325
333
case INCOMPLETE_GOTO:
326
334
case NO_INSTRUCTION_TYPE:
335
+ DATA_INVARIANT (false , " Only complete instructions can be analyzed" );
327
336
break ;
328
337
}
329
338
Original file line number Diff line number Diff line change @@ -86,9 +86,12 @@ void local_cfgt::build(const goto_programt &goto_program)
86
86
case DECL:
87
87
case DEAD:
88
88
case ASSIGN:
89
+ node.successors .push_back (loc_nr + 1 );
90
+ break ;
91
+
89
92
case INCOMPLETE_GOTO:
90
93
case NO_INSTRUCTION_TYPE:
91
- node. successors . push_back (loc_nr+ 1 );
94
+ DATA_INVARIANT ( false , " Only complete instructions can be analyzed " );
92
95
break ;
93
96
}
94
97
}
Original file line number Diff line number Diff line change @@ -419,20 +419,29 @@ void local_may_aliast::build(const goto_functiont &goto_function)
419
419
420
420
case CATCH:
421
421
case THROW:
422
+ DATA_INVARIANT (false , " Exceptions must be removed before analysis" );
423
+ break ;
422
424
case RETURN:
423
- case GOTO:
424
- case START_THREAD:
425
- case END_THREAD:
426
- case ATOMIC_BEGIN:
427
- case ATOMIC_END:
428
- case LOCATION:
429
- case SKIP:
430
- case END_FUNCTION:
425
+ DATA_INVARIANT (false , " Returns must be removed before analysis" );
426
+ break ;
427
+ case GOTO: // Ignoring the guard is a valid over-approximation
428
+ case START_THREAD: // Require a concurrent analysis at higher level
429
+ case END_THREAD: // Require a concurrent analysis at higher level
430
+ case ATOMIC_BEGIN: // Ignoring is a valid over-approximation
431
+ case ATOMIC_END: // Ignoring is a valid over-approximation
432
+ case LOCATION: // No action required
433
+ case SKIP: // No action required
434
+ case END_FUNCTION: // No action required
435
+ case ASSERT: // No action required
436
+ case ASSUME: // Ignoring is a valid over-approximation
437
+ break ;
431
438
case OTHER:
432
- case ASSERT:
433
- case ASSUME:
439
+ DATA_INVARIANT (
440
+ false , " Unclear what is a safe over-approximation of OTHER" );
441
+ break ;
434
442
case INCOMPLETE_GOTO:
435
443
case NO_INSTRUCTION_TYPE:
444
+ DATA_INVARIANT (false , " Only complete instructions can be analyzed" );
436
445
break ;
437
446
}
438
447
Original file line number Diff line number Diff line change @@ -125,23 +125,30 @@ void uncaught_exceptions_domaint::transform(
125
125
join (uea.exceptions_map [function_name]);
126
126
break ;
127
127
}
128
- case DECL:
129
- case DEAD:
130
- case ASSIGN:
128
+ case DECL: // Safe to ignore in this context
129
+ case DEAD: // Safe to ignore in this context
130
+ case ASSIGN: // Safe to ignore in this context
131
+ break ;
131
132
case RETURN:
132
- case GOTO:
133
- case ATOMIC_BEGIN:
134
- case ATOMIC_END:
135
- case START_THREAD:
136
- case END_THREAD:
137
- case END_FUNCTION:
138
- case ASSERT:
139
- case ASSUME:
140
- case LOCATION:
141
- case SKIP:
133
+ DATA_INVARIANT (false , " Returns must be removed before analysis" );
134
+ break ;
135
+ case GOTO: // Ignoring the guard is a valid over-approximation
136
+ case ATOMIC_BEGIN: // Ignoring is a valid over-approximation
137
+ case ATOMIC_END: // Ignoring is a valid over-approximation
138
+ case START_THREAD: // Require a concurrent analysis at higher level
139
+ case END_THREAD: // Require a concurrent analysis at higher level
140
+ case END_FUNCTION: // No action required
141
+ case ASSERT: // No action required
142
+ case ASSUME: // Ignoring is a valid over-approximation
143
+ case LOCATION: // No action required
144
+ case SKIP: // No action required
145
+ break ;
142
146
case OTHER:
147
+ DATA_INVARIANT (false , " Unclear what is a safe over-approximation of OTHER" );
148
+ break ;
143
149
case INCOMPLETE_GOTO:
144
150
case NO_INSTRUCTION_TYPE:
151
+ DATA_INVARIANT (false , " Only complete instructions can be analyzed" );
145
152
break ;
146
153
}
147
154
}
You can’t perform that action at this time.
0 commit comments