Repository navigation
BS-52: the conservative checker of LSE expressions as source (#269) - #524
Draft
humuhumu33 wants to merge 3 commits into
Draft
humuhumu33 wants to merge 3 commits into
humuhumu33 wants to merge 3 commits into
Conversation
LseTypes holds checkSignature and checkValue to lse::check_signature and check_value: the zonked type and the type of every natural literal, or the first error, with the oracle's metavariable numbering and capture-avoiding renames. The lookup closure is handed over as rows and a fallback (Missing for a closure, Opaque for a package as it loads). Each recursive definition is structural over a chain built from a bound on nesting the host passes, so both roots admit recursion. 20 planted defects are each detected by their own vector. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…definitions Regeneration run 43316854893 stopped on LLV7005: 21 definitions that reach the standard library's numerals observe Quot.sound and propext; they now declare them. Conditions on a component of a pair go through flagOf and typedCk, the shape BS-50's certificate needed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Third slice of the lexicon closure of #269.
bootstrap/src/LseTypes.lex.texholdscheckSignatureandcheckValuetolse::check_signatureandcheck_value: the zonked type and every literal's type, or the first error, with the oracle's metavariable numbering and capture-avoiding renames. The lookup closure is handed over as rows plus a fallback (Missingfor a closure,Opaquefor a package as it loads). Each recursive definition is structural over a chain built from a nesting bound the host passes (192), so both roots admitrecursion.Rust-backend limitation found (no Rust changed here). A definition that calls itself as its last step is rendered as a loop whose exit wraps a tail call to another fallible definition in
Err(..)without propagating its overflow, which the validator refuses with LLB6005. The module works around it:inferBinding,inferRestandunifyPiLoopbind their own recursive call and rebuild the record. A fix belongs incalculus/rust/lower.rs.Case (
conformance_bs_52, run on WSL over26e5e0ace). 39 named vectors over a hand-built glossary, the signatures and defined values of the 43 committed packages that load (224 signature and 236 value runs, each checked against its own package and against the builtins), and seeded expressions. The evaluator agrees on 899 runs and rustc on 3,499; all 20 planted defects are detected.Regenerated.
8911e442f2applies regenerate.yml run 43335583294 (base8fa301f907): the export with LseTypes' two packages and their stack bounds, the oracles, the verify records, and the counts (manifests 330 -> 332). Two commits before it:max_child_output_bytes = 268435456(the maintainer's decision), and the axioms Lean observes on 21 definitions (LLV7005 in run 43316854893) with pair flags read through definitions. Ready for the parent's batch landing; it stays a draft.🤖 Generated with Claude Code
Supersedes #502 (rebuilt onto release/v0.4 after RB-24 moved the compiler-semantics ID; the old branch and PR are left untouched).