From 9e2c8b3270175f1900a5fed5143938a31e091686 Mon Sep 17 00:00:00 2001 From: Alex Flom Date: Mon, 2 Nov 2026 18:57:37 -0700 Subject: [PATCH 1/2] Adopt the v0.5 Host source package and remove mirrored types --- .github/lexlean-revision | 2 +- AGENTS.md | 4 +- README.md | 8 + Rule30-Core.pdf | Bin 58973 -> 58973 bytes Rule30-Observations.pdf | Bin 273782 -> 273782 bytes Rule30-Paper.pdf | Bin 969094 -> 969094 bytes lexlean-stdlib/lexlean.toml | 2 +- lexlean-stdlib/src/Host.lex.tex | 95 ++++++++ pdf-manifest.json | 10 +- rule30-api/lexlean.lock | 6 +- rule30-api/model/dependencies.toml | 2 +- rule30-api/model/standards.toml | 2 +- rule30-api/production/request.json | 30 +-- rule30-api/production/research-request.json | 6 +- rule30-api/src/Host.lex.tex | 253 +++++--------------- rule30-api/src/R30.lex.tex | 35 +-- rule30-api/src/R30Traces.lex.tex | 93 +++---- rule30-api/src/R30TracesForms.lex.tex | 3 +- rule30-api/src/ResearchCatalog.lex.tex | 4 +- rule30-api/src/ResearchTraces.lex.tex | 2 +- rule30-api/src/Standards.lex.tex | 4 +- rule30-lexlean/Core.pdf | Bin 58973 -> 58973 bytes rule30-lexlean/lexlean.lock | 2 +- rule30-lexlean/pdf/Core.pdf | Bin 58973 -> 58973 bytes rule30-paper/Observations.pdf | Bin 273782 -> 273782 bytes rule30-paper/Paper.pdf | Bin 969094 -> 969094 bytes rule30-paper/lexlean.lock | 2 +- rule30-paper/pdf/Observations.pdf | Bin 273782 -> 273782 bytes rule30-paper/pdf/Paper.pdf | Bin 969094 -> 969094 bytes tools/r30/production.py | 4 +- 30 files changed, 265 insertions(+), 304 deletions(-) create mode 100644 lexlean-stdlib/src/Host.lex.tex diff --git a/.github/lexlean-revision b/.github/lexlean-revision index 71cffd2..c609295 100644 --- a/.github/lexlean-revision +++ b/.github/lexlean-revision @@ -1 +1 @@ -387735155da360cc8264e24dbfe005a031b9e8e8 +7037c54838e47c999b64fbae4458ac26aea82347 diff --git a/AGENTS.md b/AGENTS.md index fdcba8e..f588880 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -106,12 +106,12 @@ the registers. Never add a `.py` file or a shell script, and never extend `tools `scripts/*.py` or the shell glue: the pre-commit authoring policy refuses a commit that adds a Python file or grows the Python it touches, with no bypass. -At the pinned compiler (0.4.0, revision 3877351) a production root compiles to a Rust library +At the pinned compiler (the release/v0.5 development line, revision 7037c54) a production root compiles to a Rust library with no `main` and no effects beyond allocation, overflow and recursion: no files, processes, arguments or exit codes. An executable entry for a root that reads files and runs `lake`, `lexlean` and `git` is LexLean issue #271 (the effects boundary). So the logic moves into LexLean now, as authored modules with certified roots, and the remaining Python and shell glue is deleted -as LexLean gains the effect boundary and rule30 pins it. A capability LexLean, PrismPM or +as the effect boundary is implemented on our v0.5-based LexLean branch. The vendored LexLeanStd.Host types are the upstream PR #396 interface; they are imported directly rather than mirrored in Rule30Api.Host. A capability LexLean, PrismPM or prism-stdlib cannot yet express is an upstream issue for those projects, never a reason for new Python or shell. The logic already moved: the command surface, the register, the converter (`rule30-api/src/Convert.lex.tex`), the engine's learning rule and schedule diff --git a/README.md b/README.md index f461068..99780d6 100644 --- a/README.md +++ b/README.md @@ -287,3 +287,11 @@ writes to `dist/`; the pre-commit gate publishes those outputs to all tracked PD ### Automated Releases Pushing any version tag `v*` (e.g. `v0.1`) triggers [`.github/workflows/release.yml`](.github/workflows/release.yml), which builds `rule30-core-lean`, `Rule30PrizeKit/lean`, and `rule30-bridge`, compiles `Rule30-Paper.pdf` and `Rule30-Core.pdf`, packages the verified LexLean bundles, and attaches all PDFs and LexLean artifacts to the GitHub Release. + +The compiler development pin follows LexLean `release/v0.5` through +[the Host interface contribution](https://github.com/UOR-Foundation/LexLean/pull/396). +The API imports `LexLeanStd.Host` from the pinned source package; its local +`Host` module contains only the application harness. The attention catalog +covers all 30 application and library modules. The generated executable +driver and research executor integration are still required. CI and runtime +use deterministic local tools and no remote models. diff --git a/Rule30-Core.pdf b/Rule30-Core.pdf index 015e9f12812c047d7dd6e3efca8141f266a471cb..b7847f47c4c437504012fed89697139171fa01f5 100644 GIT binary patch delta 122 zcmcb6hWYLp<_&XiDjAxZnwmvva_Rf#r?@1Rq$+5*SQ!}@nHd@y7#n~kH}Ah$!s%>b t;%H=SY;0m~X6b0+=H}>Z;A&)SXzXNc>SSQ%Z0KyKU_(gB=Ca4nnE=DyB4Pjl delta 122 zcmcb6hWYLp<_&XiDj66U7@J0Ea_Rf#r?@1Rq$+5*SQ!}@nHd@y7z5>ilAHJ6Ea7x^ ubTct=aWOM8HZ?Fdv~V{Hny}hH8U|bGcz}|Q?MbVWOLc$=S%>u9U;sB diff --git a/Rule30-Observations.pdf b/Rule30-Observations.pdf index 5a6eb4037248c2dd695ebefee415e701fc96c8bd..d5efeb7c81947edb09af474e73cd3c4076279660 100644 GIT binary patch delta 113 zcmex%OW@lrfrb{w7N!>FEi5r2tcIp$21e5pMOY*t%J%$*I)Oic|; kU0hsEU0p3*Eu9RUoLpQ?EDX)<6l^RBDA``A$nuvP03IFEi5r2tOf=KCWg}!MOY*t% delta 132 zcmZphY~425x}k-!g{g(Pg{6hHg{_6Xg` (ctor Option.some [Start] (record Start {arguments := arguments, directory := directory, executable := executable, environment := environment, stderrTerminal := terminal})) - | Event.read o => (ctor Option.none [Start]) - | Event.wrote o => (ctor Option.none [Start]) - | Event.listed o => (ctor Option.none [Start]) - | Event.stated o => (ctor Option.none [Start]) - | Event.createdDir o => (ctor Option.none [Start]) - | Event.removedFile o => (ctor Option.none [Start]) - | Event.removedTree o => (ctor Option.none [Start]) - | Event.renamed o => (ctor Option.none [Start]) - | Event.canonicalized o => (ctor Option.none [Start]) - | Event.locked o => (ctor Option.none [Start]) - | Event.spawned o => (ctor Option.none [Start]) - | Event.waited o => (ctor Option.none [Start]) - | Event.stopped o => (ctor Option.none [Start])), + | LexLeanStd.Host::Event.start arguments directory executable environment terminal => (ctor Option.some [Start] (record Start {arguments := arguments, directory := directory, executable := executable, environment := environment, stderrTerminal := terminal})) + | LexLeanStd.Host::Event.read o => (ctor Option.none [Start]) + | LexLeanStd.Host::Event.wrote o => (ctor Option.none [Start]) + | LexLeanStd.Host::Event.listed o => (ctor Option.none [Start]) + | LexLeanStd.Host::Event.stated o => (ctor Option.none [Start]) + | LexLeanStd.Host::Event.createdDir o => (ctor Option.none [Start]) + | LexLeanStd.Host::Event.removedFile o => (ctor Option.none [Start]) + | LexLeanStd.Host::Event.removedTree o => (ctor Option.none [Start]) + | LexLeanStd.Host::Event.renamed o => (ctor Option.none [Start]) + | LexLeanStd.Host::Event.canonicalized o => (ctor Option.none [Start]) + | LexLeanStd.Host::Event.locked o => (ctor Option.none [Start]) + | LexLeanStd.Host::Event.spawned o => (ctor Option.none [Start]) + | LexLeanStd.Host::Event.waited o => (ctor Option.none [Start]) + | LexLeanStd.Host::Event.stopped o => (ctor Option.none [Start])), executable: true } definition{ name: asRead, - parameters: [event : Event], - result: (Option (Result Bytes Failure)), + parameters: [event : LexLeanStd.Host::Event], + result: (Option (Result Bytes LexLeanStd.Host::Failure)), body: (match event - | Event.start arguments directory executable environment terminal => (ctor Option.none [(Result Bytes Failure)]) - | Event.read o => (ctor Option.some [(Result Bytes Failure)] o) - | Event.wrote o => (ctor Option.none [(Result Bytes Failure)]) - | Event.listed o => (ctor Option.none [(Result Bytes Failure)]) - | Event.stated o => (ctor Option.none [(Result Bytes Failure)]) - | Event.createdDir o => (ctor Option.none [(Result Bytes Failure)]) - | Event.removedFile o => (ctor Option.none [(Result Bytes Failure)]) - | Event.removedTree o => (ctor Option.none [(Result Bytes Failure)]) - | Event.renamed o => (ctor Option.none [(Result Bytes Failure)]) - | Event.canonicalized o => (ctor Option.none [(Result Bytes Failure)]) - | Event.locked o => (ctor Option.none [(Result Bytes Failure)]) - | Event.spawned o => (ctor Option.none [(Result Bytes Failure)]) - | Event.waited o => (ctor Option.none [(Result Bytes Failure)]) - | Event.stopped o => (ctor Option.none [(Result Bytes Failure)])), + | LexLeanStd.Host::Event.start arguments directory executable environment terminal => (ctor Option.none [(Result Bytes LexLeanStd.Host::Failure)]) + | LexLeanStd.Host::Event.read o => (ctor Option.some [(Result Bytes LexLeanStd.Host::Failure)] o) + | LexLeanStd.Host::Event.wrote o => (ctor Option.none [(Result Bytes LexLeanStd.Host::Failure)]) + | LexLeanStd.Host::Event.listed o => (ctor Option.none [(Result Bytes LexLeanStd.Host::Failure)]) + | LexLeanStd.Host::Event.stated o => (ctor Option.none [(Result Bytes LexLeanStd.Host::Failure)]) + | LexLeanStd.Host::Event.createdDir o => (ctor Option.none [(Result Bytes LexLeanStd.Host::Failure)]) + | LexLeanStd.Host::Event.removedFile o => (ctor Option.none [(Result Bytes LexLeanStd.Host::Failure)]) + | LexLeanStd.Host::Event.removedTree o => (ctor Option.none [(Result Bytes LexLeanStd.Host::Failure)]) + | LexLeanStd.Host::Event.renamed o => (ctor Option.none [(Result Bytes LexLeanStd.Host::Failure)]) + | LexLeanStd.Host::Event.canonicalized o => (ctor Option.none [(Result Bytes LexLeanStd.Host::Failure)]) + | LexLeanStd.Host::Event.locked o => (ctor Option.none [(Result Bytes LexLeanStd.Host::Failure)]) + | LexLeanStd.Host::Event.spawned o => (ctor Option.none [(Result Bytes LexLeanStd.Host::Failure)]) + | LexLeanStd.Host::Event.waited o => (ctor Option.none [(Result Bytes LexLeanStd.Host::Failure)]) + | LexLeanStd.Host::Event.stopped o => (ctor Option.none [(Result Bytes LexLeanStd.Host::Failure)])), executable: true } definition{ name: asStated, - parameters: [event : Event], - result: (Option (Result Stat Failure)), + parameters: [event : LexLeanStd.Host::Event], + result: (Option (Result LexLeanStd.Host::Stat LexLeanStd.Host::Failure)), body: (match event - | Event.start arguments directory executable environment terminal => (ctor Option.none [(Result Stat Failure)]) - | Event.read o => (ctor Option.none [(Result Stat Failure)]) - | Event.wrote o => (ctor Option.none [(Result Stat Failure)]) - | Event.listed o => (ctor Option.none [(Result Stat Failure)]) - | Event.stated o => (ctor Option.some [(Result Stat Failure)] o) - | Event.createdDir o => (ctor Option.none [(Result Stat Failure)]) - | Event.removedFile o => (ctor Option.none [(Result Stat Failure)]) - | Event.removedTree o => (ctor Option.none [(Result Stat Failure)]) - | Event.renamed o => (ctor Option.none [(Result Stat Failure)]) - | Event.canonicalized o => (ctor Option.none [(Result Stat Failure)]) - | Event.locked o => (ctor Option.none [(Result Stat Failure)]) - | Event.spawned o => (ctor Option.none [(Result Stat Failure)]) - | Event.waited o => (ctor Option.none [(Result Stat Failure)]) - | Event.stopped o => (ctor Option.none [(Result Stat Failure)])), + | LexLeanStd.Host::Event.start arguments directory executable environment terminal => (ctor Option.none [(Result LexLeanStd.Host::Stat LexLeanStd.Host::Failure)]) + | LexLeanStd.Host::Event.read o => (ctor Option.none [(Result LexLeanStd.Host::Stat LexLeanStd.Host::Failure)]) + | LexLeanStd.Host::Event.wrote o => (ctor Option.none [(Result LexLeanStd.Host::Stat LexLeanStd.Host::Failure)]) + | LexLeanStd.Host::Event.listed o => (ctor Option.none [(Result LexLeanStd.Host::Stat LexLeanStd.Host::Failure)]) + | LexLeanStd.Host::Event.stated o => (ctor Option.some [(Result LexLeanStd.Host::Stat LexLeanStd.Host::Failure)] o) + | LexLeanStd.Host::Event.createdDir o => (ctor Option.none [(Result LexLeanStd.Host::Stat LexLeanStd.Host::Failure)]) + | LexLeanStd.Host::Event.removedFile o => (ctor Option.none [(Result LexLeanStd.Host::Stat LexLeanStd.Host::Failure)]) + | LexLeanStd.Host::Event.removedTree o => (ctor Option.none [(Result LexLeanStd.Host::Stat LexLeanStd.Host::Failure)]) + | LexLeanStd.Host::Event.renamed o => (ctor Option.none [(Result LexLeanStd.Host::Stat LexLeanStd.Host::Failure)]) + | LexLeanStd.Host::Event.canonicalized o => (ctor Option.none [(Result LexLeanStd.Host::Stat LexLeanStd.Host::Failure)]) + | LexLeanStd.Host::Event.locked o => (ctor Option.none [(Result LexLeanStd.Host::Stat LexLeanStd.Host::Failure)]) + | LexLeanStd.Host::Event.spawned o => (ctor Option.none [(Result LexLeanStd.Host::Stat LexLeanStd.Host::Failure)]) + | LexLeanStd.Host::Event.waited o => (ctor Option.none [(Result LexLeanStd.Host::Stat LexLeanStd.Host::Failure)]) + | LexLeanStd.Host::Event.stopped o => (ctor Option.none [(Result LexLeanStd.Host::Stat LexLeanStd.Host::Failure)])), executable: true } @@ -417,11 +272,11 @@ definition{ name: realize, parameters: [draft : Draft], - result: Request, + result: LexLeanStd.Host::Request, body: (match draft - | Draft.read path => (ctor Request.read (render path)) - | Draft.stat path => (ctor Request.stat (render path)) - | Draft.exit status output errors => (ctor Request.exit status (render output) (render errors))), + | Draft.read path => (ctor LexLeanStd.Host::Request.read (render path)) + | Draft.stat path => (ctor LexLeanStd.Host::Request.stat (render path)) + | Draft.exit status output errors => (ctor LexLeanStd.Host::Request.exit status (render output) (render errors))), axioms: [Quot.sound, propext], executable: true } @@ -429,7 +284,7 @@ definition{ name: traceFrom, type_parameters: [S, R], - parameters: [step : (Fn ((Option 'S) Event) ('S * 'R)), final : (Fn ('R) Bool), state : (Option 'S), events : (List Event), fuel : Nat], + parameters: [step : (Fn ((Option 'S) LexLeanStd.Host::Event) ('S * 'R)), final : (Fn ('R) Bool), state : (Option 'S), events : (List LexLeanStd.Host::Event), fuel : Nat], result: (List 'R), body: (match events | List.nil => (nil 'R) @@ -442,7 +297,7 @@ definition{ name: trace, type_parameters: [S, R], - parameters: [step : (Fn ((Option 'S) Event) ('S * 'R)), final : (Fn ('R) Bool), events : (List Event), fuel : Nat], + parameters: [step : (Fn ((Option 'S) LexLeanStd.Host::Event) ('S * 'R)), final : (Fn ('R) Bool), events : (List LexLeanStd.Host::Event), fuel : Nat], result: (List 'R), body: (traceFrom ['S, 'R] step final (ctor Option.none ['S]) events fuel) } diff --git a/rule30-api/src/R30.lex.tex b/rule30-api/src/R30.lex.tex index 2b9eed5..64ee85a 100644 --- a/rule30-api/src/R30.lex.tex +++ b/rule30-api/src/R30.lex.tex @@ -2,6 +2,7 @@ \useglossary{lexlean.std.bool@1.2.0} \useglossary{lexlean.std.nat@1.2.0} \importmodule{Host} +\importmodule{LexLeanStd.Host} \importmodule{Toml} \title{Boolean} \begin{semanticmodule} @@ -776,31 +777,31 @@ definition{ name: failureText, - parameters: [kind : Host::FailureKind], + parameters: [kind : LexLeanStd.Host::FailureKind], result: String, body: (match kind - | Host::FailureKind.notFound => "not found" - | Host::FailureKind.denied => "permission denied" - | Host::FailureKind.invalid => "invalid path" - | Host::FailureKind.other => "failed"), + | LexLeanStd.Host::FailureKind.notFound => "not found" + | LexLeanStd.Host::FailureKind.denied => "permission denied" + | LexLeanStd.Host::FailureKind.invalid => "invalid path" + | LexLeanStd.Host::FailureKind.other => "failed"), executable: true } definition{ name: isNotFound, - parameters: [kind : Host::FailureKind], + parameters: [kind : LexLeanStd.Host::FailureKind], result: Bool, body: (match kind - | Host::FailureKind.notFound => true - | Host::FailureKind.denied => false - | Host::FailureKind.invalid => false - | Host::FailureKind.other => false), + | LexLeanStd.Host::FailureKind.notFound => true + | LexLeanStd.Host::FailureKind.denied => false + | LexLeanStd.Host::FailureKind.invalid => false + | LexLeanStd.Host::FailureKind.other => false), executable: true } definition{ name: failureDetail, - parameters: [path : (List Host::Piece), failure : Host::Failure], + parameters: [path : (List Host::Piece), failure : LexLeanStd.Host::Failure], result: (List Host::Piece), body: (prim append path (cons (ctor Host::Piece.literal ": ") (cons (ctor Host::Piece.literal (failureText (project failure kind))) (if ((prim length (project failure message) : Nat) =? 0) then (nil Host::Piece) else (cons (ctor Host::Piece.literal " (") (cons (taken (project failure message)) (lit ")")))))) : (List Host::Piece)), executable: true @@ -824,7 +825,7 @@ definition{ name: probed, - parameters: [filter : (Option Bytes), level : Nat, top : Nat, outcome : (Result Host::Stat Host::Failure)], + parameters: [filter : (Option Bytes), level : Nat, top : Nat, outcome : (Result LexLeanStd.Host::Stat LexLeanStd.Host::Failure)], result: (Session * Host::Draft), body: (match outcome | Result.ok found => ((record Session {awaiting := (ctor Awaiting.register filter level)}), (ctor Host::Draft.read (registerAt level))) @@ -834,7 +835,7 @@ definition{ name: listing, - parameters: [filter : (Option Bytes), level : Nat, outcome : (Result Bytes Host::Failure)], + parameters: [filter : (Option Bytes), level : Nat, outcome : (Result Bytes LexLeanStd.Host::Failure)], result: (Session * Host::Draft), body: (let path : (List Host::Piece) := (registerAt level); (match outcome | Result.error failure => (failWith (registerUnreadable) (failureDetail path failure)) @@ -851,7 +852,7 @@ definition{ name: plan, - parameters: [state : (Option Session), event : Host::Event], + parameters: [state : (Option Session), event : LexLeanStd.Host::Event], result: (Session * Host::Draft), body: (match state | Option.none => (match (Host::asStart event) @@ -871,8 +872,8 @@ definition{ name: step, - parameters: [state : (Option Session), event : Host::Event], - result: (Session * Host::Request), + parameters: [state : (Option Session), event : LexLeanStd.Host::Event], + result: (Session * LexLeanStd.Host::Request), body: (let drafted : (Session * Host::Draft) := (plan state event); ((first drafted), (Host::realize (second drafted)))), axioms: [Quot.sound, propext], executable: true, @@ -881,7 +882,7 @@ theorem{ name: stepRealizesPlan, - parameters: [state : (Option Session), event : Host::Event], + parameters: [state : (Option Session), event : LexLeanStd.Host::Event], statement: ((step state event) = ((first (plan state event)), (Host::realize (second (plan state event))))), proof: reflexivity{}, axioms: [Quot.sound, propext] diff --git a/rule30-api/src/R30Traces.lex.tex b/rule30-api/src/R30Traces.lex.tex index 2966ad2..b90a146 100644 --- a/rule30-api/src/R30Traces.lex.tex +++ b/rule30-api/src/R30Traces.lex.tex @@ -2,6 +2,7 @@ \useglossary{lexlean.std.bool@1.2.0} \useglossary{lexlean.std.nat@1.2.0} \importmodule{Host} +\importmodule{LexLeanStd.Host} \importmodule{R30} \title{Boolean} \begin{semanticmodule} @@ -219,57 +220,57 @@ definition{ name: startedIn, parameters: [arguments : (List Bytes), directory : Bytes], - result: Host::Event, - body: (ctor Host::Event.start arguments directory (executablePath) (nil (Bytes * Bytes)) false) + result: LexLeanStd.Host::Event, + body: (ctor LexLeanStd.Host::Event.start arguments directory (executablePath) (nil (Bytes * Bytes)) false) } definition{ name: started, parameters: [arguments : (List Bytes)], - result: Host::Event, + result: LexLeanStd.Host::Event, body: (startedIn arguments (workDirectory)) } definition{ name: statedDirectory, parameters: [], - result: Host::Event, - body: (ctor Host::Event.stated (ctor Result.ok [Host::Stat, Host::Failure] (record Host::Stat {kind := (ctor Host::EntryKind.directory), size := 4096, device := 0, inode := 0}))) + result: LexLeanStd.Host::Event, + body: (ctor LexLeanStd.Host::Event.stated (ctor Result.ok [LexLeanStd.Host::Stat, LexLeanStd.Host::Failure] (record LexLeanStd.Host::Stat {kind := (ctor LexLeanStd.Host::EntryKind.directory), size := 4096, device := 0, inode := 0}))) } definition{ name: statedMissing, parameters: [], - result: Host::Event, - body: (ctor Host::Event.stated (ctor Result.error [Host::Stat, Host::Failure] (record Host::Failure {kind := (ctor Host::FailureKind.notFound), message := (noSuchFile)}))) + result: LexLeanStd.Host::Event, + body: (ctor LexLeanStd.Host::Event.stated (ctor Result.error [LexLeanStd.Host::Stat, LexLeanStd.Host::Failure] (record LexLeanStd.Host::Failure {kind := (ctor LexLeanStd.Host::FailureKind.notFound), message := (noSuchFile)}))) } definition{ name: statedFailed, - parameters: [kind : Host::FailureKind, message : Bytes], - result: Host::Event, - body: (ctor Host::Event.stated (ctor Result.error [Host::Stat, Host::Failure] (record Host::Failure {kind := kind, message := message}))) + parameters: [kind : LexLeanStd.Host::FailureKind, message : Bytes], + result: LexLeanStd.Host::Event, + body: (ctor LexLeanStd.Host::Event.stated (ctor Result.error [LexLeanStd.Host::Stat, LexLeanStd.Host::Failure] (record LexLeanStd.Host::Failure {kind := kind, message := message}))) } definition{ name: listedNothing, parameters: [], - result: Host::Event, - body: (ctor Host::Event.listed (ctor Result.ok [(List Bytes), Host::Failure] (nil Bytes))) + result: LexLeanStd.Host::Event, + body: (ctor LexLeanStd.Host::Event.listed (ctor Result.ok [(List Bytes), LexLeanStd.Host::Failure] (nil Bytes))) } definition{ name: readOk, parameters: [contents : Bytes], - result: Host::Event, - body: (ctor Host::Event.read (ctor Result.ok [Bytes, Host::Failure] contents)) + result: LexLeanStd.Host::Event, + body: (ctor LexLeanStd.Host::Event.read (ctor Result.ok [Bytes, LexLeanStd.Host::Failure] contents)) } definition{ name: readFailed, - parameters: [kind : Host::FailureKind, message : Bytes], - result: Host::Event, - body: (ctor Host::Event.read (ctor Result.error [Bytes, Host::Failure] (record Host::Failure {kind := kind, message := message}))) + parameters: [kind : LexLeanStd.Host::FailureKind, message : Bytes], + result: LexLeanStd.Host::Event, + body: (ctor LexLeanStd.Host::Event.read (ctor Result.error [Bytes, LexLeanStd.Host::Failure] (record LexLeanStd.Host::Failure {kind := kind, message := message}))) } definition{ @@ -344,7 +345,7 @@ definition{ name: run, - parameters: [events : (List Host::Event)], + parameters: [events : (List LexLeanStd.Host::Event)], result: (List Host::Draft), body: (Host::trace [R30::Session, Host::Draft] (ref R30::plan) (ref Host::isExit) events 8), axioms: [propext] @@ -354,7 +355,7 @@ name: listRun, parameters: [arguments : (List Bytes), register : Bytes], result: (List Host::Draft), - body: (run (cons (started (cons (argFrontier) (cons (argList) arguments))) (cons (statedDirectory) (cons (readOk register) (nil Host::Event))))), + body: (run (cons (started (cons (argFrontier) (cons (argList) arguments))) (cons (statedDirectory) (cons (readOk register) (nil LexLeanStd.Host::Event))))), axioms: [propext] } @@ -368,7 +369,7 @@ theorem{ name: traceHelp, parameters: [], - statement: ((Host::traceAgrees (run (cons (started (cons (argHelp) (nil Bytes))) (nil Host::Event))) (cons (exited (0 : UInt8) (R30::lit (R30::usage)) (nil Host::Piece)) (nil Host::Draft))) = true), + statement: ((Host::traceAgrees (run (cons (started (cons (argHelp) (nil Bytes))) (nil LexLeanStd.Host::Event))) (cons (exited (0 : UInt8) (R30::lit (R30::usage)) (nil Host::Piece)) (nil Host::Draft))) = true), proof: decide{}, axioms: [propext] } @@ -376,7 +377,7 @@ theorem{ name: traceHelpFlag, parameters: [], - statement: ((Host::traceAgrees (run (cons (started (cons (argHelpFlag) (nil Bytes))) (nil Host::Event))) (cons (exited (0 : UInt8) (R30::lit (R30::usage)) (nil Host::Piece)) (nil Host::Draft))) = true), + statement: ((Host::traceAgrees (run (cons (started (cons (argHelpFlag) (nil Bytes))) (nil LexLeanStd.Host::Event))) (cons (exited (0 : UInt8) (R30::lit (R30::usage)) (nil Host::Piece)) (nil Host::Draft))) = true), proof: decide{}, axioms: [propext] } @@ -384,7 +385,7 @@ theorem{ name: traceNoArguments, parameters: [], - statement: ((Host::traceAgrees (run (cons (started (nil Bytes)) (nil Host::Event))) (cons (exited (0 : UInt8) (R30::lit (R30::usage)) (nil Host::Piece)) (nil Host::Draft))) = true), + statement: ((Host::traceAgrees (run (cons (started (nil Bytes)) (nil LexLeanStd.Host::Event))) (cons (exited (0 : UInt8) (R30::lit (R30::usage)) (nil Host::Piece)) (nil Host::Draft))) = true), proof: decide{}, axioms: [propext] } @@ -392,7 +393,7 @@ theorem{ name: traceStopsAtExit, parameters: [], - statement: ((Host::traceAgrees (run (cons (started (cons (argHelp) (nil Bytes))) (cons (readOk (fixtureOne)) (nil Host::Event)))) (cons (exited (0 : UInt8) (R30::lit (R30::usage)) (nil Host::Piece)) (nil Host::Draft))) = true), + statement: ((Host::traceAgrees (run (cons (started (cons (argHelp) (nil Bytes))) (cons (readOk (fixtureOne)) (nil LexLeanStd.Host::Event)))) (cons (exited (0 : UInt8) (R30::lit (R30::usage)) (nil Host::Piece)) (nil Host::Draft))) = true), proof: decide{}, axioms: [propext] } @@ -400,7 +401,7 @@ theorem{ name: traceVersion, parameters: [], - statement: ((Host::traceAgrees (run (cons (started (cons (argVersion) (nil Bytes))) (nil Host::Event))) (cons (exited (0 : UInt8) (cons (piece "r30 ") (cons (piece "0.1.0") (cons (piece "\n") (nil Host::Piece)))) (nil Host::Piece)) (nil Host::Draft))) = true), + statement: ((Host::traceAgrees (run (cons (started (cons (argVersion) (nil Bytes))) (nil LexLeanStd.Host::Event))) (cons (exited (0 : UInt8) (cons (piece "r30 ") (cons (piece "0.1.0") (cons (piece "\n") (nil Host::Piece)))) (nil Host::Piece)) (nil Host::Draft))) = true), proof: decide{}, axioms: [propext] } @@ -408,7 +409,7 @@ theorem{ name: traceVersionArguments, parameters: [], - statement: ((Host::traceAgrees (run (cons (started (cons (argVersion) (cons (argFrontier) (nil Bytes)))) (nil Host::Event))) (cons (refusedWith (cons (piece "version takes no arguments") (nil Host::Piece))) (nil Host::Draft))) = true), + statement: ((Host::traceAgrees (run (cons (started (cons (argVersion) (cons (argFrontier) (nil Bytes)))) (nil LexLeanStd.Host::Event))) (cons (refusedWith (cons (piece "version takes no arguments") (nil Host::Piece))) (nil Host::Draft))) = true), proof: decide{}, axioms: [propext] } @@ -416,7 +417,7 @@ theorem{ name: traceStatusWithoutValue, parameters: [], - statement: ((Host::traceAgrees (run (cons (started (cons (argFrontier) (cons (argList) (cons (argStatus) (nil Bytes))))) (nil Host::Event))) (cons (refusedWith (cons (piece "argument --status of frontier list expects one value") (nil Host::Piece))) (nil Host::Draft))) = true), + statement: ((Host::traceAgrees (run (cons (started (cons (argFrontier) (cons (argList) (cons (argStatus) (nil Bytes))))) (nil LexLeanStd.Host::Event))) (cons (refusedWith (cons (piece "argument --status of frontier list expects one value") (nil Host::Piece))) (nil Host::Draft))) = true), proof: decide{}, axioms: [propext] } @@ -424,7 +425,7 @@ theorem{ name: traceListHelp, parameters: [], - statement: ((Host::traceAgrees (run (cons (started (cons (argFrontier) (cons (argList) (cons (argBogus) (cons (argHelpFlag) (nil Bytes)))))) (nil Host::Event))) (cons (exited (0 : UInt8) (R30::lit "usage: r30 frontier list [-h] [--status STATUS]\n\noptions:\n -h, --help show this help message and exit\n --status STATUS\n") (nil Host::Piece)) (nil Host::Draft))) = true), + statement: ((Host::traceAgrees (run (cons (started (cons (argFrontier) (cons (argList) (cons (argBogus) (cons (argHelpFlag) (nil Bytes)))))) (nil LexLeanStd.Host::Event))) (cons (exited (0 : UInt8) (R30::lit "usage: r30 frontier list [-h] [--status STATUS]\n\noptions:\n -h, --help show this help message and exit\n --status STATUS\n") (nil Host::Piece)) (nil Host::Draft))) = true), proof: decide{}, axioms: [propext] } @@ -432,7 +433,7 @@ theorem{ name: traceRootMissing, parameters: [], - statement: ((Host::traceAgrees (run (cons (started (cons (argFrontier) (cons (argList) (nil Bytes)))) (cons (statedMissing) (cons (statedMissing) (cons (readOk (fixtureOne)) (nil Host::Event)))))) (cons (statsGit) (cons (statsGitAbove) (cons (exited (1 : UInt8) (nil Host::Piece) (expectError "R301004" "Register cannot be read" (cons (piece "frontier.toml: no directory at or above the working directory holds .git") (nil Host::Piece)))) (nil Host::Draft))))) = true), + statement: ((Host::traceAgrees (run (cons (started (cons (argFrontier) (cons (argList) (nil Bytes)))) (cons (statedMissing) (cons (statedMissing) (cons (readOk (fixtureOne)) (nil LexLeanStd.Host::Event)))))) (cons (statsGit) (cons (statsGitAbove) (cons (exited (1 : UInt8) (nil Host::Piece) (expectError "R301004" "Register cannot be read" (cons (piece "frontier.toml: no directory at or above the working directory holds .git") (nil Host::Piece)))) (nil Host::Draft))))) = true), proof: decide{}, axioms: [propext] } @@ -440,7 +441,7 @@ theorem{ name: traceRegisterUnreadable, parameters: [], - statement: ((Host::traceAgrees (run (cons (started (cons (argFrontier) (cons (argList) (nil Bytes)))) (cons (statedDirectory) (cons (readFailed (ctor Host::FailureKind.notFound) (noSuchFile)) (nil Host::Event))))) (listedAs (exited (1 : UInt8) (nil Host::Piece) (expectError "R301004" "Register cannot be read" (cons (piece "frontier.toml") (cons (piece ": ") (cons (piece "not found") (cons (piece " (") (cons (ctor Host::Piece.taken (noSuchFile)) (cons (piece ")") (nil Host::Piece))))))))))) = true), + statement: ((Host::traceAgrees (run (cons (started (cons (argFrontier) (cons (argList) (nil Bytes)))) (cons (statedDirectory) (cons (readFailed (ctor LexLeanStd.Host::FailureKind.notFound) (noSuchFile)) (nil LexLeanStd.Host::Event))))) (listedAs (exited (1 : UInt8) (nil Host::Piece) (expectError "R301004" "Register cannot be read" (cons (piece "frontier.toml") (cons (piece ": ") (cons (piece "not found") (cons (piece " (") (cons (ctor Host::Piece.taken (noSuchFile)) (cons (piece ")") (nil Host::Piece))))))))))) = true), proof: decide{}, axioms: [propext] } @@ -464,7 +465,7 @@ theorem{ name: traceUnknownVerb, parameters: [], - statement: ((Host::traceAgrees (run (cons (started (cons (argFrobnicate) (nil Bytes))) (nil Host::Event))) (cons (refusedWith (cons (ctor Host::Piece.taken (argFrobnicate)) (cons (piece " names no command of this runtime; r30 help lists them") (nil Host::Piece)))) (nil Host::Draft))) = true), + statement: ((Host::traceAgrees (run (cons (started (cons (argFrobnicate) (nil Bytes))) (nil LexLeanStd.Host::Event))) (cons (refusedWith (cons (ctor Host::Piece.taken (argFrobnicate)) (cons (piece " names no command of this runtime; r30 help lists them") (nil Host::Piece)))) (nil Host::Draft))) = true), proof: decide{}, axioms: [propext] } @@ -472,7 +473,7 @@ theorem{ name: traceProgramName, parameters: [], - statement: ((Host::traceAgrees (run (cons (started (cons (argProgram) (cons (argHelp) (nil Bytes)))) (nil Host::Event))) (cons (refusedWith (cons (ctor Host::Piece.taken (argProgram)) (cons (piece " ") (cons (ctor Host::Piece.taken (argHelp)) (cons (piece " names no command of this runtime; r30 help lists them") (nil Host::Piece)))))) (nil Host::Draft))) = true), + statement: ((Host::traceAgrees (run (cons (started (cons (argProgram) (cons (argHelp) (nil Bytes)))) (nil LexLeanStd.Host::Event))) (cons (refusedWith (cons (ctor Host::Piece.taken (argProgram)) (cons (piece " ") (cons (ctor Host::Piece.taken (argHelp)) (cons (piece " names no command of this runtime; r30 help lists them") (nil Host::Piece)))))) (nil Host::Draft))) = true), proof: decide{}, axioms: [propext] } @@ -480,7 +481,7 @@ theorem{ name: traceHostProtocol, parameters: [], - statement: ((Host::traceAgrees (run (cons (readOk (fixtureOne)) (nil Host::Event))) (cons (exited (1 : UInt8) (nil Host::Piece) (expectError "R300002" "Host answered another request" (cons (piece "the event answers no request of this step") (nil Host::Piece)))) (nil Host::Draft))) = true), + statement: ((Host::traceAgrees (run (cons (readOk (fixtureOne)) (nil LexLeanStd.Host::Event))) (cons (exited (1 : UInt8) (nil Host::Piece) (expectError "R300002" "Host answered another request" (cons (piece "the event answers no request of this step") (nil Host::Piece)))) (nil Host::Draft))) = true), proof: decide{}, axioms: [propext] } @@ -488,7 +489,7 @@ theorem{ name: traceHostProtocolListed, parameters: [], - statement: ((Host::traceAgrees (run (cons (started (cons (argFrontier) (cons (argList) (nil Bytes)))) (cons (listedNothing) (nil Host::Event)))) (cons (statsGit) (cons (exited (1 : UInt8) (nil Host::Piece) (expectError "R300002" "Host answered another request" (cons (piece "the event answers no request of this step") (nil Host::Piece)))) (nil Host::Draft)))) = true), + statement: ((Host::traceAgrees (run (cons (started (cons (argFrontier) (cons (argList) (nil Bytes)))) (cons (listedNothing) (nil LexLeanStd.Host::Event)))) (cons (statsGit) (cons (exited (1 : UInt8) (nil Host::Piece) (expectError "R300002" "Host answered another request" (cons (piece "the event answers no request of this step") (nil Host::Piece)))) (nil Host::Draft)))) = true), proof: decide{}, axioms: [propext] } @@ -496,7 +497,7 @@ theorem{ name: traceHostProtocolRegister, parameters: [], - statement: ((Host::traceAgrees (run (cons (started (cons (argFrontier) (cons (argList) (nil Bytes)))) (cons (statedDirectory) (cons (statedDirectory) (nil Host::Event))))) (listedAs (exited (1 : UInt8) (nil Host::Piece) (expectError "R300002" "Host answered another request" (cons (piece "the event answers no request of this step") (nil Host::Piece)))))) = true), + statement: ((Host::traceAgrees (run (cons (started (cons (argFrontier) (cons (argList) (nil Bytes)))) (cons (statedDirectory) (cons (statedDirectory) (nil LexLeanStd.Host::Event))))) (listedAs (exited (1 : UInt8) (nil Host::Piece) (expectError "R300002" "Host answered another request" (cons (piece "the event answers no request of this step") (nil Host::Piece)))))) = true), proof: decide{}, axioms: [propext] } @@ -504,7 +505,7 @@ theorem{ name: traceListStray, parameters: [], - statement: ((Host::traceAgrees (run (cons (started (cons (argFrontier) (cons (argList) (cons (argBogus) (nil Bytes))))) (nil Host::Event))) (cons (refusedWith (cons (piece "frontier list takes no arguments but --status S") (nil Host::Piece))) (nil Host::Draft))) = true), + statement: ((Host::traceAgrees (run (cons (started (cons (argFrontier) (cons (argList) (cons (argBogus) (nil Bytes))))) (nil LexLeanStd.Host::Event))) (cons (refusedWith (cons (piece "frontier list takes no arguments but --status S") (nil Host::Piece))) (nil Host::Draft))) = true), proof: decide{}, axioms: [propext] } @@ -512,7 +513,7 @@ theorem{ name: traceListSeparator, parameters: [], - statement: ((Host::traceAgrees (run (cons (started (cons (argFrontier) (cons (argList) (cons (argSeparator) (nil Bytes))))) (nil Host::Event))) (cons (refusedWith (cons (piece "frontier list takes no arguments but --status S") (nil Host::Piece))) (nil Host::Draft))) = true), + statement: ((Host::traceAgrees (run (cons (started (cons (argFrontier) (cons (argList) (cons (argSeparator) (nil Bytes))))) (nil LexLeanStd.Host::Event))) (cons (refusedWith (cons (piece "frontier list takes no arguments but --status S") (nil Host::Piece))) (nil Host::Draft))) = true), proof: decide{}, axioms: [propext] } @@ -520,7 +521,7 @@ theorem{ name: traceStatusOptionLike, parameters: [], - statement: ((Host::traceAgrees (run (cons (started (cons (argFrontier) (cons (argList) (cons (argStatus) (cons (argDashX) (nil Bytes)))))) (nil Host::Event))) (cons (refusedWith (cons (piece "argument --status of frontier list expects one value") (nil Host::Piece))) (nil Host::Draft))) = true), + statement: ((Host::traceAgrees (run (cons (started (cons (argFrontier) (cons (argList) (cons (argStatus) (cons (argDashX) (nil Bytes)))))) (nil LexLeanStd.Host::Event))) (cons (refusedWith (cons (piece "argument --status of frontier list expects one value") (nil Host::Piece))) (nil Host::Draft))) = true), proof: decide{}, axioms: [propext] } @@ -528,7 +529,7 @@ theorem{ name: traceStatusNegative, parameters: [], - statement: ((Host::traceAgrees (run (cons (started (cons (argFrontier) (cons (argList) (cons (argStatus) (cons (argMinusOne) (nil Bytes)))))) (nil Host::Event))) (cons (statsGit) (nil Host::Draft))) = true), + statement: ((Host::traceAgrees (run (cons (started (cons (argFrontier) (cons (argList) (cons (argStatus) (cons (argMinusOne) (nil Bytes)))))) (nil LexLeanStd.Host::Event))) (cons (statsGit) (nil Host::Draft))) = true), proof: decide{}, axioms: [propext] } @@ -536,7 +537,7 @@ theorem{ name: traceHelpValue, parameters: [], - statement: ((Host::traceAgrees (run (cons (started (cons (argFrontier) (cons (argList) (cons (argHelpValue) (nil Bytes))))) (nil Host::Event))) (cons (refusedWith (cons (piece "argument -h/--help of frontier list takes no value") (nil Host::Piece))) (nil Host::Draft))) = true), + statement: ((Host::traceAgrees (run (cons (started (cons (argFrontier) (cons (argList) (cons (argHelpValue) (nil Bytes))))) (nil LexLeanStd.Host::Event))) (cons (refusedWith (cons (piece "argument -h/--help of frontier list takes no value") (nil Host::Piece))) (nil Host::Draft))) = true), proof: decide{}, axioms: [propext] } @@ -544,7 +545,7 @@ theorem{ name: traceHelpGlued, parameters: [], - statement: ((Host::traceAgrees (run (cons (started (cons (argFrontier) (cons (argList) (cons (argHelpGlued) (nil Bytes))))) (nil Host::Event))) (cons (exited (0 : UInt8) (R30::lit "usage: r30 frontier list [-h] [--status STATUS]\n\noptions:\n -h, --help show this help message and exit\n --status STATUS\n") (nil Host::Piece)) (nil Host::Draft))) = true), + statement: ((Host::traceAgrees (run (cons (started (cons (argFrontier) (cons (argList) (cons (argHelpGlued) (nil Bytes))))) (nil LexLeanStd.Host::Event))) (cons (exited (0 : UInt8) (R30::lit "usage: r30 frontier list [-h] [--status STATUS]\n\noptions:\n -h, --help show this help message and exit\n --status STATUS\n") (nil Host::Piece)) (nil Host::Draft))) = true), proof: decide{}, axioms: [propext] } @@ -552,7 +553,7 @@ theorem{ name: traceFrontierAlone, parameters: [], - statement: ((Host::traceAgrees (run (cons (started (cons (argFrontier) (nil Bytes))) (nil Host::Event))) (cons (refusedWith (cons (ctor Host::Piece.taken (argFrontier)) (cons (piece " names no command of this runtime; r30 help lists them") (nil Host::Piece)))) (nil Host::Draft))) = true), + statement: ((Host::traceAgrees (run (cons (started (cons (argFrontier) (nil Bytes))) (nil LexLeanStd.Host::Event))) (cons (refusedWith (cons (ctor Host::Piece.taken (argFrontier)) (cons (piece " names no command of this runtime; r30 help lists them") (nil Host::Piece)))) (nil Host::Draft))) = true), proof: decide{}, axioms: [propext] } @@ -560,7 +561,7 @@ theorem{ name: traceFrontierOtherWord, parameters: [], - statement: ((Host::traceAgrees (run (cons (started (cons (argFrontier) (cons (argFrobnicate) (nil Bytes)))) (nil Host::Event))) (cons (refusedWith (cons (ctor Host::Piece.taken (argFrontier)) (cons (piece " ") (cons (ctor Host::Piece.taken (argFrobnicate)) (cons (piece " names no command of this runtime; r30 help lists them") (nil Host::Piece)))))) (nil Host::Draft))) = true), + statement: ((Host::traceAgrees (run (cons (started (cons (argFrontier) (cons (argFrobnicate) (nil Bytes)))) (nil LexLeanStd.Host::Event))) (cons (refusedWith (cons (ctor Host::Piece.taken (argFrontier)) (cons (piece " ") (cons (ctor Host::Piece.taken (argFrobnicate)) (cons (piece " names no command of this runtime; r30 help lists them") (nil Host::Piece)))))) (nil Host::Draft))) = true), proof: decide{}, axioms: [propext] } @@ -568,7 +569,7 @@ theorem{ name: traceRootDenied, parameters: [], - statement: ((Host::traceAgrees (run (cons (startedIn (cons (argFrontier) (cons (argList) (nil Bytes))) (subDirectory)) (cons (statedFailed (ctor Host::FailureKind.denied) (permissionDenied)) (nil Host::Event)))) (cons (statsGit) (cons (exited (1 : UInt8) (nil Host::Piece) (expectError "R301004" "Register cannot be read" (cons (piece ".git") (cons (piece ": ") (cons (piece "permission denied") (cons (piece " (") (cons (ctor Host::Piece.taken (permissionDenied)) (cons (piece ")") (nil Host::Piece))))))))) (nil Host::Draft)))) = true), + statement: ((Host::traceAgrees (run (cons (startedIn (cons (argFrontier) (cons (argList) (nil Bytes))) (subDirectory)) (cons (statedFailed (ctor LexLeanStd.Host::FailureKind.denied) (permissionDenied)) (nil LexLeanStd.Host::Event)))) (cons (statsGit) (cons (exited (1 : UInt8) (nil Host::Piece) (expectError "R301004" "Register cannot be read" (cons (piece ".git") (cons (piece ": ") (cons (piece "permission denied") (cons (piece " (") (cons (ctor Host::Piece.taken (permissionDenied)) (cons (piece ")") (nil Host::Piece))))))))) (nil Host::Draft)))) = true), proof: decide{}, axioms: [propext] } @@ -576,7 +577,7 @@ theorem{ name: realizeRead, parameters: [path : (List Host::Piece)], - statement: ((Host::realize (ctor Host::Draft.read path)) = (ctor Host::Request.read (Host::render path))), + statement: ((Host::realize (ctor Host::Draft.read path)) = (ctor LexLeanStd.Host::Request.read (Host::render path))), proof: reflexivity{}, axioms: [Quot.sound, propext] } @@ -584,7 +585,7 @@ theorem{ name: realizeStat, parameters: [path : (List Host::Piece)], - statement: ((Host::realize (ctor Host::Draft.stat path)) = (ctor Host::Request.stat (Host::render path))), + statement: ((Host::realize (ctor Host::Draft.stat path)) = (ctor LexLeanStd.Host::Request.stat (Host::render path))), proof: reflexivity{}, axioms: [Quot.sound, propext] } @@ -592,7 +593,7 @@ theorem{ name: realizeExit, parameters: [status : UInt8, output : (List Host::Piece), errorOutput : (List Host::Piece)], - statement: ((Host::realize (ctor Host::Draft.exit status output errorOutput)) = (ctor Host::Request.exit status (Host::render output) (Host::render errorOutput))), + statement: ((Host::realize (ctor Host::Draft.exit status output errorOutput)) = (ctor LexLeanStd.Host::Request.exit status (Host::render output) (Host::render errorOutput))), proof: reflexivity{}, axioms: [Quot.sound, propext] } diff --git a/rule30-api/src/R30TracesForms.lex.tex b/rule30-api/src/R30TracesForms.lex.tex index 85ff17e..d9386fc 100644 --- a/rule30-api/src/R30TracesForms.lex.tex +++ b/rule30-api/src/R30TracesForms.lex.tex @@ -3,6 +3,7 @@ \useglossary{lexlean.std.nat@1.2.0} \importmodule{Application} \importmodule{Host} +\importmodule{LexLeanStd.Host} \importmodule{R30} \importmodule{R30Traces} \title{Boolean} @@ -79,7 +80,7 @@ theorem{ name: traceRootAbove, parameters: [], - statement: ((Host::traceAgrees (R30Traces::run (cons (R30Traces::startedIn (cons (R30Traces::argFrontier) (cons (R30Traces::argList) (nil Bytes))) (R30Traces::subDirectory)) (cons (R30Traces::statedMissing) (cons (R30Traces::statedDirectory) (cons (R30Traces::readOk (R30Traces::fixtureOne)) (nil Host::Event)))))) (cons (R30Traces::statsGit) (cons (R30Traces::statsGitAbove) (cons (R30Traces::readsRegisterAbove) (cons (R30Traces::exited (0 : UInt8) (R30Traces::shown (R30Traces::pythonListOne)) (nil Host::Piece)) (nil Host::Draft)))))) = true), + statement: ((Host::traceAgrees (R30Traces::run (cons (R30Traces::startedIn (cons (R30Traces::argFrontier) (cons (R30Traces::argList) (nil Bytes))) (R30Traces::subDirectory)) (cons (R30Traces::statedMissing) (cons (R30Traces::statedDirectory) (cons (R30Traces::readOk (R30Traces::fixtureOne)) (nil LexLeanStd.Host::Event)))))) (cons (R30Traces::statsGit) (cons (R30Traces::statsGitAbove) (cons (R30Traces::readsRegisterAbove) (cons (R30Traces::exited (0 : UInt8) (R30Traces::shown (R30Traces::pythonListOne)) (nil Host::Piece)) (nil Host::Draft)))))) = true), proof: decide{}, axioms: [propext] } diff --git a/rule30-api/src/ResearchCatalog.lex.tex b/rule30-api/src/ResearchCatalog.lex.tex index 7bb376a..7a7ffa9 100644 --- a/rule30-api/src/ResearchCatalog.lex.tex +++ b/rule30-api/src/ResearchCatalog.lex.tex @@ -32,7 +32,7 @@ name: moduleScopes, parameters: [], result: (List Scope), - body: (cons (unitScope 0x6d6f64756c652f417069 "Api") (cons (unitScope 0x6d6f64756c652f4170706c69636174696f6e "Application") (cons (unitScope 0x6d6f64756c652f417263686974656374757265 "Architecture") (cons (unitScope 0x6d6f64756c652f4175646974 "Audit") (cons (unitScope 0x6d6f64756c652f436f6e76657274 "Convert") (cons (unitScope 0x6d6f64756c652f446973636f76657279 "Discovery") (cons (unitScope 0x6d6f64756c652f456e67696e65 "Engine") (cons (unitScope 0x6d6f64756c652f486f7374 "Host") (cons (unitScope 0x6d6f64756c652f4879706f746865736573 "Hypotheses") (cons (unitScope 0x6d6f64756c652f4f62736572766572 "Observer") (cons (unitScope 0x6d6f64756c652f50726573656e746174696f6e "Presentation") (cons (unitScope 0x6d6f64756c652f523330 "R30") (cons (unitScope 0x6d6f64756c652f523330547261636573 "R30Traces") (cons (unitScope 0x6d6f64756c652f523330547261636573436c61696d73 "R30TracesClaims") (cons (unitScope 0x6d6f64756c652f523330547261636573466f726d73 "R30TracesForms") (cons (unitScope 0x6d6f64756c652f5233305472616365735265676973746572 "R30TracesRegister") (cons (unitScope 0x6d6f64756c652f5265676973746572 "Register") (cons (unitScope 0x6d6f64756c652f5265736561726368 "Research") (cons (unitScope 0x6d6f64756c652f5265736561726368436174616c6f67 "ResearchCatalog") (cons (unitScope 0x6d6f64756c652f5265736561726368547261636573 "ResearchTraces") (cons (unitScope 0x6d6f64756c652f52756c653330436f7265 "Rule30Core") (cons (unitScope 0x6d6f64756c652f53657175656e636573 "Sequences") (cons (unitScope 0x6d6f64756c652f5374616e6461726473 "Standards") (cons (unitScope 0x6d6f64756c652f546f6d6c "Toml") (cons (unitScope 0x6d6f64756c652f466f756e646174696f6e2e41726368 "Foundation.Arch") (cons (unitScope 0x6d6f64756c652f466f756e646174696f6e2e5175616c "Foundation.Qual") (cons (unitScope 0x6d6f64756c652f4c65784c65616e5374642e427566666572 "LexLeanStd.Buffer") (cons (unitScope 0x6d6f64756c652f4c65784c65616e5374642e54657874 "LexLeanStd.Text") (cons (unitScope 0x6d6f64756c652f4c65784c65616e5374642e536861323536 "LexLeanStd.Sha256") (nil Scope)))))))))))))))))))))))))))))), + body: (cons (unitScope 0x6d6f64756c652f417069 "Api") (cons (unitScope 0x6d6f64756c652f4170706c69636174696f6e "Application") (cons (unitScope 0x6d6f64756c652f417263686974656374757265 "Architecture") (cons (unitScope 0x6d6f64756c652f4175646974 "Audit") (cons (unitScope 0x6d6f64756c652f436f6e76657274 "Convert") (cons (unitScope 0x6d6f64756c652f446973636f76657279 "Discovery") (cons (unitScope 0x6d6f64756c652f456e67696e65 "Engine") (cons (unitScope 0x6d6f64756c652f486f7374 "Host") (cons (unitScope 0x6d6f64756c652f4879706f746865736573 "Hypotheses") (cons (unitScope 0x6d6f64756c652f4f62736572766572 "Observer") (cons (unitScope 0x6d6f64756c652f50726573656e746174696f6e "Presentation") (cons (unitScope 0x6d6f64756c652f523330 "R30") (cons (unitScope 0x6d6f64756c652f523330547261636573 "R30Traces") (cons (unitScope 0x6d6f64756c652f523330547261636573436c61696d73 "R30TracesClaims") (cons (unitScope 0x6d6f64756c652f523330547261636573466f726d73 "R30TracesForms") (cons (unitScope 0x6d6f64756c652f5233305472616365735265676973746572 "R30TracesRegister") (cons (unitScope 0x6d6f64756c652f5265676973746572 "Register") (cons (unitScope 0x6d6f64756c652f5265736561726368 "Research") (cons (unitScope 0x6d6f64756c652f5265736561726368436174616c6f67 "ResearchCatalog") (cons (unitScope 0x6d6f64756c652f5265736561726368547261636573 "ResearchTraces") (cons (unitScope 0x6d6f64756c652f52756c653330436f7265 "Rule30Core") (cons (unitScope 0x6d6f64756c652f53657175656e636573 "Sequences") (cons (unitScope 0x6d6f64756c652f5374616e6461726473 "Standards") (cons (unitScope 0x6d6f64756c652f546f6d6c "Toml") (cons (unitScope 0x6d6f64756c652f466f756e646174696f6e2e41726368 "Foundation.Arch") (cons (unitScope 0x6d6f64756c652f466f756e646174696f6e2e5175616c "Foundation.Qual") (cons (unitScope 0x6d6f64756c652f4c65784c65616e5374642e427566666572 "LexLeanStd.Buffer") (cons (unitScope 0x6d6f64756c652f4c65784c65616e5374642e54657874 "LexLeanStd.Text") (cons (unitScope 0x6d6f64756c652f4c65784c65616e5374642e536861323536 "LexLeanStd.Sha256") (cons (unitScope 0x6d6f64756c652f4c65784c65616e5374642e486f7374 "LexLeanStd.Host") (nil Scope))))))))))))))))))))))))))))))), axioms: [] } @@ -58,7 +58,7 @@ (cons (record Scope {id := 0x6261736973, module := "Sequences", features := (Sequences::idsOf (Sequences::sequences))}) (cons (record Scope {id := 0x706f7274666f6c696f, module := "Engine", features := (Engine::strategyIdsOf (Engine::portfolio))}) (cons (record Scope {id := 0x7265616c697a657273, module := "Standards", features := (Standards::declaredIds)}) - (cons (record Scope {id := 0x7374646c6962, module := "Research", features := (cons "Foundation.Arch" (cons "Foundation.Qual" (cons "LexLeanStd.Buffer" (cons "LexLeanStd.Text" (cons "LexLeanStd.Sha256" (nil String))))))}) + (cons (record Scope {id := 0x7374646c6962, module := "Research", features := (cons "Foundation.Arch" (cons "Foundation.Qual" (cons "LexLeanStd.Buffer" (cons "LexLeanStd.Text" (cons "LexLeanStd.Sha256" (cons "LexLeanStd.Host" (nil String)))))))}) (nil Scope)))))))))))))))))))), axioms: [] } diff --git a/rule30-api/src/ResearchTraces.lex.tex b/rule30-api/src/ResearchTraces.lex.tex index 452c3e8..ca18c21 100644 --- a/rule30-api/src/ResearchTraces.lex.tex +++ b/rule30-api/src/ResearchTraces.lex.tex @@ -345,7 +345,7 @@ theorem{ name: everyApplicationAndLibraryModuleGetsOneMaintenanceTask, parameters: [], - statement: ((prim length (ResearchCatalog::maintenanceTasks (ResearchCatalog::registeredScopes)) : Nat) = 29), + statement: ((prim length (ResearchCatalog::maintenanceTasks (ResearchCatalog::registeredScopes)) : Nat) = 30), proof: decide{} } \end{semanticmodule} diff --git a/rule30-api/src/Standards.lex.tex b/rule30-api/src/Standards.lex.tex index f396bd2..33c8abd 100644 --- a/rule30-api/src/Standards.lex.tex +++ b/rule30-api/src/Standards.lex.tex @@ -26,7 +26,7 @@ name: standards, parameters: [], result: (List Standard), - body: (cons (record Standard {id := "iso-42010", name := "ISO/IEC/IEEE 42010:2022, Architecture description", authority := "https://www.iso.org/standard/74393.html", version := "2022", scope := "Stakeholders, concerns, viewpoints and views of the proof effort on Foundation.Arch; every panel of the site is governed by a viewpoint.", realizedBy := (cons "Architecture" (cons "architecture-module" (cons "Presentation" (nil String)))), conformance := "bin/r30 verify api: everyConcernFramed, viewpointsFrameHeldConcerns, everyViewpointGovernsAView (Architecture), panelsGovernedByViewpoints (Presentation)", coverage := "implemented"}) (cons (record Standard {id := "iso-25010", name := "ISO/IEC 25010:2023, Product quality model", authority := "https://www.iso.org/standard/78176.html", version := "2023", scope := "What an optimal implementation is here: characteristics, subcharacteristics, requirements and measures with thresholds on Foundation.Qual, each measure naming the command that reports it.", realizedBy := (cons "Architecture" (cons "quality" (cons "architecture-module" (cons "api_check" (cons "check" (cons "choice_audit" (cons "frontier_check" (cons "gate" (cons "verify" (cons "view_render" (nil String))))))))))), conformance := "bin/r30 verify api: everyRequirementMeasured, everyMeasureCommandExists (Architecture), publicationWithinBudget (Application)", coverage := "implemented"}) (cons (record Standard {id := "wcag-2.2", name := "W3C WCAG 2.2, Web Content Accessibility Guidelines", authority := "https://www.w3.org/TR/WCAG22/", version := "2.2 (Recommendation, 2023-10-05)", scope := "The site at level AA: 4.5:1 text contrast in both themes, one visible focus ring, a skip link, reduced motion honoured, keyboard operation of every control and step.", realizedBy := (cons "site" (cons "picture" (cons "explainer" (cons "reduction-tree" (cons "register" (cons "open-leaves" (cons "paper" (cons "obligation" (cons "refutations" (cons "interface-sheets" (cons "modules" (cons "quality" (cons "sitemap" (cons "verify" (cons "standards" (cons "model" (cons "design" (cons "viz-triangle" (cons "viz-tower" (cons "viz-ledger" (cons "viz-rays" (cons "viz-defects" (cons "viz-dyadic" (cons "nav-primary" (cons "nav-breadcrumb" (cons "nav-stepper" (nil String))))))))))))))))))))))))))), conformance := "python3 -m unittest scripts.tests.test_r30.AccessibilityTests (contrast measured from the stylesheet, landmarks, focus, motion, keyboard)", coverage := "implemented"}) (cons (record Standard {id := "wai-aria-1.2", name := "W3C WAI-ARIA 1.2 and the ARIA Authoring Practices Guide", authority := "https://www.w3.org/TR/wai-aria-1.2/", version := "1.2 (Recommendation, 2023-06-06); APG patterns", scope := "The navigation of the site: the primary navigation, the breadcrumb and the stepper follow the APG patterns (roles, aria-current, arrow keys), the status region is live.", realizedBy := (cons "site" (cons "nav-primary" (cons "nav-breadcrumb" (cons "nav-stepper" (nil String))))), conformance := "python3 -m unittest scripts.tests.test_r30.AccessibilityTests (role, aria-current, aria-pressed, role=status, arrow keys)", coverage := "implemented"}) (cons (record Standard {id := "html-living-standard", name := "WHATWG HTML Living Standard", authority := "https://html.spec.whatwg.org/multipage/", version := "living standard", scope := "The page's landmarks (header, nav, main, footer), the one-document site with its data in a JSON script element and its metadata in the head.", realizedBy := (cons "site" (cons "nav-primary" (cons "nav-breadcrumb" (cons "nav-stepper" (nil String))))), conformance := "python3 -m unittest scripts.tests.test_r30.AccessibilityTests.test_landmarks_focus_motion_and_keyboard", coverage := "implemented"}) (cons (record Standard {id := "svg-2", name := "W3C SVG 2", authority := "https://www.w3.org/TR/SVG2/", version := "2 (Candidate Recommendation, 2018-10-04)", scope := "The Rule 30 picture, the logo and the visualizations are SVG documents with a title and a description, crisp cells, colours from the page's tokens.", realizedBy := (cons "picture" (cons "logo" (cons "viz-triangle" (cons "viz-tower" (cons "viz-ledger" (cons "viz-rays" (cons "viz-defects" (cons "viz-dyadic" (nil String))))))))), conformance := "python3 -m unittest scripts.tests.test_r30.SiteTests.test_rule30_rows_and_logo (parsed as SVG, no script)", coverage := "implemented"}) (cons (record Standard {id := "wai-aria-graphics-1.0", name := "W3C WAI-ARIA Graphics Module 1.0", authority := "https://www.w3.org/TR/graphics-aria-1.0/", version := "1.0 (Recommendation, 2018-10-02)", scope := "Every drawing carries role=img with aria-labelledby pointing at its title and description; the interactive visualizations use graphics-document and graphics-symbol.", realizedBy := (cons "picture" (cons "logo" (cons "viz-triangle" (cons "viz-tower" (cons "viz-ledger" (cons "viz-rays" (cons "viz-defects" (cons "viz-dyadic" (nil String))))))))), conformance := "python3 -m unittest scripts.tests.test_r30.SiteTests.test_statements_picture_and_explainer_artifacts (role=img, aria-labelledby)", coverage := "implemented"}) (cons (record Standard {id := "schema-org", name := "schema.org vocabulary (JSON-LD)", authority := "https://schema.org/", version := "current release (https://schema.org/docs/releases.html)", scope := "A LearningResource for every pedagogical step of every journey, the paper as ScholarlyArticle, the repository as SoftwareSourceCode, the register as Dataset, embedded in the page and published as schema.json.", realizedBy := (cons "jsonld" (cons "site" (cons "paper-pdf" (cons "register-json" (cons "readme" (cons "prize-review" (cons "research-session" (cons "reading" (cons "stdlib-feedback" (cons "mathematics" (cons "first-visit" (nil String)))))))))))), conformance := "python3 -m unittest scripts.tests.test_r30.StandardsTests.test_schema_org_describes_every_step_the_paper_the_repository_and_the_register", coverage := "implemented"}) (cons (record Standard {id := "json-ld-1.1", name := "W3C JSON-LD 1.1", authority := "https://www.w3.org/TR/json-ld11/", version := "1.1 (Recommendation, 2020-07-16)", scope := "The serialization of the schema.org and PROV-O graphs: a @context, a @graph, ids under the published URL.", realizedBy := (cons "jsonld" (cons "provenance" (nil String))), conformance := "python3 -m unittest scripts.tests.test_r30.StandardsTests (both documents parse and carry @context and @graph)", coverage := "implemented"}) (cons (record Standard {id := "prov-o", name := "W3C PROV-O, the PROV Ontology", authority := "https://www.w3.org/TR/prov-o/", version := "Recommendation, 2013-04-30", scope := "Provenance of every claim: a proved claim prov:wasDerivedFrom its Lean theorem and prov:wasAttributedTo the Lean kernel, attested by the paper's LexLean attestation and the module's kappa-label; the view prov:wasGeneratedBy the render of this commit under the view workflow.", realizedBy := (cons "provenance" (cons "view-workflow" (cons "view_render" (cons "frontier_check" (cons "kappa" (cons "verify" (nil String))))))), conformance := "python3 -m unittest scripts.tests.test_r30.StandardsTests.test_provenance_derives_every_proved_claim_from_its_theorem", coverage := "implemented"}) (cons (record Standard {id := "json-schema-2020-12", name := "JSON Schema 2020-12", authority := "https://json-schema.org/draft/2020-12/schema", version := "2020-12", scope := "The closed schemas of register.json, the interface sheets, standards.json and the --json reports (rule30-api/schemas), validated by the tests and referenced from openapi.json.", realizedBy := (cons "register-json" (cons "standards" (cons "openapi" (cons "api_check" (cons "api_production" (cons "brief" (cons "chain" (cons "claim" (cons "deduce" (cons "discover" (cons "engine_prune" (cons "engine_status" (cons "engine_tick" (cons "frontier_list" (cons "interface" (cons "kappa" (cons "sequences" (cons "status" (nil String))))))))))))))))))), conformance := "python3 -m unittest scripts.tests.test_r30.ResultSchemaTests; bin/r30 api check", coverage := "implemented"}) (cons (record Standard {id := "openapi-3.1", name := "OpenAPI Specification 3.1", authority := "https://spec.openapis.org/oas/v3.1.1", version := "3.1.1 (2024-10-24)", scope := "The r30 command surface as an API description: one path per command of the parser, its arguments as parameters, its responses from the result schemas, the same leaves as Api.lex.tex and the MCP tools.", realizedBy := (prim append (cons "openapi" (cons "status" (cons "brief" (cons "chain" (cons "api_sync" (cons "api_check" (cons "api_production" (cons "view_render" (cons "interface" (cons "claim" (cons "audit" (cons "gate" (cons "lexicon_search" (cons "lexicon_show" (cons "lexicon_packages" (cons "sig" (cons "mentions" (cons "theorem_preview" (cons "theorem_add" (cons "theorem_remove" (cons "define" (cons "check" (cons "unpublished" (cons "selfcheck" (cons "verify" (cons "probe" (cons "axioms" (cons "choice_audit" (cons "frontier_list" (cons "frontier_add" (cons "frontier_set" (cons "frontier_check" (cons "frontier_render" (cons "commit" (cons "module_list" (cons "module_add" (cons "module_build" (cons "consolidate" (cons "kappa" (cons "sequences" (nil String))))))))))))))))))))))))))))))))))))))))) (cons "discover" (cons "deduce" (cons "engine_tick" (cons "engine_status" (cons "engine_hypotheses" (cons "engine_prune" (cons "experiment_list" (cons "experiment_run" (nil String))))))))) : (List String)), conformance := "python3 -m unittest scripts.tests.test_r30.StandardsTests.test_openapi_describes_the_command_surface; bin/r30 api check (Api.lex.tex)", coverage := "implemented"}) (cons (record Standard {id := "gherkin", name := "Gherkin (Cucumber reference)", authority := "https://cucumber.io/docs/gherkin/reference/", version := "Gherkin reference (current)", scope := "One scenario per conformance id in features/suites, tagged with the id and its honesty level, generated with the registers.", realizedBy := (cons "api_sync" (cons "api_check" (nil String))), conformance := "python3 -m unittest scripts.tests.test_r30.ConformanceTests; bin/r30 api check", coverage := "implemented"}) (cons (record Standard {id := "citation-cff", name := "Citation File Format 1.2.0", authority := "https://citation-file-format.github.io/", version := "1.2.0", scope := "CITATION.cff at the repository root (and copied into the view): the author, the title of the paper, the repository and the published view.", realizedBy := (cons "citation" (cons "readme" (nil String))), conformance := "python3 -m unittest scripts.tests.test_r30.StandardsTests.test_citation_file_names_the_author_the_title_and_the_repository", coverage := "implemented"}) (cons (record Standard {id := "spdx", name := "SPDX License Expressions (SPDX 2.3, ISO/IEC 5962:2021)", authority := "https://spdx.github.io/spdx-spec/v2.3/SPDX-license-expressions/", version := "2.3", scope := "License identifiers of the vendored sources: the repository is MIT (LICENSE at the root, `license: MIT` in CITATION.cff); the prism-stdlib register carries the SPDX expression of its vendored license files.", realizedBy := (cons "stdlib-package" (cons "citation" (nil String))), conformance := "python3 -m unittest scripts.tests.test_r30.StandardsTests.test_spdx_expressions_are_well_formed", coverage := "implemented"}) (cons (record Standard {id := "sitemap-protocol", name := "Sitemaps XML protocol 0.9", authority := "https://www.sitemaps.org/protocol.html", version := "0.9", scope := "sitemap.xml: the page and the deep link of every step of every journey; robots.txt names the sitemap.", realizedBy := (cons "sitemap" (cons "robots" (cons "site" (cons "prize-review" (cons "research-session" (cons "reading" (cons "stdlib-feedback" (cons "mathematics" (cons "first-visit" (nil String)))))))))), conformance := "python3 -m unittest scripts.tests.test_r30.StandardsTests.test_sitemap_lists_every_step_deep_link", coverage := "implemented"}) (cons (record Standard {id := "open-graph", name := "The Open Graph protocol", authority := "https://ogp.me/", version := "ogp.me (2014-10)", scope := "og:title, og:type, og:url, og:description and og:image in the page's head, injected with the JSON-LD at render.", realizedBy := (cons "site" (cons "logo" (nil String))), conformance := "python3 -m unittest scripts.tests.test_r30.StandardsTests.test_site_head_carries_json_ld_and_open_graph", coverage := "implemented"}) (cons (record Standard {id := "rfc-8785", name := "RFC 8785, JSON Canonicalization Scheme (JCS)", authority := "https://www.rfc-editor.org/rfc/rfc8785", version := "2020-06", scope := "The identity of the published JSON contracts (sha256-canonical-json in contracts.toml) and the canonical JSON of the LexLean attestations; uor-addr labels JSON under JCS.", realizedBy := (cons "register-json" (cons "statements" (cons "kappa" (nil String)))), conformance := "python3 -m unittest scripts.tests.test_kappa (the no-prefix rule on the JCS vector)", coverage := "implemented"}) (cons (record Standard {id := "rivest-csexp", name := "Rivest, S-Expressions (canonical form, section 4.3)", authority := "https://people.csail.mit.edu/rivest/Sexp.txt", version := "draft-rivest-sexp-00, 1997-05-04", scope := "The kappa-label of a research module: the SHA-256 of the canonical S-expression of the declarations the kernel replays, as UOR-Foundation/uor-addr mints labels; the key of the replay receipts. The same canonical form labels the sequences of the basis, (sequence ), their transforms and the relations the discovery engines find, (relation ).", realizedBy := (cons "kappa" (cons "provenance" (cons "sequences" (cons "discover" (cons "Sequences" (cons "Discovery" (nil String))))))), conformance := "python3 -m unittest scripts.tests.test_kappa; bin/r30 kappa ; bin/r30 api check (sequences)", coverage := "implemented"}) (cons (record Standard {id := "in-toto-statement-v1", name := "in-toto Attestation Framework, Statement v1", authority := "https://github.com/in-toto/attestation/blob/main/spec/v1/statement.md", version := "v1", scope := "attestations.intoto.json: a Statement whose subjects are the attested PDFs and the paper's sources with their SHA-256 digests and whose predicate is the paper's LexLean attestation.", realizedBy := (cons "attestations" (cons "pdf-manifest" (cons "verify" (cons "paper-pdf" (cons "observations-pdf" (cons "core-pdf" (nil String))))))), conformance := "python3 -m unittest scripts.tests.test_r30.StandardsTests.test_in_toto_statement_subjects_are_the_attested_documents", coverage := "implemented"}) (cons (record Standard {id := "oci-distribution", name := "OCI Distribution Specification", authority := "https://github.com/opencontainers/distribution-spec/blob/main/spec.md", version := "1.1.0 (2024-02)", scope := "Planned: a kappa-registry serving the replay receipts and certified bundles by content address; today only the kappa-labels that would address them exist.", realizedBy := (cons "kappa" (nil String)), conformance := "bin/r30 kappa (the labels); no registry runs yet", coverage := "planned"}) (cons (record Standard {id := "iana-media-types", name := "IANA Media Types (RFC 6838)", authority := "https://www.iana.org/assignments/media-types/", version := "RFC 6838 (2013-01)", scope := "Every published artifact declares its media type in Presentation.lex.tex; the contracts register declares the vendor types of the JSON reports.", realizedBy := (prim append (cons "chain" (cons "register-json" (cons "register-text" (cons "frontier" (cons "interfaces" (cons "statements" (cons "explainer" (cons "picture" (cons "paper-pdf" (cons "observations-pdf" (cons "core-pdf" (cons "pdf-manifest" (cons "api-module" (cons "register-module" (cons "architecture-module" (cons "presentation-module" (cons "application-module" (cons "core-vectors" (cons "frontier-module" (cons "agents" (cons "round-workflow" (cons "strategy" (cons "readme" (cons "logo" (cons "standards" (cons "standards-module" (cons "openapi" (cons "sitemap" (cons "robots" (cons "provenance" (cons "jsonld" (cons "attestations" (cons "citation" (cons "observer-module" (cons "tokens" (cons "site" (cons "viz-core-js" (cons "viz-triangle-js" (cons "viz-tower-js" (cons "viz-ledger-js" (nil String))))))))))))))))))))))))))))))))))))))))) (cons "viz-rays-js" (cons "viz-defects-js" (cons "viz-dyadic-js" (nil String)))) : (List String)), conformance := "bin/r30 verify api: artifactPathsDistinct, panelsReadArtifacts (Presentation); python3 -m unittest scripts.tests.test_r30.StandardsTests", coverage := "implemented"}) (cons (record Standard {id := "lean-4", name := "Lean 4 (the kernel)", authority := "https://github.com/leanprover/lean4", version := "leanprover/lean4:v4.32.1", scope := "Every proved claim names a theorem the Lean kernel checked under propext and Quot.sound; the research modules are kernel-replayed with leanchecker.", realizedBy := (cons "Register" (cons "axioms" (cons "choice_audit" (cons "frontier_check" (cons "kappa" (cons "module_build" (nil String))))))), conformance := "bin/r30 frontier check; bin/r30 axioms ; bin/r30 choice-audit", coverage := "implemented"}) (cons (record Standard {id := "lexlean", name := "UOR-Foundation/LexLean (closed-lexicon LaTeX to Lean 4)", authority := "https://github.com/UOR-Foundation/LexLean", version := "0.4.0, language 1.2, compiler semantics 2a0617a23636", scope := "The authoring surface: the paper, the register and these API modules are LexLean modules verified by lexlean; the production roots export to certified Rust.", realizedBy := (cons "Api" (cons "Register" (cons "Architecture" (cons "Presentation" (cons "Application" (cons "Observer" (cons "Convert" (cons "Standards" (cons "Rule30Core" (cons "Sequences" (cons "Discovery" (cons "verify" (cons "check" (cons "api_sync" (cons "api_check" (cons "api_production" (nil String))))))))))))))))), conformance := "bin/r30 verify api; bin/r30 check api; bin/r30 api check", coverage := "implemented"}) (nil Standard))))))))))))))))))))))))), + body: (cons (record Standard {id := "iso-42010", name := "ISO/IEC/IEEE 42010:2022, Architecture description", authority := "https://www.iso.org/standard/74393.html", version := "2022", scope := "Stakeholders, concerns, viewpoints and views of the proof effort on Foundation.Arch; every panel of the site is governed by a viewpoint.", realizedBy := (cons "Architecture" (cons "architecture-module" (cons "Presentation" (nil String)))), conformance := "bin/r30 verify api: everyConcernFramed, viewpointsFrameHeldConcerns, everyViewpointGovernsAView (Architecture), panelsGovernedByViewpoints (Presentation)", coverage := "implemented"}) (cons (record Standard {id := "iso-25010", name := "ISO/IEC 25010:2023, Product quality model", authority := "https://www.iso.org/standard/78176.html", version := "2023", scope := "What an optimal implementation is here: characteristics, subcharacteristics, requirements and measures with thresholds on Foundation.Qual, each measure naming the command that reports it.", realizedBy := (cons "Architecture" (cons "quality" (cons "architecture-module" (cons "api_check" (cons "check" (cons "choice_audit" (cons "frontier_check" (cons "gate" (cons "verify" (cons "view_render" (nil String))))))))))), conformance := "bin/r30 verify api: everyRequirementMeasured, everyMeasureCommandExists (Architecture), publicationWithinBudget (Application)", coverage := "implemented"}) (cons (record Standard {id := "wcag-2.2", name := "W3C WCAG 2.2, Web Content Accessibility Guidelines", authority := "https://www.w3.org/TR/WCAG22/", version := "2.2 (Recommendation, 2023-10-05)", scope := "The site at level AA: 4.5:1 text contrast in both themes, one visible focus ring, a skip link, reduced motion honoured, keyboard operation of every control and step.", realizedBy := (cons "site" (cons "picture" (cons "explainer" (cons "reduction-tree" (cons "register" (cons "open-leaves" (cons "paper" (cons "obligation" (cons "refutations" (cons "interface-sheets" (cons "modules" (cons "quality" (cons "sitemap" (cons "verify" (cons "standards" (cons "model" (cons "design" (cons "viz-triangle" (cons "viz-tower" (cons "viz-ledger" (cons "viz-rays" (cons "viz-defects" (cons "viz-dyadic" (cons "nav-primary" (cons "nav-breadcrumb" (cons "nav-stepper" (nil String))))))))))))))))))))))))))), conformance := "python3 -m unittest scripts.tests.test_r30.AccessibilityTests (contrast measured from the stylesheet, landmarks, focus, motion, keyboard)", coverage := "implemented"}) (cons (record Standard {id := "wai-aria-1.2", name := "W3C WAI-ARIA 1.2 and the ARIA Authoring Practices Guide", authority := "https://www.w3.org/TR/wai-aria-1.2/", version := "1.2 (Recommendation, 2023-06-06); APG patterns", scope := "The navigation of the site: the primary navigation, the breadcrumb and the stepper follow the APG patterns (roles, aria-current, arrow keys), the status region is live.", realizedBy := (cons "site" (cons "nav-primary" (cons "nav-breadcrumb" (cons "nav-stepper" (nil String))))), conformance := "python3 -m unittest scripts.tests.test_r30.AccessibilityTests (role, aria-current, aria-pressed, role=status, arrow keys)", coverage := "implemented"}) (cons (record Standard {id := "html-living-standard", name := "WHATWG HTML Living Standard", authority := "https://html.spec.whatwg.org/multipage/", version := "living standard", scope := "The page's landmarks (header, nav, main, footer), the one-document site with its data in a JSON script element and its metadata in the head.", realizedBy := (cons "site" (cons "nav-primary" (cons "nav-breadcrumb" (cons "nav-stepper" (nil String))))), conformance := "python3 -m unittest scripts.tests.test_r30.AccessibilityTests.test_landmarks_focus_motion_and_keyboard", coverage := "implemented"}) (cons (record Standard {id := "svg-2", name := "W3C SVG 2", authority := "https://www.w3.org/TR/SVG2/", version := "2 (Candidate Recommendation, 2018-10-04)", scope := "The Rule 30 picture, the logo and the visualizations are SVG documents with a title and a description, crisp cells, colours from the page's tokens.", realizedBy := (cons "picture" (cons "logo" (cons "viz-triangle" (cons "viz-tower" (cons "viz-ledger" (cons "viz-rays" (cons "viz-defects" (cons "viz-dyadic" (nil String))))))))), conformance := "python3 -m unittest scripts.tests.test_r30.SiteTests.test_rule30_rows_and_logo (parsed as SVG, no script)", coverage := "implemented"}) (cons (record Standard {id := "wai-aria-graphics-1.0", name := "W3C WAI-ARIA Graphics Module 1.0", authority := "https://www.w3.org/TR/graphics-aria-1.0/", version := "1.0 (Recommendation, 2018-10-02)", scope := "Every drawing carries role=img with aria-labelledby pointing at its title and description; the interactive visualizations use graphics-document and graphics-symbol.", realizedBy := (cons "picture" (cons "logo" (cons "viz-triangle" (cons "viz-tower" (cons "viz-ledger" (cons "viz-rays" (cons "viz-defects" (cons "viz-dyadic" (nil String))))))))), conformance := "python3 -m unittest scripts.tests.test_r30.SiteTests.test_statements_picture_and_explainer_artifacts (role=img, aria-labelledby)", coverage := "implemented"}) (cons (record Standard {id := "schema-org", name := "schema.org vocabulary (JSON-LD)", authority := "https://schema.org/", version := "current release (https://schema.org/docs/releases.html)", scope := "A LearningResource for every pedagogical step of every journey, the paper as ScholarlyArticle, the repository as SoftwareSourceCode, the register as Dataset, embedded in the page and published as schema.json.", realizedBy := (cons "jsonld" (cons "site" (cons "paper-pdf" (cons "register-json" (cons "readme" (cons "prize-review" (cons "research-session" (cons "reading" (cons "stdlib-feedback" (cons "mathematics" (cons "first-visit" (nil String)))))))))))), conformance := "python3 -m unittest scripts.tests.test_r30.StandardsTests.test_schema_org_describes_every_step_the_paper_the_repository_and_the_register", coverage := "implemented"}) (cons (record Standard {id := "json-ld-1.1", name := "W3C JSON-LD 1.1", authority := "https://www.w3.org/TR/json-ld11/", version := "1.1 (Recommendation, 2020-07-16)", scope := "The serialization of the schema.org and PROV-O graphs: a @context, a @graph, ids under the published URL.", realizedBy := (cons "jsonld" (cons "provenance" (nil String))), conformance := "python3 -m unittest scripts.tests.test_r30.StandardsTests (both documents parse and carry @context and @graph)", coverage := "implemented"}) (cons (record Standard {id := "prov-o", name := "W3C PROV-O, the PROV Ontology", authority := "https://www.w3.org/TR/prov-o/", version := "Recommendation, 2013-04-30", scope := "Provenance of every claim: a proved claim prov:wasDerivedFrom its Lean theorem and prov:wasAttributedTo the Lean kernel, attested by the paper's LexLean attestation and the module's kappa-label; the view prov:wasGeneratedBy the render of this commit under the view workflow.", realizedBy := (cons "provenance" (cons "view-workflow" (cons "view_render" (cons "frontier_check" (cons "kappa" (cons "verify" (nil String))))))), conformance := "python3 -m unittest scripts.tests.test_r30.StandardsTests.test_provenance_derives_every_proved_claim_from_its_theorem", coverage := "implemented"}) (cons (record Standard {id := "json-schema-2020-12", name := "JSON Schema 2020-12", authority := "https://json-schema.org/draft/2020-12/schema", version := "2020-12", scope := "The closed schemas of register.json, the interface sheets, standards.json and the --json reports (rule30-api/schemas), validated by the tests and referenced from openapi.json.", realizedBy := (cons "register-json" (cons "standards" (cons "openapi" (cons "api_check" (cons "api_production" (cons "brief" (cons "chain" (cons "claim" (cons "deduce" (cons "discover" (cons "engine_prune" (cons "engine_status" (cons "engine_tick" (cons "frontier_list" (cons "interface" (cons "kappa" (cons "sequences" (cons "status" (nil String))))))))))))))))))), conformance := "python3 -m unittest scripts.tests.test_r30.ResultSchemaTests; bin/r30 api check", coverage := "implemented"}) (cons (record Standard {id := "openapi-3.1", name := "OpenAPI Specification 3.1", authority := "https://spec.openapis.org/oas/v3.1.1", version := "3.1.1 (2024-10-24)", scope := "The r30 command surface as an API description: one path per command of the parser, its arguments as parameters, its responses from the result schemas, the same leaves as Api.lex.tex and the MCP tools.", realizedBy := (prim append (cons "openapi" (cons "status" (cons "brief" (cons "chain" (cons "api_sync" (cons "api_check" (cons "api_production" (cons "view_render" (cons "interface" (cons "claim" (cons "audit" (cons "gate" (cons "lexicon_search" (cons "lexicon_show" (cons "lexicon_packages" (cons "sig" (cons "mentions" (cons "theorem_preview" (cons "theorem_add" (cons "theorem_remove" (cons "define" (cons "check" (cons "unpublished" (cons "selfcheck" (cons "verify" (cons "probe" (cons "axioms" (cons "choice_audit" (cons "frontier_list" (cons "frontier_add" (cons "frontier_set" (cons "frontier_check" (cons "frontier_render" (cons "commit" (cons "module_list" (cons "module_add" (cons "module_build" (cons "consolidate" (cons "kappa" (cons "sequences" (nil String))))))))))))))))))))))))))))))))))))))))) (cons "discover" (cons "deduce" (cons "engine_tick" (cons "engine_status" (cons "engine_hypotheses" (cons "engine_prune" (cons "experiment_list" (cons "experiment_run" (nil String))))))))) : (List String)), conformance := "python3 -m unittest scripts.tests.test_r30.StandardsTests.test_openapi_describes_the_command_surface; bin/r30 api check (Api.lex.tex)", coverage := "implemented"}) (cons (record Standard {id := "gherkin", name := "Gherkin (Cucumber reference)", authority := "https://cucumber.io/docs/gherkin/reference/", version := "Gherkin reference (current)", scope := "One scenario per conformance id in features/suites, tagged with the id and its honesty level, generated with the registers.", realizedBy := (cons "api_sync" (cons "api_check" (nil String))), conformance := "python3 -m unittest scripts.tests.test_r30.ConformanceTests; bin/r30 api check", coverage := "implemented"}) (cons (record Standard {id := "citation-cff", name := "Citation File Format 1.2.0", authority := "https://citation-file-format.github.io/", version := "1.2.0", scope := "CITATION.cff at the repository root (and copied into the view): the author, the title of the paper, the repository and the published view.", realizedBy := (cons "citation" (cons "readme" (nil String))), conformance := "python3 -m unittest scripts.tests.test_r30.StandardsTests.test_citation_file_names_the_author_the_title_and_the_repository", coverage := "implemented"}) (cons (record Standard {id := "spdx", name := "SPDX License Expressions (SPDX 2.3, ISO/IEC 5962:2021)", authority := "https://spdx.github.io/spdx-spec/v2.3/SPDX-license-expressions/", version := "2.3", scope := "License identifiers of the vendored sources: the repository is MIT (LICENSE at the root, `license: MIT` in CITATION.cff); the prism-stdlib register carries the SPDX expression of its vendored license files.", realizedBy := (cons "stdlib-package" (cons "citation" (nil String))), conformance := "python3 -m unittest scripts.tests.test_r30.StandardsTests.test_spdx_expressions_are_well_formed", coverage := "implemented"}) (cons (record Standard {id := "sitemap-protocol", name := "Sitemaps XML protocol 0.9", authority := "https://www.sitemaps.org/protocol.html", version := "0.9", scope := "sitemap.xml: the page and the deep link of every step of every journey; robots.txt names the sitemap.", realizedBy := (cons "sitemap" (cons "robots" (cons "site" (cons "prize-review" (cons "research-session" (cons "reading" (cons "stdlib-feedback" (cons "mathematics" (cons "first-visit" (nil String)))))))))), conformance := "python3 -m unittest scripts.tests.test_r30.StandardsTests.test_sitemap_lists_every_step_deep_link", coverage := "implemented"}) (cons (record Standard {id := "open-graph", name := "The Open Graph protocol", authority := "https://ogp.me/", version := "ogp.me (2014-10)", scope := "og:title, og:type, og:url, og:description and og:image in the page's head, injected with the JSON-LD at render.", realizedBy := (cons "site" (cons "logo" (nil String))), conformance := "python3 -m unittest scripts.tests.test_r30.StandardsTests.test_site_head_carries_json_ld_and_open_graph", coverage := "implemented"}) (cons (record Standard {id := "rfc-8785", name := "RFC 8785, JSON Canonicalization Scheme (JCS)", authority := "https://www.rfc-editor.org/rfc/rfc8785", version := "2020-06", scope := "The identity of the published JSON contracts (sha256-canonical-json in contracts.toml) and the canonical JSON of the LexLean attestations; uor-addr labels JSON under JCS.", realizedBy := (cons "register-json" (cons "statements" (cons "kappa" (nil String)))), conformance := "python3 -m unittest scripts.tests.test_kappa (the no-prefix rule on the JCS vector)", coverage := "implemented"}) (cons (record Standard {id := "rivest-csexp", name := "Rivest, S-Expressions (canonical form, section 4.3)", authority := "https://people.csail.mit.edu/rivest/Sexp.txt", version := "draft-rivest-sexp-00, 1997-05-04", scope := "The kappa-label of a research module: the SHA-256 of the canonical S-expression of the declarations the kernel replays, as UOR-Foundation/uor-addr mints labels; the key of the replay receipts. The same canonical form labels the sequences of the basis, (sequence ), their transforms and the relations the discovery engines find, (relation ).", realizedBy := (cons "kappa" (cons "provenance" (cons "sequences" (cons "discover" (cons "Sequences" (cons "Discovery" (nil String))))))), conformance := "python3 -m unittest scripts.tests.test_kappa; bin/r30 kappa ; bin/r30 api check (sequences)", coverage := "implemented"}) (cons (record Standard {id := "in-toto-statement-v1", name := "in-toto Attestation Framework, Statement v1", authority := "https://github.com/in-toto/attestation/blob/main/spec/v1/statement.md", version := "v1", scope := "attestations.intoto.json: a Statement whose subjects are the attested PDFs and the paper's sources with their SHA-256 digests and whose predicate is the paper's LexLean attestation.", realizedBy := (cons "attestations" (cons "pdf-manifest" (cons "verify" (cons "paper-pdf" (cons "observations-pdf" (cons "core-pdf" (nil String))))))), conformance := "python3 -m unittest scripts.tests.test_r30.StandardsTests.test_in_toto_statement_subjects_are_the_attested_documents", coverage := "implemented"}) (cons (record Standard {id := "oci-distribution", name := "OCI Distribution Specification", authority := "https://github.com/opencontainers/distribution-spec/blob/main/spec.md", version := "1.1.0 (2024-02)", scope := "Planned: a kappa-registry serving the replay receipts and certified bundles by content address; today only the kappa-labels that would address them exist.", realizedBy := (cons "kappa" (nil String)), conformance := "bin/r30 kappa (the labels); no registry runs yet", coverage := "planned"}) (cons (record Standard {id := "iana-media-types", name := "IANA Media Types (RFC 6838)", authority := "https://www.iana.org/assignments/media-types/", version := "RFC 6838 (2013-01)", scope := "Every published artifact declares its media type in Presentation.lex.tex; the contracts register declares the vendor types of the JSON reports.", realizedBy := (prim append (cons "chain" (cons "register-json" (cons "register-text" (cons "frontier" (cons "interfaces" (cons "statements" (cons "explainer" (cons "picture" (cons "paper-pdf" (cons "observations-pdf" (cons "core-pdf" (cons "pdf-manifest" (cons "api-module" (cons "register-module" (cons "architecture-module" (cons "presentation-module" (cons "application-module" (cons "core-vectors" (cons "frontier-module" (cons "agents" (cons "round-workflow" (cons "strategy" (cons "readme" (cons "logo" (cons "standards" (cons "standards-module" (cons "openapi" (cons "sitemap" (cons "robots" (cons "provenance" (cons "jsonld" (cons "attestations" (cons "citation" (cons "observer-module" (cons "tokens" (cons "site" (cons "viz-core-js" (cons "viz-triangle-js" (cons "viz-tower-js" (cons "viz-ledger-js" (nil String))))))))))))))))))))))))))))))))))))))))) (cons "viz-rays-js" (cons "viz-defects-js" (cons "viz-dyadic-js" (nil String)))) : (List String)), conformance := "bin/r30 verify api: artifactPathsDistinct, panelsReadArtifacts (Presentation); python3 -m unittest scripts.tests.test_r30.StandardsTests", coverage := "implemented"}) (cons (record Standard {id := "lean-4", name := "Lean 4 (the kernel)", authority := "https://github.com/leanprover/lean4", version := "leanprover/lean4:v4.32.1", scope := "Every proved claim names a theorem the Lean kernel checked under propext and Quot.sound; the research modules are kernel-replayed with leanchecker.", realizedBy := (cons "Register" (cons "axioms" (cons "choice_audit" (cons "frontier_check" (cons "kappa" (cons "module_build" (nil String))))))), conformance := "bin/r30 frontier check; bin/r30 axioms ; bin/r30 choice-audit", coverage := "implemented"}) (cons (record Standard {id := "lexlean", name := "UOR-Foundation/LexLean (closed-lexicon LaTeX to Lean 4)", authority := "https://github.com/UOR-Foundation/LexLean", version := "0.4.0, language 1.2, compiler semantics 49a667a8078d", scope := "The authoring surface: the paper, the register and these API modules are LexLean modules verified by lexlean; the production roots export to certified Rust.", realizedBy := (cons "Api" (cons "Register" (cons "Architecture" (cons "Presentation" (cons "Application" (cons "Observer" (cons "Convert" (cons "Standards" (cons "Rule30Core" (cons "Sequences" (cons "Discovery" (cons "verify" (cons "check" (cons "api_sync" (cons "api_check" (cons "api_production" (nil String))))))))))))))))), conformance := "bin/r30 verify api; bin/r30 check api; bin/r30 api check", coverage := "implemented"}) (nil Standard))))))))))))))))))))))))), axioms: [] } @@ -281,7 +281,7 @@ theorem{ name: lexleanPinned, parameters: [], - statement: ((prim equal (standardVersion "lexlean" (standards)) "0.4.0, language 1.2, compiler semantics 2a0617a23636" : Bool) = true), + statement: ((prim equal (standardVersion "lexlean" (standards)) "0.4.0, language 1.2, compiler semantics 49a667a8078d" : Bool) = true), proof: decide{}, axioms: [] } diff --git a/rule30-lexlean/Core.pdf b/rule30-lexlean/Core.pdf index 015e9f12812c047d7dd6e3efca8141f266a471cb..b7847f47c4c437504012fed89697139171fa01f5 100644 GIT binary patch delta 122 zcmcb6hWYLp<_&XiDjAxZnwmvva_Rf#r?@1Rq$+5*SQ!}@nHd@y7#n~kH}Ah$!s%>b t;%H=SY;0m~X6b0+=H}>Z;A&)SXzXNc>SSQ%Z0KyKU_(gB=Ca4nnE=DyB4Pjl delta 122 zcmcb6hWYLp<_&XiDj66U7@J0Ea_Rf#r?@1Rq$+5*SQ!}@nHd@y7z5>ilAHJ6Ea7x^ ubTct=aWOM8HZ?Fdv~V{Hny}hH8U|bGcz}|Q?MbVWOLc$=S%>u9U;sB diff --git a/rule30-lexlean/lexlean.lock b/rule30-lexlean/lexlean.lock index 23e4a0c..1801b30 100644 --- a/rule30-lexlean/lexlean.lock +++ b/rule30-lexlean/lexlean.lock @@ -1,6 +1,6 @@ spec = "lexlean/lock/2" language = "1.2" -compiler_semantics = "2a0617a236367ffb610a9b5957fa21759aec43c2e2bbd5c5ed71b28e0b0bc7e3" +compiler_semantics = "49a667a8078dc6a386940bc73ea1197f5dabf4236c4e57a1aaf70bccddfd556a" project_config_sha256 = "19b484b35998550fc91a00820ee56382eaf79bbb39852dfb7d54e82018f0cd7b" lean_toolchain = "leanprover/lean4:v4.32.1" diff --git a/rule30-lexlean/pdf/Core.pdf b/rule30-lexlean/pdf/Core.pdf index 015e9f12812c047d7dd6e3efca8141f266a471cb..b7847f47c4c437504012fed89697139171fa01f5 100644 GIT binary patch delta 122 zcmcb6hWYLp<_&XiDjAxZnwmvva_Rf#r?@1Rq$+5*SQ!}@nHd@y7#n~kH}Ah$!s%>b t;%H=SY;0m~X6b0+=H}>Z;A&)SXzXNc>SSQ%Z0KyKU_(gB=Ca4nnE=DyB4Pjl delta 122 zcmcb6hWYLp<_&XiDj66U7@J0Ea_Rf#r?@1Rq$+5*SQ!}@nHd@y7z5>ilAHJ6Ea7x^ ubTct=aWOM8HZ?Fdv~V{Hny}hH8U|bGcz}|Q?MbVWOLc$=S%>u9U;sB diff --git a/rule30-paper/Observations.pdf b/rule30-paper/Observations.pdf index 5a6eb4037248c2dd695ebefee415e701fc96c8bd..d5efeb7c81947edb09af474e73cd3c4076279660 100644 GIT binary patch delta 113 zcmex%OW@lrfrb{w7N!>FEi5r2tcIp$21e5pMOY*t%J%$*I)Oic|; kU0hsEU0p3*Eu9RUoLpQ?EDX)<6l^RBDA``A$nuvP03IFEi5r2tOf=KCWg}!MOY*t% delta 132 zcmZphY~425x}k-!g{g(Pg{6hHg{_6Xg`FEi5r2tcIp$21e5pMOY*t%J%$*I)Oic|; kU0hsEU0p3*Eu9RUoLpQ?EDX)<6l^RBDA``A$nuvP03IFEi5r2tOf=KCWg}!MOY*t% delta 132 zcmZphY~425x}k-!g{g(Pg{6hHg{_6Xg` Date: Mon, 2 Nov 2026 20:11:06 -0700 Subject: [PATCH 2/2] Align the Host adapter with upstream and preserve output bytes --- AGENTS.md | 2 +- README.md | 3 + Rule30-Core.pdf | Bin 58973 -> 58973 bytes Rule30-Observations.pdf | Bin 273782 -> 273782 bytes Rule30-Paper.pdf | Bin 969094 -> 969094 bytes lexlean-stdlib/src/Host.lex.tex | 80 ++++++++++++++-------- pdf-manifest.json | 10 +-- rule30-api/lexlean.lock | 2 +- rule30-api/src/Host.lex.tex | 108 ++++++++++++++---------------- rule30-api/src/R30.lex.tex | 60 ++++++++--------- rule30-api/src/R30Traces.lex.tex | 65 ++++++++++++++++-- rule30-lexlean/Core.pdf | Bin 58973 -> 58973 bytes rule30-lexlean/pdf/Core.pdf | Bin 58973 -> 58973 bytes rule30-paper/Observations.pdf | Bin 273782 -> 273782 bytes rule30-paper/Paper.pdf | Bin 969094 -> 969094 bytes rule30-paper/pdf/Observations.pdf | Bin 273782 -> 273782 bytes rule30-paper/pdf/Paper.pdf | Bin 969094 -> 969094 bytes 17 files changed, 201 insertions(+), 129 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index f588880..85ee176 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -111,7 +111,7 @@ with no `main` and no effects beyond allocation, overflow and recursion: no file arguments or exit codes. An executable entry for a root that reads files and runs `lake`, `lexlean` and `git` is LexLean issue #271 (the effects boundary). So the logic moves into LexLean now, as authored modules with certified roots, and the remaining Python and shell glue is deleted -as the effect boundary is implemented on our v0.5-based LexLean branch. The vendored LexLeanStd.Host types are the upstream PR #396 interface; they are imported directly rather than mirrored in Rule30Api.Host. A capability LexLean, PrismPM or +as the effect boundary is implemented on our v0.5-based LexLean branch. The vendored LexLeanStd.Host types are the actual PR #389 interface ported to v0.5 in upstream PR #396; they are imported directly rather than mirrored in Rule30Api.Host. A capability LexLean, PrismPM or prism-stdlib cannot yet express is an upstream issue for those projects, never a reason for new Python or shell. The logic already moved: the command surface, the register, the converter (`rule30-api/src/Convert.lex.tex`), the engine's learning rule and schedule diff --git a/README.md b/README.md index 99780d6..51f4b9a 100644 --- a/README.md +++ b/README.md @@ -290,6 +290,9 @@ Pushing any version tag `v*` (e.g. `v0.1`) triggers [`.github/workflows/release. The compiler development pin follows LexLean `release/v0.5` through [the Host interface contribution](https://github.com/UOR-Foundation/LexLean/pull/396). +That source package ports the actual interface from +[LexLean #389](https://github.com/UOR-Foundation/LexLean/pull/389) to v0.5, +including fallible startup paths, timed child waits and byte output. The API imports `LexLeanStd.Host` from the pinned source package; its local `Host` module contains only the application harness. The attention catalog covers all 30 application and library modules. The generated executable diff --git a/Rule30-Core.pdf b/Rule30-Core.pdf index b7847f47c4c437504012fed89697139171fa01f5..721ef56f5ee6b8252f378a7bbbbcf934b4aeb472 100644 GIT binary patch delta 122 zcmcb6hWYLp<_&XiDj6FZ7??z9a_Rf#r?@1Rq$+5*SQ!}@nHd@y7#n~kH}Ah$!s%?} t=;rKfXyI&VX<+8!;^gLPZfR-gV(w;O;%Z`M>}+nQU_(gB=Ca4nnE=&yBH#c3 delta 122 zcmcb6hWYLp<_&XiDjAxZnwmvva_Rf#r?@1Rq$+5*SQ!}@nHd@y7#n~kH}Ah$!s%>b t;%H=SY;0m~X6b0+=H}>Z;A&)SXzXNc>SSQ%Z0KyKU_(gB=Ca4nnE=DyB4Pjl diff --git a/Rule30-Observations.pdf b/Rule30-Observations.pdf index d5efeb7c81947edb09af474e73cd3c4076279660..37f191518b3bf30d56241380836acd39a43669aa 100644 GIT binary patch delta 114 zcmex%OW@lrfrb{w7N!>FEi5r2tj2~0h6d9UMOY*t%FEi5r2tcIp$21e5pMOY*t%8HG zDK3d6sR|k{Rz?O!W`>3a#s*-??feV)#Mqr&Oie6|%uEeT9nH+lfouZ<;KBLYgcr!VJ|R{{V>GA2*} delta 151 zcmZphY~425x}k-!g{g(Pg{6hHg{_6Xg`8HG zDK3d6sR|k{Rz?O!W`>3a#s*-??feV)#Mqr&-ApY_49#5~%}fmpot-V53`~t&%`8j} X%v=rJ3=QoRY>Wsf*`B_fPhJTCZ;U4# diff --git a/lexlean-stdlib/src/Host.lex.tex b/lexlean-stdlib/src/Host.lex.tex index 94bb1f8..3db31a0 100644 --- a/lexlean-stdlib/src/Host.lex.tex +++ b/lexlean-stdlib/src/Host.lex.tex @@ -8,8 +8,8 @@ parameters: [], constructors: [ {name: notFound, fields: []}, + {name: alreadyExists, fields: []}, {name: denied, fields: []}, - {name: invalid, fields: []}, {name: other, fields: []} ] } @@ -28,42 +28,53 @@ constructors: [ {name: file, fields: []}, {name: directory, fields: []}, - {name: link, fields: []}, + {name: symlink, fields: []}, {name: other, fields: []} ] } structure{ - name: Stat, + name: Entry, type_parameters: [], parameters: [], fields: [ {name: kind, type: EntryKind}, {name: size, type: Nat}, - {name: device, type: Nat}, - {name: inode, type: Nat} + {name: identity, type: (Option (Nat * Nat))} ] } -inductive{ - name: Event, +structure{ + name: Child, type_parameters: [], parameters: [], - constructors: [ - {name: start, fields: [(List Bytes), Bytes, Bytes, (List (Bytes * Bytes)), Bool]}, - {name: read, fields: [(Result Bytes Failure)]}, - {name: wrote, fields: [(Result Unit Failure)]}, - {name: listed, fields: [(Result (List Bytes) Failure)]}, - {name: stated, fields: [(Result Stat Failure)]}, - {name: createdDir, fields: [(Result Unit Failure)]}, - {name: removedFile, fields: [(Result Unit Failure)]}, - {name: removedTree, fields: [(Result Unit Failure)]}, - {name: renamed, fields: [(Result Unit Failure)]}, - {name: canonicalized, fields: [(Result Bytes Failure)]}, - {name: locked, fields: [(Result Unit Failure)]}, - {name: spawned, fields: [(Result Nat Failure)]}, - {name: waited, fields: [(Result (Option Int32) Failure)]}, - {name: stopped, fields: [(Result Unit Failure)]} + fields: [ + {name: program, type: String}, + {name: arguments, type: (List String)}, + {name: directory, type: String}, + {name: environment, type: (List (String * String))}, + {name: output, type: String}, + {name: errors, type: String} + ] +} + +structure{ + name: Waited, + type_parameters: [], + parameters: [], + fields: [{name: finished, type: (List (Nat * (Option Int32)))}, {name: clock, type: Nat}] +} + +structure{ + name: Start, + type_parameters: [], + parameters: [], + fields: [ + {name: arguments, type: (List Bytes)}, + {name: directory, type: (Result Bytes Failure)}, + {name: executable, type: (Result Bytes Failure)}, + {name: environment, type: (List (Bytes * Bytes))}, + {name: terminal, type: Bool} ] } @@ -82,13 +93,26 @@ {name: rename, fields: [String, String]}, {name: canonical, fields: [String]}, {name: lock, fields: [String]}, - { - name: spawn, - fields: [String, (List String), String, (List (String * String)), String, String] - }, - {name: wait, fields: [Nat]}, + {name: spawn, fields: [Child]}, + {name: wait, fields: [(List Nat), Nat]}, {name: stop, fields: [Nat]}, - {name: exit, fields: [UInt8, String, String]} + {name: exit, fields: [UInt8, Bytes, Bytes]} + ] +} + +inductive{ + name: Event, + type_parameters: [], + parameters: [], + constructors: [ + {name: start, fields: [Start]}, + {name: read, fields: [(Result Bytes Failure)]}, + {name: finished, fields: [(Result Unit Failure)]}, + {name: listed, fields: [(Result (List Bytes) Failure)]}, + {name: stat, fields: [(Result Entry Failure)]}, + {name: canonical, fields: [(Result Bytes Failure)]}, + {name: spawned, fields: [(Result (Nat * Nat) Failure)]}, + {name: waited, fields: [(Result Waited Failure)]} ] } \end{semanticmodule} diff --git a/pdf-manifest.json b/pdf-manifest.json index 8f1681f..38a12e3 100644 --- a/pdf-manifest.json +++ b/pdf-manifest.json @@ -1,18 +1,18 @@ { "documents": { "Core": { - "pdf_sha256": "940b87b0b4d60600fa619e6ba7bca764bbcb17af854f4aedc1c4cf5180494761", + "pdf_sha256": "553b2db40b098aaf4b5046847d9b195e208bbf68deebf2ba834b390ed04d3e04", "tex_sha256": "a7cd1807077baa1d1ca34015faf500a24477991859427f4db646e5f230fe54e2" }, "Observations": { - "pdf_sha256": "69da57a66e4c6473d5cef6341362cdedfc448d6f2e0bdaf3a8fa2a1152631b25", + "pdf_sha256": "1ac41064582a623131d181a4dbc1d8112329c001a9b2c94ba2413ce61ac05931", "tex_sha256": "056820f37ac40133e341f46ad6c81125e35981150a1cc86f2063faad3f26fbd4" }, "Paper": { - "pdf_sha256": "886b25653fcb6dc3e8a9f361e4b0f26242ff546e2743e95fdbf8b6e60ec38e83", + "pdf_sha256": "652ede2e14e552a46893c304ae34fcf63ff47d3483de181cfc9ecf1ec345173c", "tex_sha256": "000f988561d9621f9ba2f9a99aba971670864367ebd336e6fbad0e1f71da01cb" } }, - "generated_at_utc": "2026-11-03T01:56:05.719630+00:00", - "source_digest": "fdd87b63b4023ea0f4dc1b03b821553afe87a075a201bdab1232c329996d3ed9" + "generated_at_utc": "2026-11-03T03:10:13.940417+00:00", + "source_digest": "88fb7ada0bad3d9d9c9e4dd70bc760f0ebc1d3b825d27508f2c6dd88d59f86a9" } diff --git a/rule30-api/lexlean.lock b/rule30-api/lexlean.lock index daf252d..16d18d5 100644 --- a/rule30-api/lexlean.lock +++ b/rule30-api/lexlean.lock @@ -72,6 +72,6 @@ version = "1.0.0" kind = "path" source = "lexlean-stdlib" module_prefix = "LexLeanStd" -tree_sha256 = "16a0a63ee71ac98409562e813a3064bdf56c5968eee36c697a12c45a8879ccd8" +tree_sha256 = "c762d97c09459088fa875b4649e3922a44ee44725d68d7d9302462afaabf0125" manifest_sha256 = "1d89879a58a3e4a76b64730a65b73386842ff7e66beb3dece7a5b148320c61e7" imports = [] diff --git a/rule30-api/src/Host.lex.tex b/rule30-api/src/Host.lex.tex index f4ea587..f1f92d9 100644 --- a/rule30-api/src/Host.lex.tex +++ b/rule30-api/src/Host.lex.tex @@ -4,38 +4,19 @@ \importmodule{LexLeanStd.Host} \title{Boolean} \begin{semanticmodule} -structure{ - name: Start, - type_parameters: [], - parameters: [], - fields: [ - {name: arguments, type: (List Bytes)}, - {name: directory, type: Bytes}, - {name: executable, type: Bytes}, - {name: environment, type: (List (Bytes * Bytes))}, - {name: stderrTerminal, type: Bool} - ] -} - definition{ name: asStart, parameters: [event : LexLeanStd.Host::Event], - result: (Option Start), + result: (Option LexLeanStd.Host::Start), body: (match event - | LexLeanStd.Host::Event.start arguments directory executable environment terminal => (ctor Option.some [Start] (record Start {arguments := arguments, directory := directory, executable := executable, environment := environment, stderrTerminal := terminal})) - | LexLeanStd.Host::Event.read o => (ctor Option.none [Start]) - | LexLeanStd.Host::Event.wrote o => (ctor Option.none [Start]) - | LexLeanStd.Host::Event.listed o => (ctor Option.none [Start]) - | LexLeanStd.Host::Event.stated o => (ctor Option.none [Start]) - | LexLeanStd.Host::Event.createdDir o => (ctor Option.none [Start]) - | LexLeanStd.Host::Event.removedFile o => (ctor Option.none [Start]) - | LexLeanStd.Host::Event.removedTree o => (ctor Option.none [Start]) - | LexLeanStd.Host::Event.renamed o => (ctor Option.none [Start]) - | LexLeanStd.Host::Event.canonicalized o => (ctor Option.none [Start]) - | LexLeanStd.Host::Event.locked o => (ctor Option.none [Start]) - | LexLeanStd.Host::Event.spawned o => (ctor Option.none [Start]) - | LexLeanStd.Host::Event.waited o => (ctor Option.none [Start]) - | LexLeanStd.Host::Event.stopped o => (ctor Option.none [Start])), + | LexLeanStd.Host::Event.start value => (ctor Option.some [LexLeanStd.Host::Start] value) + | LexLeanStd.Host::Event.read value => (ctor Option.none [LexLeanStd.Host::Start]) + | LexLeanStd.Host::Event.finished value => (ctor Option.none [LexLeanStd.Host::Start]) + | LexLeanStd.Host::Event.listed value => (ctor Option.none [LexLeanStd.Host::Start]) + | LexLeanStd.Host::Event.stat value => (ctor Option.none [LexLeanStd.Host::Start]) + | LexLeanStd.Host::Event.canonical value => (ctor Option.none [LexLeanStd.Host::Start]) + | LexLeanStd.Host::Event.spawned value => (ctor Option.none [LexLeanStd.Host::Start]) + | LexLeanStd.Host::Event.waited value => (ctor Option.none [LexLeanStd.Host::Start])), executable: true } @@ -44,42 +25,30 @@ parameters: [event : LexLeanStd.Host::Event], result: (Option (Result Bytes LexLeanStd.Host::Failure)), body: (match event - | LexLeanStd.Host::Event.start arguments directory executable environment terminal => (ctor Option.none [(Result Bytes LexLeanStd.Host::Failure)]) - | LexLeanStd.Host::Event.read o => (ctor Option.some [(Result Bytes LexLeanStd.Host::Failure)] o) - | LexLeanStd.Host::Event.wrote o => (ctor Option.none [(Result Bytes LexLeanStd.Host::Failure)]) - | LexLeanStd.Host::Event.listed o => (ctor Option.none [(Result Bytes LexLeanStd.Host::Failure)]) - | LexLeanStd.Host::Event.stated o => (ctor Option.none [(Result Bytes LexLeanStd.Host::Failure)]) - | LexLeanStd.Host::Event.createdDir o => (ctor Option.none [(Result Bytes LexLeanStd.Host::Failure)]) - | LexLeanStd.Host::Event.removedFile o => (ctor Option.none [(Result Bytes LexLeanStd.Host::Failure)]) - | LexLeanStd.Host::Event.removedTree o => (ctor Option.none [(Result Bytes LexLeanStd.Host::Failure)]) - | LexLeanStd.Host::Event.renamed o => (ctor Option.none [(Result Bytes LexLeanStd.Host::Failure)]) - | LexLeanStd.Host::Event.canonicalized o => (ctor Option.none [(Result Bytes LexLeanStd.Host::Failure)]) - | LexLeanStd.Host::Event.locked o => (ctor Option.none [(Result Bytes LexLeanStd.Host::Failure)]) - | LexLeanStd.Host::Event.spawned o => (ctor Option.none [(Result Bytes LexLeanStd.Host::Failure)]) - | LexLeanStd.Host::Event.waited o => (ctor Option.none [(Result Bytes LexLeanStd.Host::Failure)]) - | LexLeanStd.Host::Event.stopped o => (ctor Option.none [(Result Bytes LexLeanStd.Host::Failure)])), + | LexLeanStd.Host::Event.start value => (ctor Option.none [(Result Bytes LexLeanStd.Host::Failure)]) + | LexLeanStd.Host::Event.read value => (ctor Option.some [(Result Bytes LexLeanStd.Host::Failure)] value) + | LexLeanStd.Host::Event.finished value => (ctor Option.none [(Result Bytes LexLeanStd.Host::Failure)]) + | LexLeanStd.Host::Event.listed value => (ctor Option.none [(Result Bytes LexLeanStd.Host::Failure)]) + | LexLeanStd.Host::Event.stat value => (ctor Option.none [(Result Bytes LexLeanStd.Host::Failure)]) + | LexLeanStd.Host::Event.canonical value => (ctor Option.none [(Result Bytes LexLeanStd.Host::Failure)]) + | LexLeanStd.Host::Event.spawned value => (ctor Option.none [(Result Bytes LexLeanStd.Host::Failure)]) + | LexLeanStd.Host::Event.waited value => (ctor Option.none [(Result Bytes LexLeanStd.Host::Failure)])), executable: true } definition{ name: asStated, parameters: [event : LexLeanStd.Host::Event], - result: (Option (Result LexLeanStd.Host::Stat LexLeanStd.Host::Failure)), + result: (Option (Result LexLeanStd.Host::Entry LexLeanStd.Host::Failure)), body: (match event - | LexLeanStd.Host::Event.start arguments directory executable environment terminal => (ctor Option.none [(Result LexLeanStd.Host::Stat LexLeanStd.Host::Failure)]) - | LexLeanStd.Host::Event.read o => (ctor Option.none [(Result LexLeanStd.Host::Stat LexLeanStd.Host::Failure)]) - | LexLeanStd.Host::Event.wrote o => (ctor Option.none [(Result LexLeanStd.Host::Stat LexLeanStd.Host::Failure)]) - | LexLeanStd.Host::Event.listed o => (ctor Option.none [(Result LexLeanStd.Host::Stat LexLeanStd.Host::Failure)]) - | LexLeanStd.Host::Event.stated o => (ctor Option.some [(Result LexLeanStd.Host::Stat LexLeanStd.Host::Failure)] o) - | LexLeanStd.Host::Event.createdDir o => (ctor Option.none [(Result LexLeanStd.Host::Stat LexLeanStd.Host::Failure)]) - | LexLeanStd.Host::Event.removedFile o => (ctor Option.none [(Result LexLeanStd.Host::Stat LexLeanStd.Host::Failure)]) - | LexLeanStd.Host::Event.removedTree o => (ctor Option.none [(Result LexLeanStd.Host::Stat LexLeanStd.Host::Failure)]) - | LexLeanStd.Host::Event.renamed o => (ctor Option.none [(Result LexLeanStd.Host::Stat LexLeanStd.Host::Failure)]) - | LexLeanStd.Host::Event.canonicalized o => (ctor Option.none [(Result LexLeanStd.Host::Stat LexLeanStd.Host::Failure)]) - | LexLeanStd.Host::Event.locked o => (ctor Option.none [(Result LexLeanStd.Host::Stat LexLeanStd.Host::Failure)]) - | LexLeanStd.Host::Event.spawned o => (ctor Option.none [(Result LexLeanStd.Host::Stat LexLeanStd.Host::Failure)]) - | LexLeanStd.Host::Event.waited o => (ctor Option.none [(Result LexLeanStd.Host::Stat LexLeanStd.Host::Failure)]) - | LexLeanStd.Host::Event.stopped o => (ctor Option.none [(Result LexLeanStd.Host::Stat LexLeanStd.Host::Failure)])), + | LexLeanStd.Host::Event.start value => (ctor Option.none [(Result LexLeanStd.Host::Entry LexLeanStd.Host::Failure)]) + | LexLeanStd.Host::Event.read value => (ctor Option.none [(Result LexLeanStd.Host::Entry LexLeanStd.Host::Failure)]) + | LexLeanStd.Host::Event.finished value => (ctor Option.none [(Result LexLeanStd.Host::Entry LexLeanStd.Host::Failure)]) + | LexLeanStd.Host::Event.listed value => (ctor Option.none [(Result LexLeanStd.Host::Entry LexLeanStd.Host::Failure)]) + | LexLeanStd.Host::Event.stat value => (ctor Option.some [(Result LexLeanStd.Host::Entry LexLeanStd.Host::Failure)] value) + | LexLeanStd.Host::Event.canonical value => (ctor Option.none [(Result LexLeanStd.Host::Entry LexLeanStd.Host::Failure)]) + | LexLeanStd.Host::Event.spawned value => (ctor Option.none [(Result LexLeanStd.Host::Entry LexLeanStd.Host::Failure)]) + | LexLeanStd.Host::Event.waited value => (ctor Option.none [(Result LexLeanStd.Host::Entry LexLeanStd.Host::Failure)])), executable: true } @@ -147,7 +116,7 @@ name: textOfNote, parameters: [], result: String, - body: "textOf is rule30's stand-in for prim utf8_decode at the String boundary: at the pinned LexLean, utf8_decode (like format_decimal and split_exact) depends on Classical.choice in its Lean model, which rule30 forbids, and no other primitive turns Bytes into a String. textOf is exact on ASCII and on the scalars of multibyte, the non-ASCII characters of rule30's registers and prose (frontier.toml has only ≤, the fixture of R30Traces has ⊕); every other scalar becomes one U+FFFD (its lead byte gives U+FFFD, its continuation bytes nothing). So bytes taken from the host reach the driver unchanged exactly when they are ASCII or scalars of multibyte. The traces of R30Traces and its sibling modules compare the pieces of plan byte for byte with the deprecated runtime's output. pieceScalars is a parallel definition, for the kernel: pieceText joins what pieceScalars lists, and the reflexivity theorems realize*, render*, pieceText* and textOf* of R30Traces state that link for any argument, so realize, render, pieceTexts, pieceText and textOf cannot change without a theorem failing. realizedAgrees decides the scalars of pieceScalars on a run, and R30TracesClaims.traceClaimAlpha uses it on a register that holds ⊕; R30Traces.textChars* decide charsFrom on all of ASCII and all of multibyte. The one stated gap: join does not reduce under decide (it is Lean's String.intercalate), so no theorem states that joining the joined texts of the pieces, which render does, gives the join of their scalars in one list. textOf becomes utf8_decode the day that primitive is choice-free.", + body: "textOf is rule30's stand-in for prim utf8_decode at the String boundary: at the pinned LexLean, utf8_decode (like format_decimal and split_exact) depends on Classical.choice in its Lean model, which rule30 forbids, and no other primitive turns Bytes into a String. textOf is exact on ASCII and on the scalars of multibyte, the non-ASCII characters of rule30's registers and prose (frontier.toml has only ≤, the fixture of R30Traces has ⊕); every other scalar becomes one U+FFFD (its lead byte gives U+FFFD, its continuation bytes nothing). This limitation applies to paths converted through render. Exit output uses renderBytes instead: literal pieces are UTF-8 encoded and taken pieces are appended unchanged, including bytes outside the decoder's scalar table. The traces of R30Traces and its sibling modules compare the pieces of plan byte for byte with the deprecated runtime's output. pieceScalars is a parallel definition, for the kernel: pieceText joins what pieceScalars lists, and the reflexivity theorems realize*, render*, pieceText* and textOf* of R30Traces state that link for any argument, so realize, render, pieceTexts, pieceText and textOf cannot change without a theorem failing. realizedAgrees decides the scalars of pieceScalars on a run, and R30TracesClaims.traceClaimAlpha uses it on a register that holds ⊕; R30Traces.textChars* decide charsFrom on all of ASCII and all of multibyte. The one stated gap: join does not reduce under decide (it is Lean's String.intercalate), so no theorem states that joining the joined texts of the pieces, which render does, gives the join of their scalars in one list. textOf becomes utf8_decode the day that primitive is choice-free.", executable: true } @@ -269,6 +238,27 @@ executable: true } +definition{ + name: pieceBytes, + parameters: [piece : Piece], + result: Bytes, + body: (match piece + | Piece.literal text => (prim utf8_encode text : Bytes) + | Piece.taken bytes => bytes), + executable: true +} + +definition{ + name: renderBytes, + parameters: [pieces : (List Piece)], + result: Bytes, + body: (match pieces + | List.nil => 0x + | List.cons piece rest => (prim append (pieceBytes piece) (renderBytes rest) : Bytes)), + recursive_argument: pieces, + executable: true +} + definition{ name: realize, parameters: [draft : Draft], @@ -276,7 +266,7 @@ body: (match draft | Draft.read path => (ctor LexLeanStd.Host::Request.read (render path)) | Draft.stat path => (ctor LexLeanStd.Host::Request.stat (render path)) - | Draft.exit status output errors => (ctor LexLeanStd.Host::Request.exit status (render output) (render errors))), + | Draft.exit status output errors => (ctor LexLeanStd.Host::Request.exit status (renderBytes output) (renderBytes errors))), axioms: [Quot.sound, propext], executable: true } diff --git a/rule30-api/src/R30.lex.tex b/rule30-api/src/R30.lex.tex index 64ee85a..6ed1a61 100644 --- a/rule30-api/src/R30.lex.tex +++ b/rule30-api/src/R30.lex.tex @@ -10,7 +10,7 @@ name: rootKind, parameters: [], result: String, - body: "step has the signature of a command root of LexLean issue 271 over the mirror Host, and is declared a production root for rust-std with the effects LexLean 0.4.0 admits (allocation, overflow, recursion): lexlean verify certifies the root, and lexlean production compiles it to a Rust library function with no main when a request names it. rule30-api/production/request.json does not name it, because that file and model/runtime-roots.toml are generated from the tables of the deprecated tools/r30, which take no additions; so bin/r30 api production does not build this root, and exporting it takes a request of its own until the runtime moves. Its closure builds three Request constructors, read, stat and exit, through Host::realize, so under rule 5 of 271 it realizes files and not process. When rule30 pins the release that lands 271, Host:: becomes LexLeanStd.Host:: (imported from LexLean's stdlib as a source package, SPEC 10.5), the root's effects become [allocation, files, overflow, recursion], and the same signature makes it the command root whose generated driver is rule30's binary; a verb that spawns a process adds Draft.spawn, and process with it. plan is the step before its texts are joined (step realizes plan, by definition); the kernel decides traces of plan.", + body: "step consumes LexLeanStd.Host.Event and returns a session and LexLeanStd.Host.Request. These are imported source-package types from the v0.5 development branch; Rule30Api.Host supplies application adapters, not duplicate protocol types. The root is certified for rust-std with allocation, overflow and recursion, and production exports a pure Rust library function when a request names it. Its closure constructs read, stat and exit through Host::realize. Constructing a request does not execute an effect: the compiler's generated command driver, files and process effect checking, and connection to the research executor remain implementation work on our v0.5-based LexLean branch. rule30-api/production/request.json and model/runtime-roots.toml still describe the deprecated runtime's roots, so bin/r30 api production does not export step. plan carries paths and output as pieces; step realizes paths as text and output as exact bytes. step realizes plan by definition, and the kernel decides traces of plan.", executable: true } @@ -47,7 +47,7 @@ name: registerUnreadable, parameters: [], result: ErrorRow, - body: (record ErrorRow {code := "R301004", title := "Register cannot be read", family := "register", status := (1 : UInt8), statement := "No directory at or above the working directory holds .git, the host could not stat a .git on the way up, or it could not read frontier.toml in the repository root; the path, the failure's kind and the host's message follow."}), + body: (record ErrorRow {code := "R301004", title := "Register cannot be read", family := "register", status := (1 : UInt8), statement := "The host could not obtain the working directory, no directory at or above it holds .git, the host could not stat a .git on the way up, or it could not read frontier.toml in the repository root; the path, the failure's kind and the host's message follow."}), executable: true } @@ -644,31 +644,6 @@ executable: true } -definition{ - name: frontierCommand, - parameters: [arguments : (List Bytes), rest : (List Bytes), top : Nat], - result: (Session * Host::Draft), - body: (match rest - | List.cons sub options => (if (word sub (wordList)) then (match (scanList options (ctor Option.none [Bytes]) false false) - | ListForm.listed filter => ((record Session {awaiting := (ctor Awaiting.root filter 0 top)}), (ctor Host::Draft.stat (gitAt 0))) - | ListForm.help => (finish (0 : UInt8) (lit (listHelp)) (nil Host::Piece)) - | ListForm.refused detail => (failWith (commandLineRefused) (lit detail))) else (refuse arguments)) - | List.nil => (refuse arguments)), - executable: true -} - -definition{ - name: begin, - parameters: [start : Host::Start], - result: (Session * Host::Draft), - body: (let arguments : (List Bytes) := (project start arguments); (match arguments - | List.nil => (finish (0 : UInt8) (lit (usage)) (nil Host::Piece)) - | List.cons verb rest => (if ((word verb (wordHelp)) || ((word verb (wordHelpFlag)) || (word verb (wordHelpShort)))) then (finish (0 : UInt8) (lit (usage)) (nil Host::Piece)) else (if ((word verb (wordVersion)) || (word verb (wordVersionFlag))) then (match rest - | List.nil => (finish (0 : UInt8) (versionOutput) (nil Host::Piece)) - | List.cons extra others => (failWith (commandLineRefused) (lit "version takes no arguments"))) else (if (word verb (wordFrontier)) then (frontierCommand arguments rest (components (project start directory))) else (refuse arguments)))))), - executable: true -} - definition{ name: scalarsFrom, parameters: [bytes : Bytes, position : Nat, fuel : Nat], @@ -782,7 +757,7 @@ body: (match kind | LexLeanStd.Host::FailureKind.notFound => "not found" | LexLeanStd.Host::FailureKind.denied => "permission denied" - | LexLeanStd.Host::FailureKind.invalid => "invalid path" + | LexLeanStd.Host::FailureKind.alreadyExists => "already exists" | LexLeanStd.Host::FailureKind.other => "failed"), executable: true } @@ -794,7 +769,7 @@ body: (match kind | LexLeanStd.Host::FailureKind.notFound => true | LexLeanStd.Host::FailureKind.denied => false - | LexLeanStd.Host::FailureKind.invalid => false + | LexLeanStd.Host::FailureKind.alreadyExists => false | LexLeanStd.Host::FailureKind.other => false), executable: true } @@ -807,6 +782,31 @@ executable: true } +definition{ + name: frontierCommand, + parameters: [arguments : (List Bytes), rest : (List Bytes), directory : (Result Bytes LexLeanStd.Host::Failure)], + result: (Session * Host::Draft), + body: (match rest + | List.cons sub options => (if (word sub (wordList)) then (match (scanList options (ctor Option.none [Bytes]) false false) + | ListForm.listed filter => (match directory | Result.ok path => ((record Session {awaiting := (ctor Awaiting.root filter 0 (components path))}), (ctor Host::Draft.stat (gitAt 0))) | Result.error failure => (failWith (registerUnreadable) (failureDetail (lit "working directory") failure))) + | ListForm.help => (finish (0 : UInt8) (lit (listHelp)) (nil Host::Piece)) + | ListForm.refused detail => (failWith (commandLineRefused) (lit detail))) else (refuse arguments)) + | List.nil => (refuse arguments)), + executable: true +} + +definition{ + name: begin, + parameters: [start : LexLeanStd.Host::Start], + result: (Session * Host::Draft), + body: (let arguments : (List Bytes) := (project start arguments); (match arguments + | List.nil => (finish (0 : UInt8) (lit (usage)) (nil Host::Piece)) + | List.cons verb rest => (if ((word verb (wordHelp)) || ((word verb (wordHelpFlag)) || (word verb (wordHelpShort)))) then (finish (0 : UInt8) (lit (usage)) (nil Host::Piece)) else (if ((word verb (wordVersion)) || (word verb (wordVersionFlag))) then (match rest + | List.nil => (finish (0 : UInt8) (versionOutput) (nil Host::Piece)) + | List.cons extra others => (failWith (commandLineRefused) (lit "version takes no arguments"))) else (if (word verb (wordFrontier)) then (frontierCommand arguments rest (project start directory)) else (refuse arguments)))))), + executable: true +} + definition{ name: noRoot, parameters: [], @@ -825,7 +825,7 @@ definition{ name: probed, - parameters: [filter : (Option Bytes), level : Nat, top : Nat, outcome : (Result LexLeanStd.Host::Stat LexLeanStd.Host::Failure)], + parameters: [filter : (Option Bytes), level : Nat, top : Nat, outcome : (Result LexLeanStd.Host::Entry LexLeanStd.Host::Failure)], result: (Session * Host::Draft), body: (match outcome | Result.ok found => ((record Session {awaiting := (ctor Awaiting.register filter level)}), (ctor Host::Draft.read (registerAt level))) diff --git a/rule30-api/src/R30Traces.lex.tex b/rule30-api/src/R30Traces.lex.tex index b90a146..b9aea23 100644 --- a/rule30-api/src/R30Traces.lex.tex +++ b/rule30-api/src/R30Traces.lex.tex @@ -217,11 +217,18 @@ body: 0xe28a95e289a4e289a5e28093e28892c2b7c2ace288a7e288a8e28888e28094cebae28692e286a6e280a6e28495e29fbae29fb9e28792e28694e28690e289a1e28988e289a0c397c2b1e28898e28880e28883e288a9e288aae2889ec2a7cf83cf84ceb4cea6e28280e28281e28282e28283c2b2e28099e2809ce2809de28a968041 } +definition{ + name: startedUnavailable, + parameters: [arguments : (List Bytes)], + result: LexLeanStd.Host::Event, + body: (let failure : LexLeanStd.Host::Failure := (record LexLeanStd.Host::Failure {kind := (ctor LexLeanStd.Host::FailureKind.denied), message := (permissionDenied)}); (ctor LexLeanStd.Host::Event.start (record LexLeanStd.Host::Start {arguments := arguments, directory := (ctor Result.error [Bytes, LexLeanStd.Host::Failure] failure), executable := (ctor Result.error [Bytes, LexLeanStd.Host::Failure] failure), environment := (nil (Bytes * Bytes)), terminal := false}))) +} + definition{ name: startedIn, parameters: [arguments : (List Bytes), directory : Bytes], result: LexLeanStd.Host::Event, - body: (ctor LexLeanStd.Host::Event.start arguments directory (executablePath) (nil (Bytes * Bytes)) false) + body: (ctor LexLeanStd.Host::Event.start (record LexLeanStd.Host::Start {arguments := arguments, directory := (ctor Result.ok [Bytes, LexLeanStd.Host::Failure] directory), executable := (ctor Result.ok [Bytes, LexLeanStd.Host::Failure] (executablePath)), environment := (nil (Bytes * Bytes)), terminal := false})) } definition{ @@ -235,21 +242,21 @@ name: statedDirectory, parameters: [], result: LexLeanStd.Host::Event, - body: (ctor LexLeanStd.Host::Event.stated (ctor Result.ok [LexLeanStd.Host::Stat, LexLeanStd.Host::Failure] (record LexLeanStd.Host::Stat {kind := (ctor LexLeanStd.Host::EntryKind.directory), size := 4096, device := 0, inode := 0}))) + body: (ctor LexLeanStd.Host::Event.stat (ctor Result.ok [LexLeanStd.Host::Entry, LexLeanStd.Host::Failure] (record LexLeanStd.Host::Entry {kind := (ctor LexLeanStd.Host::EntryKind.directory), size := 4096, identity := (ctor Option.none [(Nat * Nat)])}))) } definition{ name: statedMissing, parameters: [], result: LexLeanStd.Host::Event, - body: (ctor LexLeanStd.Host::Event.stated (ctor Result.error [LexLeanStd.Host::Stat, LexLeanStd.Host::Failure] (record LexLeanStd.Host::Failure {kind := (ctor LexLeanStd.Host::FailureKind.notFound), message := (noSuchFile)}))) + body: (ctor LexLeanStd.Host::Event.stat (ctor Result.error [LexLeanStd.Host::Entry, LexLeanStd.Host::Failure] (record LexLeanStd.Host::Failure {kind := (ctor LexLeanStd.Host::FailureKind.notFound), message := (noSuchFile)}))) } definition{ name: statedFailed, parameters: [kind : LexLeanStd.Host::FailureKind, message : Bytes], result: LexLeanStd.Host::Event, - body: (ctor LexLeanStd.Host::Event.stated (ctor Result.error [LexLeanStd.Host::Stat, LexLeanStd.Host::Failure] (record LexLeanStd.Host::Failure {kind := kind, message := message}))) + body: (ctor LexLeanStd.Host::Event.stat (ctor Result.error [LexLeanStd.Host::Entry, LexLeanStd.Host::Failure] (record LexLeanStd.Host::Failure {kind := kind, message := message}))) } definition{ @@ -574,6 +581,38 @@ axioms: [propext] } +theorem{ + name: traceStartDirectoryFailure, + parameters: [], + statement: ((Host::traceAgrees (run (cons (startedUnavailable (cons (argFrontier) (cons (argList) (nil Bytes)))) (nil LexLeanStd.Host::Event))) (cons (exited (1 : UInt8) (nil Host::Piece) (expectError "R301004" "Register cannot be read" (cons (piece "working directory") (cons (piece ": ") (cons (piece "permission denied") (cons (piece " (") (cons (ctor Host::Piece.taken (permissionDenied)) (cons (piece ")") (nil Host::Piece))))))))) (nil Host::Draft))) = true), + proof: decide{}, + axioms: [propext] +} + +theorem{ + name: traceHelpWithoutDirectory, + parameters: [], + statement: ((Host::traceAgrees (run (cons (startedUnavailable (cons (argHelp) (nil Bytes))) (nil LexLeanStd.Host::Event))) (cons (exited (0 : UInt8) (R30::lit (R30::usage)) (nil Host::Piece)) (nil Host::Draft))) = true), + proof: decide{}, + axioms: [propext] +} + +theorem{ + name: traceListHelpWithoutDirectory, + parameters: [], + statement: ((Host::traceAgrees (run (cons (startedUnavailable (cons (argFrontier) (cons (argList) (cons (argHelpFlag) (nil Bytes))))) (nil LexLeanStd.Host::Event))) (cons (exited (0 : UInt8) (R30::lit (R30::listHelp)) (nil Host::Piece)) (nil Host::Draft))) = true), + proof: decide{}, + axioms: [propext] +} + +theorem{ + name: traceVersionWithoutDirectory, + parameters: [], + statement: ((Host::traceAgrees (run (cons (startedUnavailable (cons (argVersion) (nil Bytes))) (nil LexLeanStd.Host::Event))) (cons (exited (0 : UInt8) (R30::versionOutput) (nil Host::Piece)) (nil Host::Draft))) = true), + proof: decide{}, + axioms: [propext] +} + theorem{ name: realizeRead, parameters: [path : (List Host::Piece)], @@ -593,7 +632,23 @@ theorem{ name: realizeExit, parameters: [status : UInt8, output : (List Host::Piece), errorOutput : (List Host::Piece)], - statement: ((Host::realize (ctor Host::Draft.exit status output errorOutput)) = (ctor LexLeanStd.Host::Request.exit status (Host::render output) (Host::render errorOutput))), + statement: ((Host::realize (ctor Host::Draft.exit status output errorOutput)) = (ctor LexLeanStd.Host::Request.exit status (Host::renderBytes output) (Host::renderBytes errorOutput))), + proof: reflexivity{}, + axioms: [Quot.sound, propext] +} + +theorem{ + name: takenOutputBytesAreExact, + parameters: [bytes : Bytes], + statement: ((Host::pieceBytes (ctor Host::Piece.taken bytes)) = bytes), + proof: reflexivity{}, + axioms: [] +} + +theorem{ + name: exitComposesLiteralAndArbitraryBytes, + parameters: [status : UInt8, prefix : String, bytes : Bytes], + statement: ((Host::realize (ctor Host::Draft.exit status (cons (piece prefix) (cons (ctor Host::Piece.taken bytes) (nil Host::Piece))) (nil Host::Piece))) = (ctor LexLeanStd.Host::Request.exit status (prim append (prim utf8_encode prefix : Bytes) (prim append bytes 0x : Bytes) : Bytes) 0x)), proof: reflexivity{}, axioms: [Quot.sound, propext] } diff --git a/rule30-lexlean/Core.pdf b/rule30-lexlean/Core.pdf index b7847f47c4c437504012fed89697139171fa01f5..721ef56f5ee6b8252f378a7bbbbcf934b4aeb472 100644 GIT binary patch delta 122 zcmcb6hWYLp<_&XiDj6FZ7??z9a_Rf#r?@1Rq$+5*SQ!}@nHd@y7#n~kH}Ah$!s%?} t=;rKfXyI&VX<+8!;^gLPZfR-gV(w;O;%Z`M>}+nQU_(gB=Ca4nnE=&yBH#c3 delta 122 zcmcb6hWYLp<_&XiDjAxZnwmvva_Rf#r?@1Rq$+5*SQ!}@nHd@y7#n~kH}Ah$!s%>b t;%H=SY;0m~X6b0+=H}>Z;A&)SXzXNc>SSQ%Z0KyKU_(gB=Ca4nnE=DyB4Pjl diff --git a/rule30-lexlean/pdf/Core.pdf b/rule30-lexlean/pdf/Core.pdf index b7847f47c4c437504012fed89697139171fa01f5..721ef56f5ee6b8252f378a7bbbbcf934b4aeb472 100644 GIT binary patch delta 122 zcmcb6hWYLp<_&XiDj6FZ7??z9a_Rf#r?@1Rq$+5*SQ!}@nHd@y7#n~kH}Ah$!s%?} t=;rKfXyI&VX<+8!;^gLPZfR-gV(w;O;%Z`M>}+nQU_(gB=Ca4nnE=&yBH#c3 delta 122 zcmcb6hWYLp<_&XiDjAxZnwmvva_Rf#r?@1Rq$+5*SQ!}@nHd@y7#n~kH}Ah$!s%>b t;%H=SY;0m~X6b0+=H}>Z;A&)SXzXNc>SSQ%Z0KyKU_(gB=Ca4nnE=DyB4Pjl diff --git a/rule30-paper/Observations.pdf b/rule30-paper/Observations.pdf index d5efeb7c81947edb09af474e73cd3c4076279660..37f191518b3bf30d56241380836acd39a43669aa 100644 GIT binary patch delta 114 zcmex%OW@lrfrb{w7N!>FEi5r2tj2~0h6d9UMOY*t%FEi5r2tcIp$21e5pMOY*t%8HG zDK3d6sR|k{Rz?O!W`>3a#s*-??feV)#Mqr&Oie6|%uEeT9nH+lfouZ<;KBLYgcr!VJ|R{{V>GA2*} delta 151 zcmZphY~425x}k-!g{g(Pg{6hHg{_6Xg`8HG zDK3d6sR|k{Rz?O!W`>3a#s*-??feV)#Mqr&-ApY_49#5~%}fmpot-V53`~t&%`8j} X%v=rJ3=QoRY>Wsf*`B_fPhJTCZ;U4# diff --git a/rule30-paper/pdf/Observations.pdf b/rule30-paper/pdf/Observations.pdf index d5efeb7c81947edb09af474e73cd3c4076279660..37f191518b3bf30d56241380836acd39a43669aa 100644 GIT binary patch delta 114 zcmex%OW@lrfrb{w7N!>FEi5r2tj2~0h6d9UMOY*t%FEi5r2tcIp$21e5pMOY*t%8HG zDK3d6sR|k{Rz?O!W`>3a#s*-??feV)#Mqr&Oie6|%uEeT9nH+lfouZ<;KBLYgcr!VJ|R{{V>GA2*} delta 151 zcmZphY~425x}k-!g{g(Pg{6hHg{_6Xg`8HG zDK3d6sR|k{Rz?O!W`>3a#s*-??feV)#Mqr&-ApY_49#5~%}fmpot-V53`~t&%`8j} X%v=rJ3=QoRY>Wsf*`B_fPhJTCZ;U4#