Repository navigation
Conversation
…0 (7.2) `cargo xtask tables` now writes crates/clazel-js-lexer/src/unicode_data.rs from DerivedCoreProperties.txt (Unicode 18.0.0), the copy vendored for clazel-js-regexp, after checking its SHA-256 against that SOURCE.md; `check` fails if the table is stale. `unicode.rs` looks code points up by bisection. Nothing ties the tables to the spec's uninterpreted unicode_id_start_non_ascii / unicode_id_continue_non_ascii: Verus proves only that a lookup is total and false outside U+0080..U+10FFFF. Tests check the tables are sorted and disjoint, ID_Start is within ID_Continue, and known code points. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
src/exec.rs: next_input_element and next_token as Verus exec code, one scan_ function per production of spec.rs, no recursion. Verus proves (no escape hatch) that every input gives a result without panic or overflow, that Eof comes exactly at the end, that an element is a non-empty range at pos inside the source text (so elements tile the input), that the value's variant matches the kind, and that next_token's token is after pos, not trivia, with newline_before set only by a line terminator in between. Not proven: agreement with spec.rs (the kind derives the range, the length is longest_len, the errors are lex_error's, the values are SV/TV/TRV/ IdentifierCodePoints). So the functions do not implement api::JsLexer and the crate stays at tier 0. lemma_contract_implies_proven shows the proven part is a weakening of the contract. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tests/lexer.rs: positive and negative cases for every element kind, the Annex B HTML-like comments, the numeric-literal follow rule and escape early errors, SV/TV/TRV values, and a totality sweep over every input of up to three code points from a branch-covering alphabet (a stride under Miri). tests/test262.rs (ignored under Miri: it reads files): over all 5,212 vendored tests, the elements tile each file in two goals, and every test that must parse (829) lexes to the end with goals guessed from the previous token. This is not the conformance run, which needs the parser (7.3). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
next_input_element and next_token now also ensure kind_agrees_proven: a WhiteSpace, LineTerminator, HashbangComment, DivPunctuator or RightBracePunctuator element is derived by its kind in the goal (element_matches, the contract's own conjunct). The other kinds' derivation, the longest-element rule, the errors and the values remain unproven, as the module header lists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
atiernan
had a problem deploying
to
full-verification
November 17, 2026 12:18 — with
GitHub Actions
Error
atiernan
had a problem deploying
to
full-verification
November 17, 2026 20:28 — with
GitHub Actions
Error
atiernan
temporarily deployed
to
full-verification
November 20, 2026 14:25 — with
GitHub Actions
Inactive
atiernan
requested a deployment
to
full-verification
November 20, 2026 20:22 — with
GitHub Actions
Queued
This branch is being 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.
The second half of Phase 7 item 7.2: the JS lexer's implementation, against the spec and contracts in #178. Totality and span coverage are proven, but full agreement with the spec is not, so the crate stays at tier 0 and doesn't implement
api::JsLexeryet.spec.rs,contract.rsandapi.rsare unchanged.Stacked on #178. Merge that PR first, or retarget this one afterwards.
What's here
src/exec.rs: the lexer, written as exec Verus code.xtask/src/js_idents.rsgeneratessrc/unicode_data.rsfrom the vendoredDerivedCoreProperties.txt(Unicode 18.0.0, inclazel-js-regexp'sucd-regexpsuite), checking its SHA-256 and version header. It holds 693 ID_Start ranges and 810 ID_Continue ranges above U+007F. It runs undercargo xtask tables, andcargo xtask checkfails if the table is stale.src/unicode.rslooks it up by bisection.tests/lexer.rs,tests/test262.rsandtests/unicode_tables.rs.Proven
next_input_element:Eofexactly at the end of the input, andErronly before it;posand is non-empty, so repeated calls cover the input with no gaps;/and}match the contract'selement_matches.next_token:newline_beforeis set, a line terminator lies betweenposand the token.lemma_contract_implies_proven: the full contract implies what is proven here, so the proven claim is a weaker form of the contract, not a different one.push_utf16.scan_*function is total and stays in bounds.#[verifier::opaque]on the generated table consts, asclazel-idnadoes.Not proven
lex_error.newline_beforeis set whenever a line terminator lies in between (only the other direction is proven).bigintandlegacy.unicode_id_start_non_ascii/unicode_id_continue_non_ascii. Nothing about it is claimed.mutations.json.For the reviewer
/*: read literally, the longest-element rule lexes it as/then*in a goal that allows a division punctuator, rather than as an error. That is faithful to the grammar, and the parser will reject it.Tests
tests/lexer.rs, positive and negative cases for every kind. They include a totality sweep over every input of up to 3 code points from a 38-code-point alphabet, in every goal.Verification
verification results:: 118 verified, 0 errors.cargo xtask check: STATIC CHECKS PASSED.cargo xtask tablesis up to date.cargo test -p clazel-js-lexerandcargo test -p xtaskpass, and clippy-D warningsand rustfmt are clean.cargo xtask verify --changedwas not run, because the branch changesxtask/. CI's full verification is the check, and its proof jobs need approval.🤖 Generated with Claude Code