Rename the tool to lucisv (Language Utility for Coding In SystemVerilog)
This commit is contained in:
1 parent
a284e33110
commit
eeaffafd56
188 files changed
+2825
-2802
No files matched your search
@@ -197,7 +197,7 @@ precisely to carry free text:
|
||||
|
||||
The leading whitespace of `line two` is part of the string's **value**.
|
||||
Round 1 re-indented it like any other continuation line (QA measured 3 spaces
|
||||
becoming 7) *and* masked the change in `verify.rs`, so `vfmt` exited 0 and
|
||||
becoming 7) *and* masked the change in `verify.rs`, so `lucisv` exited 0 and
|
||||
wrote corrupted code — a real violation of hard invariant #1. The same hole
|
||||
existed for `` `define `` bodies with a `\`-continued string and for
|
||||
`(* attr = "..." *)`; both pre-date this feature and are fixed here too, since
|
||||
@@ -271,7 +271,7 @@ From QA round 1 (2026-08-19):
|
||||
Re-ran `./tools/corpus_check.sh corpus` against the same pinned 820-file corpus
|
||||
as the baseline in `docs/features/corpus-check/README.md`. The corpus was
|
||||
verified unmodified afterwards (`git status --porcelain` clean in all four
|
||||
repos; only the untracked `.vfmt-corpus-rev` stamps show).
|
||||
repos; only the untracked `.lucisv-corpus-rev` stamps show).
|
||||
|
||||
| metric | baseline (35.2% era) | after macro-items |
|
||||
|---|---|---|
|
||||
@@ -404,7 +404,7 @@ argument — one file per dialect the corpus README named.
|
||||
gained, **0 lost**, and all 22 new verification errors traced back to the
|
||||
four root causes already catalogued in the corpus-check README (none touches
|
||||
a macro token). Confirmed all four corpus repos unmodified afterwards.
|
||||
- Did not touch `tools/`, `corpus/`, `crates/vfmt/` or `TODO.md` (no matching
|
||||
- Did not touch `tools/`, `corpus/`, `crates/lucisv/` or `TODO.md` (no matching
|
||||
checkbox exists). Did not run `git commit`/`git push`.
|
||||
|
||||
**Results:** `cargo test --workspace` **95 passed, 0 failed** (up from 86: +4
|
||||
@@ -420,7 +420,7 @@ Files touched: `crates/vlog_parser/src/{lexer,token,ast,parser}.rs`,
|
||||
|
||||
- **Reproduced the blocking finding before touching anything**, end-to-end
|
||||
through the real debug binary rather than from the QA write-up: the string's
|
||||
second line went from 3 leading spaces to 7, `vfmt` exited 0, and the file
|
||||
second line went from 3 leading spaces to 7, `lucisv` exited 0, and the file
|
||||
was written. Confirmed QA's point that convergence does not help — the
|
||||
corrupted output is a stable fixed point, so re-formatting reproduces it.
|
||||
- **Widened the finding before fixing it.** QA reported it against macro
|
||||
@@ -463,7 +463,7 @@ Files touched: `crates/vlog_parser/src/{lexer,token,ast,parser}.rs`,
|
||||
verification-error, 0 crash; 179 gained, **0 lost** against the committed
|
||||
baseline. Honest delta from this fix: **zero**, because no corpus file
|
||||
carries a string across a line break inside a macro, directive or attribute.
|
||||
The fix is about what vfmt would do to code it has not met yet, which is the
|
||||
The fix is about what lucisv would do to code it has not met yet, which is the
|
||||
whole point of the net. All four corpus repos confirmed unmodified.
|
||||
|
||||
**Results:** `cargo test --workspace` **98 passed, 0 failed** (up from 95: +3
|
||||
@@ -491,7 +491,7 @@ time before moving on).
|
||||
|
||||
**Tools — exact results.**
|
||||
- `cargo test --workspace`: **95 passed, 0 failed**, 0 ignored, across
|
||||
vfmt (18 unit + 13 cli), vlog_formatter (3 unit + 1 cases + 4 deep_nesting +
|
||||
lucisv (18 unit + 13 cli), vlog_formatter (3 unit + 1 cases + 4 deep_nesting +
|
||||
2 fixtures + 22 verification), vlog_parser (32 unit). Matches the claimed
|
||||
86→95 (+4 lexer, +3 parser, +2 verification).
|
||||
- `cargo clippy --all-targets`: silent, 0 warnings (`grep -c warning:` → 0).
|
||||
@@ -509,12 +509,12 @@ body, package body, generate region, generate `if`/`for`/`case`, `begin`/
|
||||
without-`begin`, `for`-without-`begin`, `foreach`-without-`begin`,
|
||||
case-item body, `else` branch, sole content of a generate `if`/`else` block
|
||||
— all parse, format, and round-trip idempotent (formatted, then `--check`d
|
||||
the result → exit 0) via `target/debug/vfmt -`. Did **not** find a statement
|
||||
the result → exit 0) via `target/debug/lucisv -`. Did **not** find a statement
|
||||
position where a macro fails to parse; this claim holds without
|
||||
qualification for everywhere tested.
|
||||
|
||||
**Claim 2 (disambiguation) — PASS, with one documented edge case.**
|
||||
Adversarial cases through `target/release/vfmt -` (or debug, same logic):
|
||||
Adversarial cases through `target/release/lucisv -` (or debug, same logic):
|
||||
|
||||
| input | result |
|
||||
|---|---|
|
||||
@@ -569,7 +569,7 @@ equivalence check passes.
|
||||
|
||||
Reproduced two ways:
|
||||
|
||||
1. **End-to-end through the real binary** (`target/debug/vfmt -`), no
|
||||
1. **End-to-end through the real binary** (`target/debug/lucisv -`), no
|
||||
handcrafted internals:
|
||||
```
|
||||
module m;
|
||||
@@ -650,7 +650,7 @@ TSV (`corpus-check-results.tsv` is gitignored and only the post-feature copy
|
||||
was on disk), so per the task instructions I rebuilt one: `git worktree add`
|
||||
a detached checkout at `HEAD` (no stash, no modification to the working
|
||||
tree — verified `git status --porcelain` identical before/after), built
|
||||
`target/release/vfmt` there, and ran `tools/corpus_check.sh` against the
|
||||
`target/release/lucisv` there, and ran `tools/corpus_check.sh` against the
|
||||
*same* corpus with `-b` pointed at that baseline binary vs. the feature
|
||||
binary. Worktree removed after.
|
||||
|
||||
@@ -669,7 +669,7 @@ would-reformat file silently became verification-error, etc.) — the +22
|
||||
verification-errors are entirely accounted for by files that were
|
||||
parse-error at baseline and land in verification-error now, matching the
|
||||
dev's claim precisely. All four corpus repos confirmed `git status
|
||||
--porcelain` clean except the untracked `.vfmt-corpus-rev` stamp, both
|
||||
--porcelain` clean except the untracked `.lucisv-corpus-rev` stamp, both
|
||||
before and after. Ran the feature corpus check twice — byte-identical TSVs
|
||||
both times (deterministic).
|
||||
|
||||
@@ -733,7 +733,7 @@ test files were dropped into `crates/vlog_formatter/tests/`, run, and
|
||||
removed, verified clean each time.
|
||||
|
||||
**1. Original repro re-run — FIXED, confirmed both ways.**
|
||||
- End-to-end through `target/debug/vfmt -` on the exact round-1 input: exit
|
||||
- End-to-end through `target/debug/lucisv -` on the exact round-1 input: exit
|
||||
0, and the string's second line is now byte-identical between input and
|
||||
output (`"line one\n line two with leading spaces"` — 3 leading spaces
|
||||
in, 3 leading spaces out; previously became 7). Idempotent (formatted the
|
||||
@@ -758,14 +758,14 @@ each through the real binary for idempotency:
|
||||
| `/* ... */` comment spanning lines with quotes inside, followed by a real string | corruption of the real string **rejected**; reindenting *inside* the block comment itself (no real string reachable from it) is still **accepted** | verbatim for the string; comment-only case reindents normally, idempotent |
|
||||
| a string containing `/*` (must not be read as opening a comment) | corruption inside that string **rejected** | verbatim, idempotent |
|
||||
| backtick-nested macro, inner string spans a line inside the outer token's raw text (`` `A("x", `B("y\nz")) ``) | corruption inside the inner string **rejected** | verbatim, idempotent |
|
||||
| CRLF: `\r` immediately before an in-string `\n` | corruption (reindent) of the string **rejected**; the `\r` is not silently trimmed as ordinary whitespace | in practice the lexer strips `\r` from every token before it's ever recorded, so real `vfmt` input never carries `\r` this deep — confirmed by feeding it a raw `\r\n` file end-to-end: output is pure `\n`, idempotent. The `verify_equivalence`-level test still matters because that function accepts raw strings from any caller, not just the file-reading pipeline. |
|
||||
| CRLF: `\r` immediately before an in-string `\n` | corruption (reindent) of the string **rejected**; the `\r` is not silently trimmed as ordinary whitespace | in practice the lexer strips `\r` from every token before it's ever recorded, so real `lucisv` input never carries `\r` this deep — confirmed by feeding it a raw `\r\n` file end-to-end: output is pure `\n`, idempotent. The `verify_equivalence`-level test still matters because that function accepts raw strings from any caller, not just the file-reading pipeline. |
|
||||
| CRLF, reindent outside any string | **accepted** | reindented normally, idempotent |
|
||||
|
||||
Repro saved to the QA scratchpad as `qa_round2_state_machine_attack.rs`
|
||||
(10/10 passed, not committed). No masked-corruption pair survived.
|
||||
|
||||
**3. Directive/Attribute fix — confirmed end-to-end.** Ran the dev's two
|
||||
named repro shapes through `target/debug/vfmt -`:
|
||||
named repro shapes through `target/debug/lucisv -`:
|
||||
- `` `define MSG "line one \<newline> line two" `` inside an indented
|
||||
block: output's continuation line is byte-identical to input
|
||||
(` line two"`, 3 leading spaces, untouched) — previously this pre-existing
|
||||
@@ -808,7 +808,7 @@ containing a bare `"` still reindents normally end-to-end).
|
||||
files, exactly as the dev predicted (no corpus file carries a string
|
||||
across a line break inside a macro/directive/attribute). All four corpus
|
||||
repos confirmed `git status --porcelain` clean (only the untracked
|
||||
`.vfmt-corpus-rev` stamp) before and after.
|
||||
`.lucisv-corpus-rev` stamp) before and after.
|
||||
- `git status --porcelain`: identical to the dev's stated diff throughout —
|
||||
no stray files left behind.
|
||||
|
||||
@@ -845,7 +845,7 @@ errors.
|
||||
The rejection was for the one thing that matters more than any feature:
|
||||
the verify.rs normalization added for multi-line macro tokens could mask
|
||||
real corruption — a string literal spanning lines inside a macro arg had
|
||||
its bytes changed by re-indent, and vfmt exited 0. First genuine
|
||||
its bytes changed by re-indent, and lucisv exited 0. First genuine
|
||||
invariant-#1 violation in the project. Credit where due on the rework:
|
||||
|
||||
1. **The dev widened the finding before fixing it** — the same defect
|
||||
|
||||
Reference in new issue
Block a user