Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #670 +/- ##
========================================
Coverage 97.17% 97.18%
========================================
Files 304 306 +2
Lines 40061 40229 +168
========================================
+ Hits 38931 39097 +166
- Misses 1130 1132 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
Implementation SummaryChanges
Deviations from Plan
Open Questions
|
There was a problem hiding this comment.
Pull request overview
Adds a new NP-complete set-based satisfaction model, ConsecutiveSets, and wires it into the library’s schema/variant registry, examples, docs, and unit tests.
Changes:
- Introduce
ConsecutiveSetsmodel (schema registration,Problem/SatisfactionProblemimpl, variants, example-db spec). - Add unit tests + trait-consistency coverage for the new model.
- Update example fixtures and generated docs assets (schemas + reduction graph) and paper references/definitions.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/unit_tests/trait_consistency.rs | Adds ConsecutiveSets to the generic Problem trait consistency check. |
| src/unit_tests/models/set/consecutive_sets.rs | New unit tests for construction, evaluation, brute-force solving, and serde round-trip. |
| src/models/set/mod.rs | Registers and re-exports the new set model; includes example-db spec hook. |
| src/models/set/consecutive_sets.rs | New ConsecutiveSets model implementation + schema/variants + example-db spec + test module link. |
| src/models/mod.rs | Re-exports ConsecutiveSets from the top-level models module. |
| src/lib.rs | Re-exports ConsecutiveSets in the crate prelude. |
| src/example_db/fixtures/examples.json | Adds canonical example fixture entry for ConsecutiveSets. |
| docs/src/reductions/reduction_graph.json | Adds node for ConsecutiveSets and updates indices/edges accordingly (generated artifact). |
| docs/src/reductions/problem_schemas.json | Adds schema entry for ConsecutiveSets (generated artifact). |
| docs/paper/references.bib | Adds citations relevant to Consecutive Sets / consecutive ones property. |
| docs/paper/reductions.typ | Adds paper section entry/definition/example for ConsecutiveSets. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+163
to
+170
| let mut found = false; | ||
| for start in 0..=(str_len - subset_len) { | ||
| let window = &w[start..start + subset_len]; | ||
| // Check if window is a permutation of subset | ||
| let mut window_sorted: Vec<usize> = window.to_vec(); | ||
| window_sorted.sort(); | ||
| if window_sorted == *subset { | ||
| // subset is already sorted |
src/models/set/consecutive_sets.rs
Outdated
Comment on lines
+163
to
+167
| let mut found = false; | ||
| for start in 0..=(str_len - subset_len) { | ||
| let window = &w[start..start + subset_len]; | ||
| // Check if window is a permutation of subset | ||
| let mut window_sorted: Vec<usize> = window.to_vec(); |
…21-consecutive-sets # Conflicts: # docs/src/reductions/problem_schemas.json # docs/src/reductions/reduction_graph.json # src/example_db/fixtures/examples.json # src/lib.rs # src/models/mod.rs # src/unit_tests/trait_consistency.rs
Contributor
Author
Review Pipeline Report
Remaining issues for final review
🤖 Generated by review-pipeline |
Integrate ComparativeContainment, MinimumCardinalityKey, LongestCommonSubsequence, MinimumMultiwayCut, StaffScheduling, and StringToStringCorrection from main alongside ConsecutiveSets additions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
zazabap
approved these changes
Mar 18, 2026
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.
Summary
Add ConsecutiveSets satisfaction problem model (Garey & Johnson A4 SR18). Given a finite alphabet, collection of subsets, and bound K, decides if a string of length ≤ K exists where each subset's elements appear consecutively.
Fixes #421