Commit 8ff8927
committed
Simplify and apply field sensitivity before value-set-deref
This means that any member-of-symbol constructs introduced by a nested dereference,
such as x->y ==> (x == &o1 ? o1 : o2).y, can be simplified to produce e.g.
(x == &o1 ? o1.y : o2.y) ==> (x == &o1 ? o1..y : o2..y). value_set_dereferencet will
then special-case the if-expression, dereferencing the inner o1..y and o2..y individually.
In the best case where each has a single possible alias, &o3 and &o4 respectively, we
end up with (x == &o1 ? &o3 : &o4), rather than the current result:
let p = (x == &o1 ? o1 : o2).y in (p == &o3 ? o3 : o4)1 parent 91ccdfb commit 8ff8927
File tree
2 files changed
+22
-6
lines changed- regression/cbmc/double_deref
- src/goto-symex
2 files changed
+22
-6
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
226 | 246 | | |
227 | 247 | | |
228 | 248 | | |
| |||
241 | 261 | | |
242 | 262 | | |
243 | 263 | | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | 264 | | |
249 | 265 | | |
250 | 266 | | |
| |||
0 commit comments