add rpq-matrix algo to export branch for pathrex#14
Merged
Conversation
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>
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>
Signed-off-by: Rodion Suvorov <rodion.suvorov.94@mail.ru>
This patch brings public methods for rust la-n-egg-rpq algorithm. Signed-off-by: Rodion Suvorov <rodion.suvorov.94@mail.ru>
Fix the typo in non null assertion. we should check res_mat ofc. Signed-off-by: Rodion Suvorov <rodion.suvorov.94@mail.ru>
This patch fixes the wrong assertion in the regex evaluator that made it impossible to have repeated subexpressions. Assume `(a|b)/(a|b)` regex as an example. This RE have two repeated subexpressions `(a|b)`. The e-graph logic would take into account the fact that these expressions are the same and the resulting tree of the regular expression would have the same node for the `(a|b)` expression. Let's get into the problem. Before this patch the LAGraph solver evaluated lhs, rhs first and then combined their results w.r.t. node type. If there were repeated subexpressions the solver failed due to the assertion that every subexpression had not been evaluated yet. This happened to the example: we evaluated LHS `(a|b)` at first and then we try to calculate RHS `(a|b)`. But the corresponding subtree is already calculated and the assertion is fired. Let's remove the wrong assertion and fix the problem. Apart from these fixes, this patch improves error messages. It has been done in terms of determining what is wrong. There is no reason to avoid these improvements.
this patch brings reduce method that allows calculate reduced matrix by rows and column in lanegg Signed-off-by: Rodion Suvorov <rodion.suvorov.94@mail.ru>
Signed-off-by: Rodion Suvorov <rodion.suvorov.94@mail.ru>
Author
|
build failed due to upstream errors |
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.
collecting all algorithms that should be used in pathrex project in one branch.