Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,27 @@ versions, and the entries below say what each tag does and does not claim.

## Unreleased

- Source packages (#161, SPEC.md §10.5, `PK-01`..`PK-04`, language 1.2 only).
A project declares `[[source_package]]` tables (`package`, `version`, `kind`
`path`, `path`), each naming a member project of the workspace an optional
`lexlean-workspace.toml` at the repository root lists, and imports its
modules by their own Lean names (`\importmodule{LexLeanStd.Text}`). The lock
gains `[[source_package]]` rows (tree digest over the package's manifest and
source files, manifest digest, version, prefix, its own packages) that every
command recomputes; a changed byte or version is `LLC0105` naming both
digests, a pin for an undeclared package `LLC0106`, a module prefix claimed
twice `LLC0107`, a project or path outside the workspace rule `LLC0108`
(a symlink or an escaping path is `LLS8001`), and an import of a package the
scope does not declare `LLR3009`. A package definition is an ordinary
definition of the importing project: its own `production:` roots are not
roots of the importer and nothing is re-exported. `verify` replays the
package modules under the package's prefix, with the package as their
`origin` in the build manifest, the snapshot, and the attestation; `fmt`
never writes a package file. The schema change moves the language-1.2
compiler-semantics ID once; languages 1.0 and 1.1, and a language-1.2 project
without source packages, keep their bytes apart from that identity. The
register gains `PK-01`..`PK-04` (401 rows with `SL-01` and `LM-01`..`LM-03`, `LM-13`); `PK-05` (the `bootstrap/` pilot
imports `stdlib/`) follows #153 and #160.
- The first component of the compiler's own pipeline as language-1.2 source:
the exact axiom-output parser (SPEC.md §17.23, §22.5, `BS-01`, #92 step 4;
no new diagnostic code, no change to the language-1.2 identity).
Expand Down
9 changes: 9 additions & 0 deletions CONFORMANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,15 @@ the error registry does not sanction (R5, `ERRORS.md`).
| `OR-07` | `build` | An oracle that was not acquired, whose checkout is not the pin, that did not build, that crashed, was killed, overran its time (and with it everything it started), wrote nothing or an IR defining nothing, or whose generator failed without refusing a program, a fetch that fails leaving nothing that a later run takes for a checkout, a cache that is not the pin discarded and fetched once more, a transient failure of the network tried again twice and a permanent one not, and a comparison over no root or no case, are each unavailable and never validated, which fails the gate on the normative host and is reported as not validated elsewhere, while the oracle's own structured refusals are answers and a tool that is not meant to overrun its time is given a generous one; and a disagreement fails closed with a record of both sides' evidence for every difference. |
| `OR-08` | `build` | The oracle is validation evidence and an input to no identity: no file the shipped crate, the language data, the schemas, the compiler project, the committed examples' records, or the authority and ledger files hold names the oracle, its pinned commit, or its digest, so that planting any of them in any of those places fails audit-oracle-isolation; no input of the compiler-semantics ID names it, an oracle field in a build manifest, a preservation record, an attestation, a snapshot, a compiler input, or a GNAF certificate fails its closed schema, and no module of the conformance crate but the oracle's own uses it, so that removing it changes none of them. |

## packages

| ID | Level | Statement |
| --- | --- | --- |
| `PK-01` | `build` | A language-1.2 project that declares a source package by its identifier, version, kind `path`, and the member directory a `lexlean-workspace.toml` lists locks it by the tree digest of its manifest and source files, its manifest digest, its version, its module prefix, and its own packages, and the configuration and the lock read back to the bytes written; a project without a source package keeps its bytes, and a package of another kind, a source package in another language, a changed byte or version (LLC0105), an undeclared package (LLC0106), a module prefix claimed twice (LLC0107), a project or a package outside the workspace (LLC0108), a path that escapes it, and a symlink (LLS8001) are each refused with the named code. |
| `PK-02` | `build` | A module of a project imports only modules of its own project and modules of the packages the project declares, and a module of a package only modules of itself and of the packages its own manifest declares: a package module is a module of the importing project under its own module prefix, a module of a package the project does not declare fails with LLR3009, and an import cycle through a package fails with LLR3003. |
| `PK-03` | `build` | An importing project builds and verifies under the pinned Lean offline, and its package modules are generated, elaborated, replayed with `leanchecker`, and audited for their exact axioms under the package's module prefix with the package as their origin in the records; the source ID of the project changes with the pins, and no file of the package is written by `fmt`, `build`, or `verify`. |
| `PK-04` | `build` | A production root of the importing project whose closure reaches a definition of a package certifies and exports over that closure as it does for a definition of its own module, the `production:` roots of a package are not roots of the importing project, and the importer publishes no certificate of the package's own. |

## preservation

| ID | Level | Statement |
Expand Down
30 changes: 30 additions & 0 deletions ERRORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,30 @@ Duplicate module or case-folded path collision.

Class: `cli-configuration`. Exit code: 2.

## `LLC0105` --- Source package is not the package the lock pins

A source package's version, source, module prefix, manifest digest, tree digest, or declared packages differ from the lock's row, naming the package and both digests.

Class: `cli-configuration`. Exit code: 2.

## `LLC0106` --- Source package undeclared or declared with two sources

The lock pins a source package the project does not declare, or one identifier names two sources in the closure.

Class: `cli-configuration`. Exit code: 2.

## `LLC0107` --- Module prefix claimed by two sources

A module prefix is claimed by the project and a source package, or by two source packages, equal or one beneath the other, or an import names a module both the project and a package provide.

Class: `cli-configuration`. Exit code: 2.

## `LLC0108` --- Source package outside the workspace rule

A project that declares a source package is outside any workspace or is not a member of it, a package is not a member of the workspace, or the workspace file or a package is malformed.

Class: `cli-configuration`. Exit code: 2.

## `LLC0201` --- Production request malformed

A production request is not a closed `lexlean/production-request/1` document: an unknown or missing field, another spec, roots, targets, or evidence that are empty, unsorted, or repeated, a root, package, or path that is not of its form, or a package name used twice for one target.
Expand Down Expand Up @@ -256,6 +280,12 @@ Model artifact bytes violate the declared schema, type, or role.

Class: `language`. Exit code: 1.

## `LLR3009` --- Import of a module of a source package the importing scope does not declare

A module imports a module of a source package that the project, or the package the module belongs to, does not declare.

Class: `language`. Exit code: 1.

## `LLS8001` --- Path escape, symlink, special file, or filesystem identity conflict

Path escape, symlink, special file, or filesystem identity conflict.
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ nested byte-data declarations are not restricted by interactive defaults.
Project child timeout/output limits and full kernel/axiom verification remain
mandatory. These are generated backend settings, not caller-provided options.

## Source packages

A language-1.2 project imports the modules of another project of its workspace without copying them: `[[source_package]]` in `lexlean.toml` names a member directory listed by `lexlean-workspace.toml`, `lexlean.lock` pins the package by the digest of its manifest and source files, every command recomputes the pin, imports are closed to the project's own modules and the declared packages, and `verify` replays the package's modules under its module prefix with the package as their origin (SPEC.md §10.5, `PK-01`..`PK-04`; the workspace the cases use is [tests/packages/workspace](tests/packages/workspace/)).

## Examples that verify under the pinned toolchain

The [compiler/](compiler/) project defines the production realization calculus (SPEC.md §17.14) in LexLean and passes the same gates as an example; its hand-constructed target programs live under [compiler/fixtures/](compiler/fixtures/). Its `Gnaf` module states GNAF requests over that calculus (SPEC.md §17.15): the complete-system universe, machine contract, and objective order, all fixed before any optimizer, with a kernel-checked theorem that the universe is complete. The requests themselves live under [compiler/gnaf/](compiler/gnaf/), and [compiler/gnaf.manifest.json](compiler/gnaf.manifest.json) is the dependency manifest UOR-GNAF §20 requires. Its `Certification` module checks GNAF certificates (SPEC.md §17.18) under [compiler/certificates/](compiler/certificates/): a global optimum, an argmin, or a complete Pareto frontier is certified from evidence for every system of the universe rather than by enumerating it, with the soundness of the checker proved in [compiler/proofs/](compiler/proofs/); local normality, correctness, and representation-minimality are separate, weaker statuses, and an incomplete certificate names its first open obligation. The target fixtures' Rust packages (§17.16) live under [compiler/rust/](compiler/rust/).
Expand Down Expand Up @@ -138,7 +142,7 @@ just vv # the complete normative acceptance gate (SPEC.md §9.2)
just release # vv, then the §30 release criterion; refused until 1.0.0
```

All 398 registered conformance IDs are implemented and pass; `just vv` runs clean from a checkout with the pinned toolchain installed.
All 402 registered conformance IDs are implemented and pass; `just vv` runs clean from a checkout with the pinned toolchain installed.

The differential against the independent generator `lean4-prod` (SPEC.md §17.19, `OR-01`..`OR-08`) acquires it at its pinned commit: from the checkout `LEXLEAN_ORACLE_DIR` names, or by fetching the commit with `git` into the Cargo target directory (`LEXLEAN_ORACLE_CACHE` overrides), and builds it with the pinned Lean and Rust toolchains. It is validation evidence only and no input to any identity. An oracle that cannot be acquired, is not the pinned files, or fails is unavailable: that fails the gate on Linux x86-64 and is printed as `NOT VALIDATED` elsewhere, and is never reported as agreement.

Expand Down Expand Up @@ -180,6 +184,7 @@ Every row is validated by `just vv`; the IDs link the claim to its register row,
| The runtime of generated Lean as native modules: the portable, collection, model, and reasoning runtimes of language 1.2 are LexLean source that every generated module imports, migrated losslessly and audited against their exact axioms, the released runtime text of languages 1.0 and 1.1 is frozen data equal to their released output, and no other Lean runtime text remains in the compiler but the decoder of core module 2 | `RT-01`..`RT-04` | `build` |
| The standard library: language-1.2 source beside the compiler whose members are certified production roots, each validated against Rust's standard library by a seeded differential of its evaluator and rustc realizations; bytes and text over `Bytes` | `SL-01` | `build` |
| The bootstrap project: the compiler's own components as language-1.2 source compiled by LexLean's production pipeline to certified Rust packages, the first being the exact axiom-output parser and its closed Lean-name check, each held to the Rust it replaces (the stage-0 oracle) by the committed golden vectors and a seeded differential of its evaluator and rustc realizations, with planted defects detected and the production export committed | `BS-01` | `build` |
| Source packages: a language-1.2 project imports the modules of a locked, content-addressed package of its workspace: `[[source_package]]` and `lexlean-workspace.toml`, the pins in `lexlean.lock` recomputed by every command, imports closed at link, no re-export of a package's production roots, and the package's modules replayed by the importer's `verify` with their origin in the records | `PK-01`..`PK-04` | `build` |
| The literal `nat-add-zero` example, the Lean-verified feature examples, and the complete negative fixture suite | `EX-01`..`EX-08` | `build` |
| Language-1.2 text components, first slice: tokenizers and their round-trip laws, with the laws carried as one native core module the generated modules import rather than authored Lean text (context windows, text generators, text classifiers, adapters, and composition follow in their own slices and add their rows then) | `LM-01`, `LM-02`, `LM-03`, `LM-13` | `build` |

Expand Down
Loading
Loading