Skip to content

Compressed and Sparse tuple set extensional propagation - #213

Merged
zayenz merged 5 commits into
mainfrom
feature/tuple-set-extensional-propagators
Jul 12, 2026
Merged

Compressed and Sparse tuple set extensional propagation#213
zayenz merged 5 commits into
mainfrom
feature/tuple-set-extensional-propagators

Conversation

@zayenz

@zayenz zayenz commented Jul 6, 2026

Copy link
Copy Markdown
Member

TupleSet-backed extensional constraints can choose between dense, sparse, compressed-dense, and automatic support representations. This is useful when the table shape does not fit the old dense representation well: large domains with few supports benefit from sparse data, while tables with wide value gaps can avoid carrying mostly empty dense support words.

The new sparse representation stores supports by active tuple/value structure and uses incremental propagation for positive tables, with fallback paths for cases where the compact sparse form is not suitable. The compressed-dense representation keeps the dense-table propagation model but stores only non-empty support words, which preserves much of the dense propagator behavior while reducing the cost of wide, sparse word ranges.

Passing EPK_AUTO to TupleSet::finalize selects a representation for the finalized TupleSet, so callers that do not have a strong reason to force a variant can leave the choice to the table metadata. For backwards compatibility, the default is still EPK_DENSE when no other information is given.

@greptile-apps

greptile-apps Bot commented Jul 6, 2026

Copy link
Copy Markdown

Too many files changed for review. (1342 files found, 100 file limit)

@zayenz
zayenz changed the base branch from master to main July 6, 2026 20:32
@zayenz
zayenz force-pushed the feature/tuple-set-extensional-propagators branch 11 times, most recently from b4b4f61 to 473f6a9 Compare July 12, 2026 08:41
Mikael Zayenz Lagerkvist added 5 commits July 12, 2026 11:18
Add dense, sparse, and compressed support storage, automatic selection, and representation-aware posting for integer and Boolean tables.

Treat finalization failure as terminal and release partial support data. Bound support sizes before allocation, preserve disabled propagation work across cloning, scan sparse deltas by actual table values, and subsume sparse actors once at most one advisor remains.

Share compact actor policy while retaining representation-specific support loops, and allow DFA-derived tuple sets to select storage explicitly.
Finalize materialized table constraints with EPK_AUTO so small tables retain dense supports while larger sparse tables can use compressed storage.

Cover automatic selection with a large diagonal FlatZinc table.
Let table-building examples choose support storage from the finalized table instead of forcing dense supports.
Select focused sparse, compressed, finalization, cloning, DFA, and FlatZinc tests in both build systems. This exercises the representation contracts without adding the large stress cases to the general check target.
@zayenz
zayenz force-pushed the feature/tuple-set-extensional-propagators branch from 473f6a9 to 14c3f30 Compare July 12, 2026 09:19
@zayenz
zayenz merged commit 4feb076 into main Jul 12, 2026
14 checks passed
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