Commit 1b71498
Add support for irreducible CFG (#1032)
This PR addresses Issue #921.
**Added:**
Conversion of irreducible flow graphs by _Node Splitting_ (see Dragon
book section 9.7.6). For every irreducible loop found, we duplicate one
of the nodes (we first try to duplicate one that does not have
invariants, if that exists) and all of the nodes that it dominates.
**Tests:**
The former _Irreducible.bpl_ test from _test0_ has been dropped and a
new dedicated directory has been created: _irreduciblecfg_. 6 other
test-cases have been added:
- _Canonical.bpl_: similar to the previous Irreducible.bpl
- _BackEdgeCounter.bpl_: A test case provided by @gauravpartha on the
corresponding issue to justify why _Back Edge Elimination_ shouldn't be
done directly on irreducible CFGs.
- _CanonicalConditions.bpl_: A simple canonical irreducible CFG with
some conditions
- _Tangled.bpl_: A larger irreducible CFG that has to maintain an
invariant
- _Unsound.bpl_: A while + goto example provided by @petemud on the
corresponding issue. It previously gave a false positive with the
/extractLoops option. With the current approach, the failing trace is
successfully identified.
- _Await.bpl_: A simplified and slightly modified version of the example
that we initially wanted to verify when we opened the issue.
---------
Co-authored-by: Shaz Qadeer <[email protected]>1 parent ea8e456 commit 1b71498
File tree
19 files changed
+448
-156
lines changed- Source
- Core/AST
- GotoBoogie
- ExecutionEngine
- Graph
- VCGeneration
- Transformations
- Test
- extractloops
- irreduciblecfg
- test0
19 files changed
+448
-156
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
| |||
97 | 96 | | |
98 | 97 | | |
99 | 98 | | |
100 | | - | |
| 99 | + | |
| 100 | + | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
199 | 250 | | |
0 commit comments