Implement RSMs reachability algorithm#7
Open
Zestria wants to merge 12 commits into
Open
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) |
This comment was marked as outdated.
This comment was marked as outdated.
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.
Author
CFPQ_RSM Benchmark ReportOverviewThis is a comparative evaluation that focuses on the multiple-sources reachability scenario, where the number of source vertices is significantly smaller that the total number of graph vertices. Experimental Setup
Experiment 1: Nested Parentheses GrammarGrammarGraphs
Time Results (avg_time_ms)
Memory Results (avg_max_memory_kb)
Time Speedup (All-Pairs / CFPQ_RSM)
Memory Speedup (All-Pairs / CFPQ_RSM)
Time Speedup (CFL_multsrc / CFL_CFPQ_RSM)
Memory Speedup (CFL_multsrc / CFL_CFPQ_RSM)
Experiment 2: Java Points-To Analysis GrammarGrammarGraphs
Time Results (avg_time_ms)
Memory Results (avg_max_memory_kb)
Time Speedup (All-Pairs / CFPQ_RSM)
Memory Speedup (All-Pairs / CFPQ_RSM)
Time Speedup (CFL_multsrc / CFL_CFPQ_RSM)
Memory Speedup (CFL_multsrc / CFL_CFPQ_RSM)
Experiment 3: C Alias Analysis GrammarGrammarGraphs
Time Results (avg_time_ms)
Memory Results (avg_max_memory_kb)
Time Speedup (All-Pairs / CFPQ_RSM)
Memory Speedup (All-Pairs / CFPQ_RSM)
Time Speedup (CFL_multsrc / CFL_CFPQ_RSM)
Memory Speedup (CFL_multsrc / CFL_CFPQ_RSM)
|
Author
|
Algorithm CFPQ_RSM(rsm, graph, start_nonterm, start_vertex) Input:
Output:
|
Author
|
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.