Repository navigation
Conversation
zayenz
force-pushed
the
feature/open-cp
branch
from
October 4, 2026 18:18
58bf387 to
c693533
Compare
zayenz
changed the base branch from
main
to
feature/improved-regular-construction
October 4, 2026 18:18
zayenz
added this pull request to stack #250
October 5, 2026 13:21
zayenz
force-pushed
the
feature/open-cp
branch
from
October 8, 2026 15:15
c4eea85 to
4da8674
Compare
zayenz
force-pushed
the
feature/open-cp
branch
from
October 8, 2026 17:43
4da8674 to
8154fb8
Compare
zayenz
force-pushed
the
feature/open-cp
branch
from
October 12, 2026 19:30
e7e8370 to
5e20c4f
Compare
Construct boards through an OpenIntVarList path transition and compare with a bounded array model using the same slide and goal rules. Minimize moves with BAB, and expose independent scramble, seed, and move-limit options. Keep the default move limit at twelve for a short demonstration. Register the example in CMake and Autoconf, including its generated include dependencies, and document state-versus-move length accounting. Validated both models in Debug and ASan/UBSan builds with the defaults, an explicit scramble/limit/seed case, a solved start, and an insufficient move bound. Replayed every printed path to verify legal slides and the goal board. Independent Astra review passed.
Wait for the current board to become assigned before closing or extending the path. Keep callback captures limited to the state index and retrieve the model from the supplied space. Remove the initial Manhattan lower bound on length to avoid constructing future boards at the root. Both models pass small explicit, solved-start, and insufficient-limit cases in Debug and ASan/UBSan builds. Printed paths were replayed, and a root diagnostic confirms two constructed boards for scramble20/limit32, seed3. Independent focused review passes. The open default now exceeds a 30-second Debug cutoff because delayed goal detection removes early backward goal propagation. Its usability needs a separate coordinated follow-up; no extra pruning rule is included in this model correction.
Reject assigned boards whose Manhattan distance cannot fit the current path upper bound. Recheck this condition after incumbent cuts, taking care not to read a board before propagation assigns it. Force the goal when a constructed board reaches the final permitted state. Keep path growth lazy: these checks do not increase its minimum length or construct future boards. The fixed model and shared slide rules stay unchanged. Focused Debug and ASan/UBSan runs pass for defaults, explicit options, a solved start and an insufficient move limit. Printed paths were replayed. The default open model completes in 39 nodes, and the root probe still constructs two boards for scramble20/limit32/seed3. Independent Astra recheck passes.
This branch has not been deployed
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.
Add open variable lists whose final length is decided during propagation and search.
length()controls that extent,known_length()counts constructed positions, andget()materializes requested positions. IncludesOpenIntVarList,OpenBoolVarList, and a genericOpenVarList<Var>with a variable factory.Constraints follow the growing prefix, including distinct, relations, sliding windows, min/max, precedence, and regular-language constraints. Regular constraints accept extendable prefixes while the list is open and require acceptance on closure. Distinct is value consistent; min/max enforce attainment when the list closes.
Branching uses standard variable and value selectors to assign the current prefix, then tries closing before extending. Length-first search uses an ordinary brancher on
length()posted before the list brancher. Action and CHB selectors require full materialization when posted. Factories and transition callbacks run in the current space and must support concurrent calls across clones.Open-list materialization and transition callbacks, including direct
append(), useSpace::NoGPIby default. Propagator information is stored in the space and released with it; these propagators have zero AFC. Callbacks can useSpace::UseGPIfor selected postings that need ordinary AFC. Nested list construction enters its own NoGPI scope, and each scope restores the previous setting on exit. The kernel support comes from #257.The main example,
common-pattern, mines frequent ordered subsequences subject to minimum length, required items and a regular language. Default DFS enumerates qualifying patterns; BAB finds a maximum-length qualifying pattern. It accepts support percentages and letter, positive integer, or singleton-itemset SPMF databases. Each record contributes at most one support unit. Open lists represent actual pattern positions without an end marker or padded suffix variables. A private prefix-projection propagator handles support and returns its exact count for completed patterns; ordinary CP constraints express the pattern restrictions. Supporting suffixes are compacted, immutable last-occurrence indexes avoid scanning repeated items, and unchanged prefixes reuse filtering results. The smalleropen-routeintroduction demonstrates routes of varying lengths, cloning, printing, and incremental or length-first search.The comparison under
misc/common-pattern/covers open and padded projection, a paper-style CP2015 PREFIX-PROJECTION reimplementation, and all-input DFA baselines. It uses equivalent mining queries, the paper's worked database and regular expressions, independent solution-set validation where bounded, and resumable measurements. Its documentation traces earlier and later sequential-mining approaches and distinguishes representation, support computation, embedding constraints and output queries. The example does not implement multi-item itemsets, gap/time constraints, closed-pattern mining or top-k by support. The comparison models share initial pruning and suffix operations. The paper-style variant implements the CP2015 filtering rules rather than reproducing the authors' original executable. Public Bible and Leviathan copies match the paper's reported database statistics; byte identity with its inputs and equivalence of historical timing boundaries are not established.Serial Release measurements on the public Bible database enumerate all 23,340 patterns at 1% support, with exact agreement against independent SPMF PrefixSpan output. Median open-model time falls from 8.36 to 4.12 seconds; padded-model time falls from 8.27 to 4.41 seconds. A controlled repeated-item database shows the open model about 2.4 times faster even with the tighter valid length bound. A required-item query favours padding (7.15 seconds versus 17.13 seconds open); the documentation explains the filtering difference. These results support the example while documenting where open construction does and does not help.
Validation on macOS:
FlatZincErrorTest::run()during standard brancher construction; a complete sanitizer-suite pass is not established.The NoGPI integration passed 45 focused AFC, open-list and regular-language checks and 10 independently checked puzzle cases. The stacked search branch also passed 54 checks with CBS and fully instrumented ASan/UBSan, plus 12 puzzle cases with clean sanitizer output. Independent review found no required corrections.
Includes a 6.5.0 changelog entry. Linux and Windows release validation remains to be run.