Fix some issues in MutableBlockStmtGraph#708
Merged
swissiety merged 8 commits intosoot-oss:add/intraproceduralfrom Oct 18, 2023
Merged
Fix some issues in MutableBlockStmtGraph#708swissiety merged 8 commits intosoot-oss:add/intraproceduralfrom
MutableBlockStmtGraph#708swissiety merged 8 commits intosoot-oss:add/intraproceduralfrom
Conversation
4006651 to
0b95967
Compare
- doesn't always remove all edges when removing at the tail - returns a boolean indicating if an edge was removed
8134baf to
94bfeb3
Compare
MutableBlockStmtGraph
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
removeNodehad multiple issues withkeepFlow = true(which is the default).It would remove too many edges and also treated the flow inside a block and the flow between blocks differently.
This also caused the issue with the
DeadAssignmentEliminatorthat resulted in an invalid statement graph.Added a test for the issue with the DeadAssignmentEliminator producing an invalid statement graph.
removeNodewithkeepFlow = truewill now remove the statement and connect all predecessors of the statement with the successor of the statement to maintain the flow. The method will also throw anIllegalArgumentExceptionwhen the statement to be removed has multiple successors (a branching statement), because the semantics of "keeping the flow" are not unambiguous here.removeEdgedidn't split blocks correctly and removed too many edges between blocks. This was also fixed. Also removedremoveBlockBorderEdgesInternal. This implemented somewhat complicated logic that was easier to move inside ofremoveEdge.