Skip to content

Conversation

suvorovrain
Copy link

This PR adds RPQ-matrix reachability algorithm from Diego Arroyuelo, Adrián Gómez-Brandón & Gonzalo Navarro paper "Evaluating regular path queries on compressed adjacency matrices".

Solver logic was moved out main public function.
Also this patch adds input validation.

Signed-off-by: Rodion Suvorov <rodion.suvorov.94@mail.ru>
This patch add documentation with explaining
of RPQ-matrix algorithm work.

Signed-off-by: Rodion Suvorov <rodion.suvorov.94@mail.ru>
Remove unused label function and old logic from check function.

Signed-off-by: Rodion Suvorov <rodion.suvorov.94@mail.ru>
Signed-off-by: Rodion Suvorov <rodion.suvorov.94@mail.ru>
Signed-off-by: Rodion Suvorov <rodion.suvorov.94@mail.ru>
In previous versions there was a logic mistakes in
processing of L and R kleene stars. Now they are
correct. Also provide a docs.

Signed-off-by: Rodion Suvorov <rodion.suvorov.94@mail.ru>
In this patch all kleene stars was slightly changed
- Identity matrix name changes from E to I
- All tmp matrices T was demolished
- R kleene logic changed from
	S <- A
	T <- S x B
	S <- S + T
 to
	S <- A
	S <- S x (B + I)
- L kleene logic changed in the same way

Signed-off-by: Rodion Suvorov <rodion.suvorov.94@mail.ru>
Add spaces before ; and add docs for struct in include.

Signed-off-by: Rodion Suvorov <rodion.suvorov.94@mail.ru>
This patch fixes typo in the name of RPQ-matrix
main function. Correct in include and algorithm
directories.

Signed-off-by: Rodion Suvorov <rodion.suvorov.94@mail.ru>
This patch fixes incorrect assertions in check and in main
functions. Also some refactor

Signed-off-by: Rodion Suvorov <rodion.suvorov.94@mail.ru>
In previous commit about kleene logic I
start use result matrix S as input and
output. I guess this leads to UB. So i
come back to tmp matrices.

Signed-off-by: Rodion Suvorov <rodion.suvorov.94@mail.ru>
This patch adds tests for valid and
invalid input.

Signed-off-by: Rodion Suvorov <rodion.suvorov.94@mail.ru>
@suvorovrain
Copy link
Author

I've created new "stable" branch for this PR because our stable branch is a little bit old

This patch brings old kleene logic back:
- R kleene:
	S <- A
	S <- S x (B + I)
- L kleene:
	S <- B
	S <- (A + I) x S
Also all kleene stars now implemented via
accumulator without creation new tmp
matrices.

Signed-off-by: Rodion Suvorov <rodion.suvorov.94@mail.ru>
@suvorovrain suvorovrain removed the request for review from georgiy-belyanin October 6, 2025 11:39
@suvorovrain
Copy link
Author

Some work still needed

Comment on lines 474 to 475
sr = GrB_LOR_LAND_SEMIRING_BOOL ;
op = GxB_LOR_BOOL_MONOID ;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I can choose faster rings? Let me know please.

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.

1 participant