Skip to content

D-RELALG-UNIFIED: assessment, decisions and stage order (docs only) - #1641

Merged
AdaWorldAPI merged 2 commits into
mainfrom
ccr-d3ce1263-ied9yh
Oct 20, 2026
Merged

AdaWorldAPI merged 2 commits into
mainfrom
ccr-d3ce1263-ied9yh

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

Documentation and board only; no code. Plan: .claude/plans/d-relalg-unified-v1.md.

Question

Can JC's R-compatible statistics and Datalog programs share one optimized algebra, so that redundant joins, sums and passes are found once, and then execute through relalg / R2IL / mask-risc and Quack?

Assessment

No shared relational expression graph exists today.

  • lance-graph-relalg is a single-table Boolean selection algebra with a terminal measure: seven Rel variants, no joins, projection, grouping, variables, recursion or sharing.
  • Quack has no cost model and does not consume relalg.

The plan therefore gives each layer the smallest extension, not a new AST:

  • U1: JC request batches share the existing power-sum terminals (GroupPowerSumsI32, GroupCrossPowerSumsI32). Each distinct (selection, grouping key, lane pair) is one pass. No new IR is needed, and integer lanes stay exact.
  • U2: let-bound planes on the contract set IR, after D-CMR-1:
    • Plane(i) is immutable and bound to the coordinate version.
    • Each shared subexpression is evaluated once.
    • There is no DAG inside a fold, because that would lose call_owned's constant width.
  • Joins: a co-addressed join over JoinDomain. No position is taken from another table's values.
  • Quack: measured physical pins with can-fire and can-stay-silent tests, as crepe-plan-probe: ARM-B-PREPARE, Arm B's read policy above 1% of centers #1639 did for Arm B, instead of a cost model.
  • Recursion: a driver over BIND tiles, once the slot assignment is shown to be an attested frozen-codebook lookup.

The plan also contains the worked ΣΣΣ factorization, the 256-rule CSE example, the recursion reuse, register and lazy-context integration, the benchmark that separates the three mechanisms, the risks with their falsifiers, and the stage order U0–U8.

Decisions recorded (operator, 2026-10-20)

  • ADMISSION = B:
    • Counted, version-witnessed same-table seeks are admitted in preparation.
    • Cross-table positional gathers stay forbidden.
    • Frozen codebook lookups are admitted under attestation.
    • D-MPS-8 is not cleared automatically.
  • D-RA-2 = A: the single-table set algebra and its rewrite rules belong in lance-graph-contract. relalg keeps lowering and relational planning. No general relational AST is introduced for JC or Quack.

Acceptance for U1 and U2 is measured row traversals, materializations and total cost, with the result set and version semantics unchanged. The 256-rule and 256-hop benchmarks stay separate.

Not yet fully verified

Three negatives rest on grep plus directory listings, not on a full read. The plan marks each one:

  1. JC has no expression IR.
  2. No code exists for the D-CMR set IR.
  3. No D-MSUB exists.

Board

  • STATUS_BOARD gains the section D-RU-0..8 and the decided status of D-RA-2.
  • ISS-ADMISSION-PREP-BINDING shows the decided status.
  • INTEGRATION_PLANS and the entry 2026-10-20-d-relalg-unified are added; the entries index is regenerated.
  • The supersession index regenerates unchanged.

Generated by Claude Code

Plan .claude/plans/d-relalg-unified-v1.md: can JC/R statistics and
Datalog programs share one optimized algebra, executed through
relalg / R2IL / mask-risc and Quack?

Assessment: no shared relational expression graph exists. relalg is a
single-table Boolean selection algebra with a terminal measure. Quack
has no cost model and does not consume relalg. Each layer therefore gets
the smallest extension instead of a new AST:
- JC request batches share the power-sum terminals (U1, first);
- let-bound planes on the contract set IR (U2, after D-CMR-1);
- a co-addressed join over JoinDomain;
- measured Quack pins instead of a cost model;
- recursion over BIND tiles, gated on an attested slot assignment.

Decisions recorded (operator, 2026-10-20):
- ADMISSION = B: counted, version-witnessed same-table seeks are
  admitted in preparation; cross-table positional gathers stay
  forbidden; frozen codebook lookups are admitted under attestation;
  D-MPS-8 is not cleared automatically.
- D-RA-2 = A: the set algebra and its rewrite rules belong in
  lance-graph-contract; relalg keeps lowering and relational planning.

Three negatives rest on grep only and are marked not yet fully
verified: no JC expression IR, no D-CMR set IR code, no D-MSUB.

Board: STATUS_BOARD section D-RU-0..8 and the D-RA-2 status;
ISS-ADMISSION-PREP-BINDING status; INTEGRATION_PLANS; entry
2026-10-20-d-relalg-unified; entries index. The supersession index
regenerates unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e0ca61f8-78da-4acc-aac8-e50a4b01eb89
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Resolves the ISSUES/STATUS_BOARD conflicts with #1640, which recorded the
same ADMISSION B and D-RA-2 A rulings. Keeps #1640's wording, adds the
frozen-codebook clause and the no-general-AST clause, and points the plan's
Decisions section at entries/2026-10-20-six-decisions.md as the authority.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review October 20, 2026 23:50
@AdaWorldAPI
AdaWorldAPI merged commit e8ceb75 into main Oct 20, 2026
5 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 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-20T23:51:26.954307Z bd8af51 Draft marked ready
ℹ️ 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.

AdaWorldAPI pushed a commit that referenced this pull request Oct 21, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013z2e1YXkm6o6HNrDn5BPWA
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.

2 participants