-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Implement iterative Pearce's SCC finding algoritm #12528
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
Conversation
I propose to merge this into master and back-port to old PHP branches after testing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is right, I checked with the paper and reference implementation. Thank you.
Just one small remark.
I propose to merge this into master and back-port to old PHP branches after testing.
I agree.
case 7: use = iterator->use; goto state_7; | ||
case 8: use = iterator->use; goto state_8; | ||
case 9: phi = iterator->phi; goto state_9; | ||
case 10: phi = iterator->phi; goto state_10; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Label state_10
is only defined in #ifdef SYM_RANGE
. So this case must also be guarded with #ifdef SYM_RANGE
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah. thanks.
* PHP-8.1: Backport implementation of iterative Pearce's SCC finding algoritm (#12528)
* PHP-8.2: Backport implementation of iterative Pearce's SCC finding algoritm (#12528)
* PHP-8.3: Backport implementation of iterative Pearce's SCC finding algoritm (#12528)
This fixes #11795
The proposed algorithm is a variation of Algorithm 4 described in https://whileydave.com/publications/Pea16_IPL_preprint.pdf . However this description has a bug (vS stack should be split into two stacks).
The fixed reference implementations are available at https://github.com/DavePearce/StronglyConnectedComponents