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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ workspace carried at those versions without a tag.

## Unreleased

- A one-pass writer for the counts of the bootstrap count cases, #92.
Under `LEXLEAN_COUNTS=fast` each of `BS-05` to `BS-08` and `BS-11` to
`BS-15` records every count it checks in `target/count-report/` instead of
failing at the first that moved, and stops before its evaluator and rustc
runs (`LEXLEAN_COUNTS=report` runs it whole); `cargo xtask counts --write`
carries the moved counts into the case's constants, its §31 row, register
statement and scenario, and the prose of §17.23 that repeats them, and
lists every number it cannot place unambiguously. A landing that moved
the counts took a run and a hand mirror per stage of the cases; it takes
one pass. Unset, the cases assert as before. The register is unchanged.
- `rustix` 1.1.6 (RUSTSEC-2026-0486: the extended-attribute functions marked unwritten bytes as
initialized for a zero-length buffer), so `cargo deny` passes; `errno` and `tempfile` resolve
`windows-sys` 0.59, the version `fs4` 0.13 and `rustix` 1.1.6 both accept.
Expand Down
15 changes: 11 additions & 4 deletions crates/conformance/src/cases/bootstrap/rust_assemble.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,11 +351,18 @@ pub(super) fn case() {
mutated.len(),
started.elapsed()
);
assert_eq!(
(all.len(), within.len(), mutated.len()),
(VECTORS, VECTORS_WITHIN, EVALUATOR_MUTANTS),
"the vectors, those the evaluator is given, and the mutants"
crate::counts!(
"BS-14",
"the vectors, those the evaluator is given, and the mutants",
{
VECTORS: all.len(),
VECTORS_WITHIN: within.len(),
EVALUATOR_MUTANTS: mutated.len(),
}
);
if crate::counts::stop_before_runs("BS-14") {
return;
}
let checked = support::checked_project(&project);
let moves = super::lower(&checked, &project, MOVES, "applyMoves");
let roots = Roots::of(&project);
Expand Down
15 changes: 11 additions & 4 deletions crates/conformance/src/cases/bootstrap/rust_bodies.rs
Original file line number Diff line number Diff line change
Expand Up @@ -618,11 +618,18 @@ pub(super) fn case() {
mutated.len(),
started.elapsed()
);
assert_eq!(
(all.len(), within.len(), mutated.len()),
(VECTORS, VECTORS_WITHIN, EVALUATOR_MUTANTS),
"the vectors, those the evaluator is given, and the mutants"
crate::counts!(
"BS-11",
"the vectors, those the evaluator is given, and the mutants",
{
VECTORS: all.len(),
VECTORS_WITHIN: within.len(),
EVALUATOR_MUTANTS: mutated.len(),
}
);
if crate::counts::stop_before_runs("BS-11") {
return;
}
let checked = support::checked_project(&project);
let uses = super::lower(&checked, &project, TYPING, "useTrees");
let moves = super::lower(&checked, &project, MOVES, "applyMoves");
Expand Down
15 changes: 11 additions & 4 deletions crates/conformance/src/cases/bootstrap/rust_loops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -494,11 +494,18 @@ pub(super) fn case() {
mutated.len(),
started.elapsed()
);
assert_eq!(
(all.len(), within.len(), mutated.len()),
(VECTORS, VECTORS_WITHIN, EVALUATOR_MUTANTS),
"the vectors, those the evaluator is given, and the mutants"
crate::counts!(
"BS-13",
"the vectors, those the evaluator is given, and the mutants",
{
VECTORS: all.len(),
VECTORS_WITHIN: within.len(),
EVALUATOR_MUTANTS: mutated.len(),
}
);
if crate::counts::stop_before_runs("BS-13") {
return;
}
let checked = support::checked_project(&project);
let moves = super::lower(&checked, &project, MOVES, "applyMoves");
let roots = Roots::of(&project);
Expand Down
15 changes: 11 additions & 4 deletions crates/conformance/src/cases/bootstrap/rust_lower.rs
Original file line number Diff line number Diff line change
Expand Up @@ -912,11 +912,18 @@ pub(super) fn case() {
.iter()
.filter(|vector| vector.nodes <= EVALUATOR_NODES)
.collect();
assert_eq!(
(rules.len(), all.len(), evaluator.len()),
(RULE_PROGRAMS, VECTORS, VECTORS_WITHIN),
"the programs of the rules, the vectors, and those the evaluator is given"
crate::counts!(
"BS-07",
"the programs of the rules, the vectors, and those the evaluator is given",
{
RULE_PROGRAMS: rules.len(),
VECTORS: all.len(),
VECTORS_WITHIN: evaluator.len(),
}
);
if crate::counts::stop_before_runs("BS-07") {
return;
}
eprintln!(
"BS-07: {} vectors ({} within {EVALUATOR_NODES} nodes) ({:?})",
all.len(),
Expand Down
22 changes: 14 additions & 8 deletions crates/conformance/src/cases/bootstrap/rust_moves.rs
Original file line number Diff line number Diff line change
Expand Up @@ -519,15 +519,21 @@ pub(super) fn case() {
.map(run)
.collect();
assert_eq!(
(
base.len(),
small_runs.len(),
evaluator_mutants.len(),
rustc_mutants.len()
),
(CRATES, WITHIN, EVALUATOR_MUTANTS, RUSTC_MUTANTS),
"the crates the moves are run on, those within the evaluator's bound, and the mutants"
(evaluator_mutants.len(), rustc_mutants.len()),
(EVALUATOR_MUTANTS, RUSTC_MUTANTS),
"the mutants"
);
crate::counts!(
"BS-08",
"the crates the moves are run on, and those within the evaluator's bound",
{
CRATES: base.len(),
WITHIN: small_runs.len(),
}
);
if crate::counts::stop_before_runs("BS-08") {
return;
}
eprintln!(
"BS-08: {} crates ({} within {EVALUATOR_NODES} expressions), {} + {} mutants ({:?})",
base.len(),
Expand Down
35 changes: 15 additions & 20 deletions crates/conformance/src/cases/bootstrap/rust_package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -916,27 +916,22 @@ pub(super) fn case() {
within.len(),
started.elapsed()
);
assert_eq!(
(
manifests.len(),
renders.len(),
rules.len(),
shaped.len(),
mutants.len(),
render_mutants.len(),
within.len()
),
(
MANIFESTS,
ACCEPTED,
HEADER_RULES,
RENDER_RULES,
HEADER_MUTANTS,
RENDER_MUTANTS,
EVALUATOR_RENDERS
),
"the manifests, the accepted ones, the rule inputs, the mutants, and the renders the evaluator is given"
crate::counts!(
"BS-15",
"the manifests, the accepted ones, the rule inputs, the mutants, and the renders the evaluator is given",
{
MANIFESTS: manifests.len(),
ACCEPTED: renders.len(),
HEADER_RULES: rules.len(),
RENDER_RULES: shaped.len(),
HEADER_MUTANTS: mutants.len(),
RENDER_MUTANTS: render_mutants.len(),
EVALUATOR_RENDERS: within.len(),
}
);
if crate::counts::stop_before_runs("BS-15") {
return;
}

let checked = support::checked_project(&project);
let check_root = super::lower(&checked, &project, MODULE, "checkManifest");
Expand Down
86 changes: 41 additions & 45 deletions crates/conformance/src/cases/bootstrap/rust_print.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1318,16 +1318,16 @@ pub(super) fn case() {
"the committed library ends with the printed items"
);
}
assert_eq!(
(manifests, fixtures, distinct, all.len(), packages.len()),
(
COMMITTED_MANIFESTS,
COMMITTED_FIXTURES,
COMMITTED_PROGRAMS,
COMMITTED_CRATES,
COMMITTED_PACKAGES
),
"the committed manifests, fixtures, distinct programs, distinct crates, and packages"
crate::counts!(
"BS-06",
"the committed manifests, fixtures, distinct programs, distinct crates, and packages",
{
COMMITTED_MANIFESTS: manifests,
COMMITTED_FIXTURES: fixtures,
COMMITTED_PROGRAMS: distinct,
COMMITTED_CRATES: all.len(),
COMMITTED_PACKAGES: packages.len(),
}
);
eprintln!(
"BS-06: {manifests} manifests, {fixtures} fixtures, {distinct} programs, {} crates, {} packages ({:?})",
Expand Down Expand Up @@ -1386,25 +1386,18 @@ pub(super) fn case() {
started.elapsed()
);

assert_eq!(
(
crate_runs.len(),
committed_count,
refused(&crate_runs),
expr_runs.len(),
hand_exprs,
refused(&expr_runs)
),
(
VECTORS_CRATE,
COMMITTED_DISTINCT,
REFUSED_CRATE,
VECTORS_EXPR,
HAND_EXPR,
0
),
"the vectors of printCrate and printExpr, the committed crates among them, and the refused"
crate::counts!(
"BS-06",
"the vectors of printCrate and printExpr, the committed crates among them, and the refused",
{
VECTORS_CRATE: crate_runs.len(),
COMMITTED_DISTINCT: committed_count,
REFUSED_CRATE: refused(&crate_runs),
VECTORS_EXPR: expr_runs.len(),
HAND_EXPR: hand_exprs,
}
);
assert_eq!(refused(&expr_runs), 0, "no printExpr vector is refused");
// The corpora of the normative host are made here, so that every count
// the row states is asserted before the first leg runs.
let evaluator_crates: Vec<Run> = crate_runs
Expand All @@ -1422,23 +1415,20 @@ pub(super) fn case() {
let (seeded_crates, seeded_exprs) = mutants(&bases, &mut seeded, EVALUATOR_MUTANTS);
let mut large = super::Seeded(0x0B55_0066);
let (large_crates, large_exprs) = mutants(&bases, &mut large, RUSTC_MUTANTS);
assert_eq!(
(
evaluator_crates.len(),
evaluator_exprs.len(),
seeded_crates.len(),
seeded_exprs.len(),
large_crates.len() + large_exprs.len()
),
(
EVALUATOR_CRATE,
VECTORS_EXPR,
SEEDED_CRATE,
SEEDED_EXPR,
RUSTC_SEEDED_RUNS
),
"the vectors and the seeded mutants of the evaluator, and the further mutants of rustc"
crate::counts!(
"BS-06",
"the vectors and the seeded mutants of the evaluator, and the further mutants of rustc",
{
EVALUATOR_CRATE: evaluator_crates.len(),
VECTORS_EXPR: evaluator_exprs.len(),
SEEDED_CRATE: seeded_crates.len(),
SEEDED_EXPR: seeded_exprs.len(),
RUSTC_SEEDED_RUNS: large_crates.len() + large_exprs.len(),
}
);
if crate::counts::stop_before_runs("BS-06") {
return;
}
let checked = support::checked_project(&project);
let crate_root = super::lower(&checked, &project, MODULE, "printCrate");
let expr_root = super::lower(&checked, &project, MODULE, "printExpr");
Expand Down Expand Up @@ -1496,7 +1486,13 @@ pub(super) fn case() {
],
"seeded",
);
assert_eq!(large_runs, RUSTC_SEEDED_RUNS);
crate::counts!(
"BS-06",
"the further mutants rustc ran",
{
RUSTC_SEEDED_RUNS: large_runs,
}
);
// The gate is armed: each defect planted in a copy of the source is a
// disagreement with the oracle.
let mut detection: BTreeMap<&str, Vec<Run>> = BTreeMap::new();
Expand Down
15 changes: 11 additions & 4 deletions crates/conformance/src/cases/bootstrap/rust_succeed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,18 @@ pub(super) fn case() {
mutated.len(),
started.elapsed()
);
assert_eq!(
(all.len(), within.len(), mutated.len()),
(VECTORS, VECTORS_WITHIN, EVALUATOR_MUTANTS),
"the vectors, those the evaluator is given, and the mutants"
crate::counts!(
"BS-12",
"the vectors, those the evaluator is given, and the mutants",
{
VECTORS: all.len(),
VECTORS_WITHIN: within.len(),
EVALUATOR_MUTANTS: mutated.len(),
}
);
if crate::counts::stop_before_runs("BS-12") {
return;
}
let checked = support::checked_project(&project);
let moves = super::lower(&checked, &project, MOVES, "applyMoves");
let roots = Roots::of(&project);
Expand Down
Loading