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

idom_to_dom returns incorrect answer when called on the same node. #109

Open
2over12 opened this issue Sep 21, 2020 · 0 comments
Open

idom_to_dom returns incorrect answer when called on the same node. #109

2over12 opened this issue Sep 21, 2020 · 0 comments

Comments

@2over12
Copy link

2over12 commented Sep 21, 2020

idom_to_dom idom x x will return false despite the fact that a node should always dominate itself.

The problem area is here:
let rec idom_to_dom idom x y = try let d = idom y in G.V.equal x d || idom_to_dom idom x d with Not_found -> false
The idom of a node is defined as a strict dominator so d will never be equal to y. Therefore in the case that x=y, d will never be equal to x. Thus idom_to_dom of the same node will return false instead of the expected value: true.

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