Skip to content

feat(aplite): query bounded projected XOR cells - #2177

Merged
mergify[bot] merged 1 commit into
masterfrom
stack/tignear/feat/aplite/query-bounded-projected-xor-cells--562d30b5
Oct 26, 2026
Merged

mergify[bot] merged 1 commit into
masterfrom
stack/tignear/feat/aplite/query-bounded-projected-xor-cells--562d30b5

Conversation

@tignear

@tignear tignear commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Add PreparedQuery::enumerate_cell to enumerate at most a caller-bounded projected cell under temporary predicates. Use one scoped CDCL database, retaining local learning while blocking already-seen projected assignments. Hidden witness multiplicity does not duplicate a projected model. Blocking clauses and their learned consequences never escape into the prepared query or a later cell.

Return Complete, TooLarge, or Unknown distinctly. One extra search distinguishes an exact-size cell from overflow; only Complete exposes models. Work and time budgets cover the entire cell operation, including model replay. Replay source formulas, contexts and predicate assumptions before accepting models or declaring overflow.

Add HashCells to prepare seed-selected affine XOR rows once and query different prefixes/targets without recompilation. Preserve constant and dependent rows, validate projection variables, and bound construction as well as search. These are partitioning/counting primitives, not a uniform sampler: adaptive sizing and a justified cell-acceptance/model-selection policy remain follow-up work. The exhaustive reservoir sampler remains test-only; an empty predicate prefix can still inspect a small whole domain within the explicit cell bound.

Validation: 98 Aplite unit tests and four README doctests. Checked every three-Boolean truth table across XOR cells; verified disjoint/complete partitions across seeds, projected multiplicity, alias/constant bits, exact thresholds, overflow, invalid inputs, budget recovery and no state leakage. A 32-bit domain narrowed by XOR predicates completes a 16-model cell; the unpartitioned query stops at overflow. Lydite IR/solver/kernel tests (38/29/5), affected all-target clippy, formatting, package/version checks and standalone package verification passed. No full RV32I campaign, release build, or production uniformity guarantee is claimed.

@tignear

tignear commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor Author

This pull request is part of a Mergify stack:

# Pull Request Link
1 feat(aplite): query bounded projected XOR cells #2177 👈
2 perf(aplite): reduce affine XOR rows before bit blasting #2183
3 feat(aplite): generate approximate projected sample batches #2184
4 feat(sv-syntax)!: retain named constraint expressions #2193
5 feat(sv)!: solve scalar class constraints during randomize #2194

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T18:12:39.024632Z c2a33b9 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@tignear
tignear force-pushed the stack/tignear/feat/aplite/query-bounded-projected-xor-cells--562d30b5 branch from fa0a52e to e076c0d Compare October 26, 2026 17:14
@tignear

tignear commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor Author

Revision history

# Type Changes Reason Date
1 initial fa0a52e 2026-10-26 17:14 UTC
2 content fa0a52e → e076c0d Clarify that the exhaustive reservoir sampler is test-only; bounded cell queries also permit an empty prefix for small whole-domain size checks. 2026-10-26 17:14 UTC
3 rebase e076c0d → c2a33b9 (rebase only) 2026-10-26 18:10 UTC

@mergify

mergify Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Queued — the merge queue status continues in this comment ↓.

@tignear tignear added the merge-ready Request merging through Mergify after required checks label Oct 26, 2026
@mergify mergify Bot added the queued Mergify queue entry label Oct 26, 2026
@mergify

mergify Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 26 minutes 23 seconds in the queue, with no time running CI.

Reason

The pull request #2177 has been manually updated

Requeued — the merge queue status continues in this comment ↓.

Base automatically changed from stack/tignear/feat/aplite/reuse-compiled-queries-tmp-assumptions--80ec4395 to master October 26, 2026 18:02
Add PreparedQuery::enumerate_cell to enumerate at most a caller-bounded projected cell under temporary predicates. Use one scoped CDCL database, retaining local learning while blocking already-seen projected assignments. Hidden witness multiplicity does not duplicate a projected model. Blocking clauses and their learned consequences never escape into the prepared query or a later cell.

Return Complete, TooLarge, or Unknown distinctly. One extra search distinguishes an exact-size cell from overflow; only Complete exposes models. Work and time budgets cover the entire cell operation, including model replay. Replay source formulas, contexts and predicate assumptions before accepting models or declaring overflow.

Add HashCells to prepare seed-selected affine XOR rows once and query different prefixes/targets without recompilation. Preserve constant and dependent rows, validate projection variables, and bound construction as well as search. These are partitioning/counting primitives, not a uniform sampler: adaptive sizing and a justified cell-acceptance/model-selection policy remain follow-up work. The exhaustive reservoir sampler remains test-only; an empty predicate prefix can still inspect a small whole domain within the explicit cell bound.

Validation: 98 Aplite unit tests and four README doctests. Checked every three-Boolean truth table across XOR cells; verified disjoint/complete partitions across seeds, projected multiplicity, alias/constant bits, exact thresholds, overflow, invalid inputs, budget recovery and no state leakage. A 32-bit domain narrowed by XOR predicates completes a 16-model cell; the unpartitioned query stops at overflow. Lydite IR/solver/kernel tests (38/29/5), affected all-target clippy, formatting, package/version checks and standalone package verification passed. No full RV32I campaign, release build, or production uniformity guarantee is claimed.

Change-Id: I562d30b5a8a1d9c75859358602aa1b3cc9c76455
@tignear
tignear force-pushed the stack/tignear/feat/aplite/query-bounded-projected-xor-cells--562d30b5 branch from e076c0d to c2a33b9 Compare October 26, 2026 18:10
@mergify mergify Bot removed the queued Mergify queue entry label Oct 26, 2026
@mergify

mergify Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 41 minutes 49 seconds in the queue, including 34 minutes 54 seconds running CI.

Required conditions to merge
  • check-success = Conventional Commit title
  • check-success = Queue validation
  • depends-on=celox-sim/celox#2177 [⛓️ feat(aplite): query bounded projected XOR cells #2177 [stack]]
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/Lint & Format
    • check-neutral = @github-actions/Lint & Format
    • check-skipped = @github-actions/Lint & Format
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/NAPI Build (Linux ARM64 GNU)
    • check-neutral = @github-actions/NAPI Build (Linux ARM64 GNU)
    • check-skipped = @github-actions/NAPI Build (Linux ARM64 GNU)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/NAPI Build (Windows)
    • check-neutral = @github-actions/NAPI Build (Windows)
    • check-skipped = @github-actions/NAPI Build (Windows)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/Rust Test & NAPI Build
    • check-neutral = @github-actions/Rust Test & NAPI Build
    • check-skipped = @github-actions/Rust Test & NAPI Build
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/JS Test (Ubuntu)
    • check-neutral = @github-actions/JS Test (Ubuntu)
    • check-skipped = @github-actions/JS Test (Ubuntu)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/JS Test (Windows)
    • check-neutral = @github-actions/JS Test (Windows)
    • check-skipped = @github-actions/JS Test (Windows)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/Conventional Commit title
    • check-neutral = @github-actions/Conventional Commit title
    • check-skipped = @github-actions/Conventional Commit title

@mergify
mergify Bot merged commit 8a57393 into master Oct 26, 2026
24 checks passed
@mergify
mergify Bot deleted the stack/tignear/feat/aplite/query-bounded-projected-xor-cells--562d30b5 branch October 26, 2026 19:06
@mergify mergify Bot removed the queued Mergify queue entry label Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-ready Request merging through Mergify after required checks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant