Skip to content

Add open variable sequences - #248

Draft
zayenz wants to merge 8 commits into
feature/improved-regular-constructionfrom
feature/open-cp
Draft

zayenz wants to merge 8 commits into
feature/improved-regular-constructionfrom
feature/open-cp

Conversation

@zayenz

@zayenz zayenz commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

This adds open variable sequences for models whose eventual length is decided during propagation and search. A length variable controls materialization, and factories and transition callbacks act in the current space.

The change includes:

  • A shared OpenVarSequence<Var> core, with integer and Boolean constructors and custom factories for other variable types.
  • Integer constraints for distinctness, adjacent relations, sliding count and sum windows, minimum/maximum, and precedence.
  • Regular-language constraints for integer and Boolean sequences that accept extendable prefixes and require acceptance when the sequence closes.
  • Standard Gecode branching selectors, tie-breaking, filters, print callbacks, and no-goods, with length-first or value-first order. Action and CHB selectors require the complete sequence to be materialized when posting.
  • Compact numbering for sparse DFA state identifiers, including duplicate final-state handling.

Validation:

  • Debug build and configured CTest checks passed. The final clone cleanup was rebuilt and covered by the focused tests.
  • All 39 focused open-sequence, open-regular, DFA, and NFA tests passed twice, including a regression for no-good extraction after sequence growth.
  • Independent full-branch review completed; identified issues were fixed and independently checked.
  • Allocation-failure cleanup was checked statically; fault injection was not run.
  • All 14 cross-platform CI checks passed for commit 934e9b691e.

@zayenz
zayenz changed the base branch from main to feature/improved-regular-construction October 4, 2026 18:18
@zayenz zayenz changed the title Add open integer variable sequences and constraints Add open variable sequences Oct 5, 2026
@zayenz
zayenz added this pull request to stack #250 October 5, 2026 13:21

This branch has not been deployed

No deployments
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.

1 participant