Skip to content

docs(plan): Soufflé AST→RAM lowering across 64 thought lifetimes - #1612

Merged
AdaWorldAPI merged 2 commits into
mainfrom
docs/souffle-ram-64-thought-stack-20261019
Oct 19, 2026
Merged

AdaWorldAPI merged 2 commits into
mainfrom
docs/souffle-ram-64-thought-stack-20261019

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

Purpose

Plan a Soufflé AST → RAM (Relational Algebra Machine) inspired compiler layer for the existing 64-thought epistemic substrate, without introducing a second production engine. Assimilate the Datalog-compatible semantics of Atomese, MeTTa and Narsese into bound relational operations; reuse Datafrog as the existing semi-naive oracle; lower eligible plans through RelAlg/quack → R2IL → mask-risc.

Key insight: compiler loops and Datalog fixpoint iterations execute within a thought. The 6-bit W field identifies a currently resident speculative thought (0 = givens, 1..63 hypotheses); it does not cap recursion at 64 steps. Compile-time liveness may recycle slots only after semantic consumers finish and versioned receipts survive.

Added

  • .claude/plans/souffle-ram-64-thought-stack-v1.md: D-SRAM-0..7 staged integration, Soufflé AST/ast2ram/RAM harvest, front-end semantic subset, magic-set and SCC/stratification candidates, physical lowering constraints, thought-liveness scheduling, D-TGA/docs(plan): Git porcelain for epistemic algebra, causal Pickaxe and Lance 13 history #1605 Git integration, performance accounting and explicit stop conditions.
  • docs/research/souffle-ram-64-thought-falsifiers.md: 32 preregistered symbolic oracle/negative-control cases. None has been executed.

Existing architecture respected

Verification

Docs-only PR. Verified that both files exist on the branch. Source references were checked against current repository plans and upstream Soufflé documentation. No compilation, benchmarks, runtime parity or generated tests are claimed.

Suggested review order

  1. Does the Soufflé-inspired compiler layer reuse the existing D-ASM AST owner and avoid an unapproved parallel IR?
  2. Can magic-set and binding analysis reduce to existing apertures/masks, with explicit refusal for a true foreign join?
  3. Is 0+63 live thought identities distinct enough from arbitrary AST depth and recursive fixpoint iterations?
  4. Can proposed chunking survive premise deletion, independent proofs, rebase and replay in docs(plan): Git porcelain for epistemic algebra, causal Pickaxe and Lance 13 history #1605?
  5. What minimum executable D-SRAM-0/1 probe earns the next implementation authorization?

No runtime code or upstream source copied. Soufflé UPL-1.0 licensing and origin notice are recorded for future source adaptation.

@coderabbitai

coderabbitai Bot commented Oct 19, 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: 1a4a6bc3-e395-415b-b15f-5cc9c9a089b1
  • 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 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-19T01:21:51.014350Z ad428a8 PR opened
ℹ️ 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ad428a801b

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

| D-SRAM-1 | Define a **conceptual bound AST → RAM-like schedule** for pure conjunctive selection, including bag vs set, address seal and negative dependencies | Same canonical answers and read sets on hand-built fixtures; every unsupported operation typed-refused |
| D-SRAM-2 | Prototype cold optimizer rewrites: SCC/strata, magic-set/aperture propagation, predicate ordering, safe dedup; keep optimizer out of hot path | `optimized == unoptimized == source oracle` for query **and** evidential roots; negative controls must fail when rewrite disabled |
| D-SRAM-3 | Investigate co-addressed physical selection and coordinate proof; exact R2IL `Program` reproducibility across eligible front ends | P1/P2 agree with scalar reference; P3 always refuses; no foreign-gather or phantom equal-row assumption |
| D-SRAM-4 | Hook recursive region scheduling to already-authorized d′ driver; compare with Datafrog, then Soufflé | Identical least fixpoint for set workloads, terminated cycles, consistent bag categorization; one thought remains live across many iterations |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove the prohibited d′ driver as the phase target

When D-SRAM-4 is implemented, this directs it into the d′ path, but the current source of truth at .claude/board/STATUS_BOARD.md:140 marks D-RA-4 as “VIOLATION — GATHER. DO NOT BUILD,” and .claude/plans/relalg-v1.md:63-71 defines that driver using the prohibited preimage hop. Waiting for a future gate in line 146 does not correct the target, so this phase should instead point to a replacement co-addressed recursion design under H14c/H14d or remain unresolved rather than calling d′ authorized.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in #1618 (f95c72fe): D-SRAM-4 is now OPEN/BLOCKED. It no longer targets d′ and waits for a co-addressed recursion design under H14c/H14d.


Generated by Claude Code

| --- | --- | --- |
| D-SRAM-0 | Inventory pinned Soufflé AST/ast2ram/RAM passes; map to D-ASM/D-RA/D-TGA owners and current shipped code; establish source notices | Explicit evidence for every mapped pass; no code imported; list gaps and superseded gather plans |
| D-SRAM-1 | Define a **conceptual bound AST → RAM-like schedule** for pure conjunctive selection, including bag vs set, address seal and negative dependencies | Same canonical answers and read sets on hand-built fixtures; every unsupported operation typed-refused |
| D-SRAM-2 | Prototype cold optimizer rewrites: SCC/strata, magic-set/aperture propagation, predicate ordering, safe dedup; keep optimizer out of hot path | `optimized == unoptimized == source oracle` for query **and** evidential roots; negative controls must fail when rewrite disabled |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Make disabled optimizer controls preserve semantic parity

For a correctness-preserving optimizer, disabling SCC/magic-set/reordering/dedup rewrites must still produce the same source-oracle answers; only the optimized plan shape or measured work should change. Requiring the negative controls to fail when a rewrite is disabled contradicts the immediately preceding optimized == unoptimized == source oracle gate and would make a correct unoptimized implementation fail the planned suite. The red controls should instead mutate a semantic guard, or explicitly assert only that the expected optimization is absent.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in #1618 (f95c72fe): the gate is split. With a rewrite disabled, answers must still match the oracle and only the expected plan shape disappears. Only disabling a semantic guard may turn a test red.


Generated by Claude Code

@AdaWorldAPI
AdaWorldAPI merged commit 1808970 into main Oct 19, 2026
4 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