Skip to content

Implement RSMs reachability algorithm - #7

Open
Zestria wants to merge 12 commits into
SparseLinearAlgebra:stablefrom
Zestria:feat/rsm-reach
Open

Implement RSMs reachability algorithm#7
Zestria wants to merge 12 commits into
SparseLinearAlgebra:stablefrom
Zestria:feat/rsm-reach

Conversation

@Zestria

@Zestria Zestria commented Dec 3, 2025

Copy link
Copy Markdown

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.

Comment thread experimental/algorithm/LAGraph_RSM_reachability.c Outdated
Comment thread experimental/algorithm/LAGraph_RSM_reachability.c Outdated
Comment thread experimental/test/test_RSM_reachability.c Outdated
@Zestria

This comment was marked as outdated.

Zestria added 6 commits April 17, 2026 22:48
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.
@Zestria

This comment was marked as outdated.

@Zestria

Zestria commented May 11, 2026

Copy link
Copy Markdown
Author

Algorithm:
algorithm.pdf

@Zestria

This comment was marked as outdated.

@Zestria

Zestria commented Sep 4, 2026

Copy link
Copy Markdown
Author

Experiment's design and result:
experiments.pdf

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

Successfully merging this pull request may close these issues.

2 participants