Improved predicate splitter with MILP-based equivalence test#506
Open
robknight wants to merge 11 commits into
Open
Improved predicate splitter with MILP-based equivalence test#506robknight wants to merge 11 commits into
robknight wants to merge 11 commits into
Conversation
448b660 to
78ff134
Compare
Collaborator
Author
|
test |
1 similar comment
Collaborator
|
test |
More tidying Tidying
eab2392 to
49af256
Compare
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 branch started out as a replacement of the earlier "greedy" splitter with a MILP-based version, because the greedy version was unable to find feasible solutions to some of the longer custom predicates we've been testing with recently.
However, the MILP version also struggled with performance, sometimes taking 15 seconds or longer to return a solution.
What is implemented in this PR is a dynamic programming-based approach which is able to find feasible solutions in all cases I've tested with, with a MILP version implemented for testing purposes. There is a test which randomly generates sample predicates, and then verifies that the DP approach produces feasible solutions in all cases where MILP does. In addition, there are several new tests involving longer custom predicate chains.
The DP code is much faster than the MILP code for every scenario that I've tested. From the test:
So DP is ~16x faster at the mean, and ~240x faster at the maximum.