Implement CFL single-path path-finding and extraction algorithm#8
Open
b08lsoai wants to merge 33 commits intoSparseLinearAlgebra:stablefrom
Open
Implement CFL single-path path-finding and extraction algorithm#8b08lsoai wants to merge 33 commits intoSparseLinearAlgebra:stablefrom
b08lsoai wants to merge 33 commits intoSparseLinearAlgebra:stablefrom
Conversation
add algorithm for single path extracting, finding, add tests and structures for LAGraphX
after freeing the element type of the output matrix, it becomes an invalid type instead of a user-defined type
add tests for invalid input
previously, it was not possible to free the PathIndex type; now its creation and initialization of matrices in the output data are required outside the function
refactor CFL algorithms by introducing a semiring-parameterized CFPQ_core and task-specific wrapper functions
the path start and end parameters are now optional and passed by pointer passing NULL extracts paths from all vertices
gsvgit
requested changes
Feb 24, 2026
experimental/algorithm/LAGraph_CFL_extract_single_path_internal.c
Outdated
Show resolved
Hide resolved
experimental/algorithm/LAGraph_CFL_extract_single_path_internal.c
Outdated
Show resolved
Hide resolved
experimental/algorithm/LAGraph_CFL_extract_single_path_internal.c
Outdated
Show resolved
Hide resolved
| //==================== | ||
| // Grammars | ||
| //==================== | ||
|
|
Member
There was a problem hiding this comment.
Кажется, можно создать единую базу графов и грамматик для всех разновидностей КС запросов. Потом использовать её в разных тестах.
gsvgit
reviewed
Mar 14, 2026
Member
gsvgit
left a comment
There was a problem hiding this comment.
I guess CI should pass successfully.
| // If couldn't find rules for outputting an empty or terminal path, | ||
| // then the path were looking for doesn't match the rules | ||
| LG_FREE_WORK; | ||
| ADD_TO_MSG(msg_len, "The extracted path does not match the input grammar."); |
Member
There was a problem hiding this comment.
I'm confused with such a message. Does it means that the initial path finding algorithm can built incorrect paths index?
the LAGraph_CFL_single_path requires GraphBLAS version 9.4.5 or higher
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 PR adds an implementation of Rustam Azimov's algorithms for searching and restoring a single path in a graph with context-free constraints using matrix multiplication. During the path search, auxiliary information is stored, which is later used to restore the path.
Unit tests were written for both algorithms, ensuring good coverage.