Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about A3(DeadCodeDetection) #22

Open
RacerZ-fighting opened this issue Nov 15, 2023 · 0 comments
Open

Question about A3(DeadCodeDetection) #22

RacerZ-fighting opened this issue Nov 15, 2023 · 0 comments

Comments

@RacerZ-fighting
Copy link

When doing graph traversal, I first chose a LinkedList to maintain all visited nodes.
But I can't figure out why there would be a false negative test case.

        List<Stmt> isVisited = new LinkedList<>();
        ArrayDeque<Stmt> queue = new ArrayDeque<>();    // BFS queue
        queue.add(cfg.getEntry());
Snipaste_2023-11-15_13-14-47

Then, if I change to use a HashSet, all test cases will pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant