Implement RSMs reachability algorithm#7
Open
Zestria wants to merge 12 commits intoSparseLinearAlgebra:stablefrom
Open
Implement RSMs reachability algorithm#7Zestria wants to merge 12 commits intoSparseLinearAlgebra:stablefrom
Zestria wants to merge 12 commits intoSparseLinearAlgebra:stablefrom
Conversation
gsvgit
requested changes
Feb 21, 2026
| GRB_TRY(GrB_eWiseAdd(P, GrB_NULL, GrB_NULL, GrB_LOR, P, next_frontier, GrB_NULL)); | ||
| GRB_TRY(GrB_Matrix_nvals(&states, next_frontier)); | ||
|
|
||
| if (iteration > 3000) |
| GRB_TRY(GrB_eWiseAdd(K, GrB_NULL, GrB_NULL, GrB_LOR, K, next_frontier, GrB_NULL)); | ||
| GRB_TRY(GrB_Matrix_nvals(&states, next_frontier)); | ||
|
|
||
| if (iteration > 3000) |
Author
Matrix reshape from |V|*|V| to 1*|V*V| triggered 32-bit indexing overflow when V*V > 2^32. The library correctly detects potential overflow (Cj_is_32=false), but the in-place reshape operation (in_place=true) inherits T->j_is_32=true from the original matrix, causing J_work_is_32 to become true and overflow to occur. Solution: use matrix_reshape_dup instead of matrix_reshape to create a new matrix (in_place=false), so J_work_is_32 correctly evaluates to false and 64-bit indexing is used.
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.
This patch implements a context-free path query algorithm using recursive state machines (RSMs) over edge-labeled directed graphs. It extends the approach of the previously unified regular path search algorithm by using linear algebra operations on adjacency matrices, as presented in https://arxiv.org/abs/2412.10287.