Skip to content

Improved predicate splitter with MILP-based equivalence test#506

Open
robknight wants to merge 11 commits into
mainfrom
milp_predicate_splitter
Open

Improved predicate splitter with MILP-based equivalence test#506
robknight wants to merge 11 commits into
mainfrom
milp_predicate_splitter

Conversation

@robknight
Copy link
Copy Markdown
Collaborator

@robknight robknight commented May 4, 2026

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:

Parity sweep: checked=1200, milp_feasible=1177, dp_divergences=0
  MILP total=73.158783697s mean=60.965653ms max=6.204155675s
  DP   total=4.329626493s mean=3.608022ms max=25.858044ms

So DP is ~16x faster at the mean, and ~240x faster at the maximum.

@robknight robknight marked this pull request as ready for review May 6, 2026 12:50
@robknight robknight force-pushed the milp_predicate_splitter branch from 448b660 to 78ff134 Compare May 6, 2026 13:25
@ed255 ed255 self-requested a review May 6, 2026 14:07
@robknight
Copy link
Copy Markdown
Collaborator Author

test

1 similar comment
@ed255
Copy link
Copy Markdown
Collaborator

ed255 commented May 6, 2026

test

@robknight robknight force-pushed the milp_predicate_splitter branch from eab2392 to 49af256 Compare May 12, 2026 10:15
@robknight robknight changed the title MILP version of predicate splitter Improved predicate splitter with MILP-based equivalence test May 13, 2026
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