Hi,
the PrunedCFG is used as a View on an existing CFG that omits a set of edges. This view is inconsistent e.g. edges are omitted when getEdgeManager().getSuccNodes() is called, but not when getSuccNodes() is called directly on the PrunedCFG.
A patch (against the lastest wala version) that removes this inconsistency is attached.
Greets,
Juergen
Hi Juergen,
Thanks for the patch! Can you also provide a regression test that fails before the patch and passes afterward? That will make it easier to see what the patch does and to catch future regressions.
Thanks,
Manu
Hi Manu,
I implemented some new regression tests and found out, that the current version of PrunedCFG is fine. (The error was introduced through some other changes I made to WALA). So you may close this bug. Sorry for the inconvenience.
The good news is that I now have some new regression tests at my hand ;)
Part of them introduce some new methods to GraphUtil that are used to compare two graphs. The other part extends the tests in CFGTest.
I made also a little change to PrunedCFG that assures that the entry and exit nodes are always part of the cfg - no matter if they are reachable. I hope this is ok.
The last change is optional. I changed build.xml of core.tests to copy the JUnit dependencies for the lastest Eclipse version (3.5.2) and no longer (3.3). Perhaps you also want to include both possibilities...
I'll attach the two new patch files soon to this bug report.
Greets,
Juergen
Patch for PrunedCFG and GraphUtil
New regression tests and optional build.xml change
Hi Juergen,
Sorry for dropping the ball on this issue. I see a patch for build.xml and CFGTest, but no patch for GraphUtil or PrunedCFG. Do you still want to contribute those changes?
Thanks,
Manu
Hi Manu,
I found out that the inconsistency I observed was not WALAs fault. So there is no patch for PrunedCFG, because there is no error.
But in the process of searching the bug I wrote some testcases. And these are now included in the patch. So you may add them to WALA I you like to.
Greets,
Juergen
Hi Juergen,
Looks like I still need some changes you made to GraphUtil in order to make things compile. In particular, I'm missing the GraphsNotEqualException, the checkDelegateOk() method, and the checkEqualStructure() method. Can you provide those changes as a separate patch?
Thanks,
Manu