Skip to content

BS-71: the model declarations as source (SemanticModels) - #496

Draft
humuhumu33 wants to merge 15 commits into
claude/issue-269-semantic-declsfrom
claude/issue-269-semantic-models
Draft

humuhumu33 wants to merge 15 commits into
claude/issue-269-semantic-declsfrom
claude/issue-269-semantic-models

Conversation

@humuhumu33

Copy link
Copy Markdown
Contributor

BS-71 is the seventh slice of the typed IR of #269, stacked on #491 (BS-70). It covers the artifact, contract, realization, evidence and model declarations of the semantic-module language (§17.12), with the twenty types they hold:

  • artifact roles and schemas;
  • binders, states and validators;
  • uses and rules;
  • the statistical, neural and composite realization descriptors, with their layers, decoders, forms and junctions;
  • evidence claims.

They are language-1.2 source in bootstrap/src/SemanticModels.lex.tex.

Root Oracle Effects
modelDeclarationText canonical JSON of the serde form of those SemanticDeclaration variants allocation, overflow, recursion

Generated from one description: the module, the case's Rust encoders and the case's example builders all come from one schema of the oracle's types (a generator script kept in the session's scratch folder, not committed). Where that schema and the oracle disagree, the case fails to encode or compare.

The case is crates/conformance/src/cases/bootstrap/semantic_models.rs. Its runs:

  • 150 examples whose step's digits pick every variant at every depth, each optional member present and absent, and each list empty and not;
  • every committed model-family declaration;
  • seeded examples.

It also plants 35 defects: each one misspells a serialized kind or name, and the first example holding that kind or name catches it.

State: draft, for the parent's batch.

  • lexlean check and fmt --check pass.
  • The gates and the cases run on case/ir-bs71 (BS-65..71).

🤖 Generated with Claude Code

humuhumu33 and others added 2 commits November 12, 2026 15:14
The artifact, contract, realization, evidence and model declarations of the
semantic module language (SPEC.md §17.12) with the twenty types they hold,
as language-1.2 source in bootstrap/, seventh slice of the typed IR (#269):
modelDeclarationText of SemanticModels, held to the canonical JSON of their
serde form. The module and the case encoders and examples are generated from
one description of the oracle types (scratch schemagen.py / gen71.py); 35
planted defects.

Register row (500), SPEC §31 row and §17.23 prose, scenario, bdd part and
lane, README count and range, CHANGELOG, VERIFICATION record, roots, the
register-count mirrors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
humuhumu33 and others added 13 commits November 12, 2026 15:46
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lders

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The stack-bound step of the regeneration maps a package to its root by name,
so a root is the camel case of its package and unique in the project:
semanticTermText, semanticProofText, semanticDeclarationText,
semanticModuleText, and wholeSemanticModuleText.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

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