forge
Explore
Log in

Don't you dare go Hollow

refusal_inventory: say WHICH kind of proof each PROVEN row carries

Browse files at this commit

28056ec0ff82da78c65e40117370c8c7817f9905Ahmet Kaan GümüşParent: 9e73b94
The table was a 2-tuple, so a row whose gate drives a hand-built stream into
the guard read exactly like a row whose gate sweeps an alphabet and shows
nothing reaches it. That distinction is what makes a row's strength legible,
and it was inexpressible.

Adds `Proof { NegativeGate, Enumeration }` + `label()`, a third tuple element
on all 32 rows (7 NEGATIVE, 25 ENUMERATION), and
`every_proven_row_names_which_kind_of_proof_it_carries` as the non-vacuity:
every variant is used by a row, the two labels do not collapse, and the
(4,8) chroma-table row's ENUMERATION tag is pinned to three pieces of
evidence inside that gate's OWN BODY -- the exact call-site count, the
(4,8)/(8,4) residual loop, and the unreachability assertion -- so the tag is
backed by the gate and not by its name.

The `Proof::TablePin` variant lane-av1refusalclaim r3 proposed is NOT carried:
its only row is that same (4,8) row, whose gate r3 wrote against was
`every_rect_strip_shape_the_split_path_codes_has_a_luma_and_chroma_table`
(decode_rect_split's tables). Main's row names
`every_chroma_unit_decode_block_rect_can_present_has_a_coefficient_table`,
which reads all eight decode_block_rect call sites' own literal bw/bh, pins
the chroma table exactly, and asserts the (4,8)/(8,4) residual is
UNPRODUCIBLE. The reach domain r3 called unestablished is therefore measured,
so ENUMERATION is the honest tag and a variant with no row would be dead
weight. The enum's doc comment records when to re-add it.
crates/ec-av1/src/refusal_inventory.rsmodified+153 -4
@@ -301,7 +301,47 @@ const REFUSALS: &[&str] = &[
301 /// `a_real_aomenc_mixed_lossless_segment_frame_decodes_sample_exact` is the301 /// `a_real_aomenc_mixed_lossless_segment_frame_decodes_sample_exact` is the
302 /// witness.302 /// witness.
303 #[cfg(test)]303 #[cfg(test)]
304-const PROVEN: &[(&str, &str)] = &[304+/// Which KIND of proof each [`PROVEN`] row carries.
305+///
306+/// A 2-tuple made every row look equally proven, which is the whole defect:
307+/// a row whose gate drives a hand-built stream into the guard and a row
308+/// whose gate sweeps an alphabet and shows nothing reaches it are held to
309+/// the same standard and read the same way. `label()` is what the tests
310+/// print, so the distinction is visible in the suite's own output.
311+///
312+/// lane-av1refusalclaim r3 also proposed a third variant, `TablePin`
313+/// ("the arms are pinned exactly but the domain the table is REACHED over
314+/// is unestablished"). It is deliberately NOT carried: the one row it was
315+/// minted for now has a gate that establishes the reach domain
316+/// (`every_chroma_unit_decode_block_rect_can_present_has_a_coefficient_table`
317+/// reads the eight `decode_block_rect` call sites' own literal `bw`/`bh`,
318+/// pins the resulting chroma table exactly, and asserts the `(4,8)`/`(8,4)`
319+/// residual is UNPRODUCIBLE), so `Enumeration` is the honest tag and a
320+/// variant with no row would be dead weight. Re-add it the day a gate really
321+/// pins a table without measuring its caller domain -- and give it a row.
322+#[cfg(test)]
323+enum Proof {
324+ /// A written stream REACHES the guard and is refused by this exact
325+ /// string: the gate goes RED if the guard is removed.
326+ NegativeGate,
327+ /// The gate enumerates every input the guard can be reached over and
328+ /// shows that none of them reaches it: it proves UNREACHABILITY, so it
329+ /// is GREEN if the guard is removed.
330+ Enumeration,
331+}
332+
333+#[cfg(test)]
334+impl Proof {
335+ fn label(&self) -> &'static str {
336+ match self {
337+ Proof::NegativeGate => "NEGATIVE (reaches the guard; red on removal)",
338+ Proof::Enumeration => "ENUMERATION (proves unreachability; green on removal)",
339+ }
340+ }
341+}
342+
343+#[cfg(test)]
344+const PROVEN: &[(&str, &str, Proof)] = &[
305 // lane-t900 r20, census: three real streams present exactly the 18345 // lane-t900 r20, census: three real streams present exactly the 18
306 // `(side, write_w, write_h)` triples `INTER_BLOCK_SHAPES` lists, and346 // `(side, write_w, write_h)` triples `INTER_BLOCK_SHAPES` lists, and
307 // `rect_inter_residual_supported` covers every rectangular one -- the only347 // `rect_inter_residual_supported` covers every rectangular one -- the only
@@ -318,6 +358,7 @@ const PROVEN: &[(&str, &str)] = &[
318 (358 (
319 "a non-skip rectangular (HORZ/VERT/HORZ_B) strip needs rectangular residual coding",359 "a non-skip rectangular (HORZ/VERT/HORZ_B) strip needs rectangular residual coding",
320 "a_block_shape_census_over_three_real_streams_leaves_the_rect_residual_refusal_unreachable",360 "a_block_shape_census_over_three_real_streams_leaves_the_rect_residual_refusal_unreachable",
361+ Proof::Enumeration,
321 ),362 ),
322 // lane-t900 r20, census: the shapes that can reach `decode_intra_rect_in_inter`'s363 // lane-t900 r20, census: the shapes that can reach `decode_intra_rect_in_inter`'s
323 // size-group/tx-category lookup are the ten rectangular census shapes with364 // size-group/tx-category lookup are the ten rectangular census shapes with
@@ -326,6 +367,7 @@ const PROVEN: &[(&str, &str)] = &[
326 (367 (
327 "an intra-coded {bw}x{bh} block on the inter block path (no size-group/tx-category row for that shape here)",368 "an intra-coded {bw}x{bh} block on the inter block path (no size-group/tx-category row for that shape here)",
328 "every_intra_in_inter_shape_the_census_lists_has_a_size_group_row",369 "every_intra_in_inter_shape_the_census_lists_has_a_size_group_row",
370+ Proof::Enumeration,
329 ),371 ),
330 // lane-t900 r20, census: the only sub-8 footprints three real streams372 // lane-t900 r20, census: the only sub-8 footprints three real streams
331 // present are the 16x4/4x16 strips of a 16x16-level 1:4 partition, whose373 // present are the 16x4/4x16 strips of a 16x16-level 1:4 partition, whose
@@ -334,6 +376,7 @@ const PROVEN: &[(&str, &str)] = &[
334 (376 (
335 "an intra 16x4/4x16 strip inside an inter 16x16-level 1:4 partition (its 4:2:0 chroma pair is coded once for two strips; only the inter path implements that pairing)",377 "an intra 16x4/4x16 strip inside an inter 16x16-level 1:4 partition (its 4:2:0 chroma pair is coded once for two strips; only the inter path implements that pairing)",
336 "a_sub8_footprint_census_over_real_streams_leaves_the_intra_16x4_pairing_refusal_unreachable",378 "a_sub8_footprint_census_over_real_streams_leaves_the_intra_16x4_pairing_refusal_unreachable",
379+ Proof::Enumeration,
337 ),380 ),
338 // lane-t900 r20, census: the rect transform tables and scans, enumerated381 // lane-t900 r20, census: the rect transform tables and scans, enumerated
339 // over the shapes the measured block-shape domain hands each helper (block382 // over the shapes the measured block-shape domain hands each helper (block
@@ -347,14 +390,17 @@ const PROVEN: &[(&str, &str)] = &[
347 (390 (
348 "a rectangular inter luma transform unit whose shape has no coefficient table set here",391 "a rectangular inter luma transform unit whose shape has no coefficient table set here",
349 "every_rect_transform_shape_the_census_lists_has_a_coefficient_table_and_scan",392 "every_rect_transform_shape_the_census_lists_has_a_coefficient_table_and_scan",
393+ Proof::Enumeration,
350 ),394 ),
351 (395 (
352 "a rectangular inter chroma transform unit whose shape has no coefficient table set here",396 "a rectangular inter chroma transform unit whose shape has no coefficient table set here",
353 "every_rect_transform_shape_the_census_lists_has_a_coefficient_table_and_scan",397 "every_rect_transform_shape_the_census_lists_has_a_coefficient_table_and_scan",
398+ Proof::Enumeration,
354 ),399 ),
355 (400 (
356 "a rectangular transform unit whose shape has no coefficient scan table here",401 "a rectangular transform unit whose shape has no coefficient scan table here",
357 "every_rect_transform_shape_the_census_lists_has_a_coefficient_table_and_scan",402 "every_rect_transform_shape_the_census_lists_has_a_coefficient_table_and_scan",
403+ Proof::Enumeration,
358 ),404 ),
359 // lane-t900 r21, enumeration: a var-tx leaf is never larger than the unit405 // lane-t900 r21, enumeration: a var-tx leaf is never larger than the unit
360 // the tree was entered with, and both callers enter at or below their own406 // the tree was entered with, and both callers enter at or below their own
@@ -363,10 +409,12 @@ const PROVEN: &[(&str, &str)] = &[
363 (409 (
364 "an inter var-tx tree with a leaf transform larger than 32x32",410 "an inter var-tx tree with a leaf transform larger than 32x32",
365 "a_var_tx_tree_never_presents_a_leaf_larger_than_the_unit_it_entered",411 "a_var_tx_tree_never_presents_a_leaf_larger_than_the_unit_it_entered",
412+ Proof::Enumeration,
366 ),413 ),
367 (414 (
368 "an inter var-tx tree with a leaf transform larger than 64x64",415 "an inter var-tx tree with a leaf transform larger than 64x64",
369 "a_var_tx_tree_never_presents_a_leaf_larger_than_the_unit_it_entered",416 "a_var_tx_tree_never_presents_a_leaf_larger_than_the_unit_it_entered",
417+ Proof::Enumeration,
370 ),418 ),
371 // Pre-existing proofs, registered by lane-t900 r21: a negative gate (a419 // Pre-existing proofs, registered by lane-t900 r21: a negative gate (a
372 // hand-built 12-bit sequence header is refused BY THIS EXACT STRING rather420 // hand-built 12-bit sequence header is refused BY THIS EXACT STRING rather
@@ -380,32 +428,38 @@ const PROVEN: &[(&str, &str)] = &[
380 (428 (
381 "a 32x32 partition type this decoder does not code (value={part32})",429 "a 32x32 partition type this decoder does not code (value={part32})",
382 "every_partition_value_of_an_enumerated_alphabet_has_an_arm",430 "every_partition_value_of_an_enumerated_alphabet_has_an_arm",
431+ Proof::Enumeration,
383 ),432 ),
384 (433 (
385 "an INTER 32x32 partition type this decoder does not code (value={part32})",434 "an INTER 32x32 partition type this decoder does not code (value={part32})",
386 "every_partition_value_of_an_enumerated_alphabet_has_an_arm",435 "every_partition_value_of_an_enumerated_alphabet_has_an_arm",
436+ Proof::Enumeration,
387 ),437 ),
388 (438 (
389 "a 128x128 superblock partition value outside the 8-symbol alphabet",439 "a 128x128 superblock partition value outside the 8-symbol alphabet",
390 "every_partition_value_of_an_enumerated_alphabet_has_an_arm",440 "every_partition_value_of_an_enumerated_alphabet_has_an_arm",
441+ Proof::Enumeration,
391 ),442 ),
392 // lane-t900 r24, enumeration: the key-frame superblock root's own `match`443 // lane-t900 r24, enumeration: the key-frame superblock root's own `match`
393 // has an arm for all ten `partition_w64` values.444 // has an arm for all ten `partition_w64` values.
394 (445 (
395 "a superblock-level partition value outside PARTITION_NONE..PARTITION_VERT_4",446 "a superblock-level partition value outside PARTITION_NONE..PARTITION_VERT_4",
396 "every_partition_value_of_an_enumerated_alphabet_has_an_arm",447 "every_partition_value_of_an_enumerated_alphabet_has_an_arm",
448+ Proof::Enumeration,
397 ),449 ),
398 // lane-t900 r24, enumeration: the inter 16x16-level if/else chain's450 // lane-t900 r24, enumeration: the inter 16x16-level if/else chain's
399 // branches name all ten `partition_w16` values between them.451 // branches name all ten `partition_w16` values between them.
400 (452 (
401 "an inter 16x16-level partition value outside NONE/HORZ/VERT/SPLIT/AB/1:4",453 "an inter 16x16-level partition value outside NONE/HORZ/VERT/SPLIT/AB/1:4",
402 "every_partition_value_of_an_if_chain_alphabet_is_named_by_a_branch",454 "every_partition_value_of_an_if_chain_alphabet_is_named_by_a_branch",
455+ Proof::Enumeration,
403 ),456 ),
404 // lane-t900 r24, enumeration: every (CDF width, symbol) pair a tx_type row457 // lane-t900 r24, enumeration: every (CDF width, symbol) pair a tx_type row
405 // can present maps to a distinct member of that width's own set.458 // can present maps to a distinct member of that width's own set.
406 (459 (
407 "a tx_type symbol outside its CDF's own set: {t}",460 "a tx_type symbol outside its CDF's own set: {t}",
408 "every_tx_type_symbol_of_every_cdf_width_maps_into_its_own_set",461 "every_tx_type_symbol_of_every_cdf_width_maps_into_its_own_set",
462+ Proof::Enumeration,
409 ),463 ),
410 // lane-t900 r24 + lane-av1txr RE-PIN, measured: the reader covers spec464 // lane-t900 r24 + lane-av1txr RE-PIN, measured: the reader covers spec
411 // 5.11.40's whole value domain (`0..=(1 << 20) - 2`, both ends of every465 // 5.11.40's whole value domain (`0..=(1 << 20) - 2`, both ends of every
@@ -419,6 +473,7 @@ const PROVEN: &[(&str, &str)] = &[
419 (473 (
420 "a Golomb tail longer than this decoder reads",474 "a Golomb tail longer than this decoder reads",
421 "read_golomb_reads_every_value_a_conformant_stream_can_carry",475 "read_golomb_reads_every_value_a_conformant_stream_can_carry",
476+ Proof::Enumeration,
422 ),477 ),
423 // lane-t900 r25, enumeration: `parse_tile_group` is the only producer of478 // lane-t900 r25, enumeration: `parse_tile_group` is the only producer of
424 // the `tiles` vector `decode_stream` tests, and its success path always479 // the `tiles` vector `decode_stream` tests, and its success path always
@@ -427,6 +482,7 @@ const PROVEN: &[(&str, &str)] = &[
427 (482 (
428 "a frame OBU with no tile group",483 "a frame OBU with no tile group",
429 "a_frame_obu_that_parses_always_carries_at_least_one_tile",484 "a_frame_obu_that_parses_always_carries_at_least_one_tile",
485+ Proof::Enumeration,
430 ),486 ),
431 // lane-t900 r25, negative gates: hand-built streams that reach each487 // lane-t900 r25, negative gates: hand-built streams that reach each
432 // refusal by name and output no picture (a `show_existing_frame` header488 // refusal by name and output no picture (a `show_existing_frame` header
@@ -434,10 +490,12 @@ const PROVEN: &[(&str, &str)] = &[
434 (490 (
435 "a show_existing_frame header naming an empty reference slot",491 "a show_existing_frame header naming an empty reference slot",
436 "a_show_existing_frame_header_naming_an_empty_slot_is_refused_by_name",492 "a_show_existing_frame_header_naming_an_empty_slot_is_refused_by_name",
493+ Proof::NegativeGate,
437 ),494 ),
438 (495 (
439 "an inter frame with no key frame before it",496 "an inter frame with no key frame before it",
440 "an_inter_frame_opening_a_stream_is_refused_by_name",497 "an_inter_frame_opening_a_stream_is_refused_by_name",
498+ Proof::NegativeGate,
441 ),499 ),
442 // lane-t900 r25, enumeration: a motion_mode/obmc symbol is read only under500 // lane-t900 r25, enumeration: a motion_mode/obmc symbol is read only under
443 // `is_motion_variation_allowed_bsize` (min side >= 8), and each of the 17501 // `is_motion_variation_allowed_bsize` (min side >= 8), and each of the 17
@@ -446,6 +504,7 @@ const PROVEN: &[(&str, &str)] = &[
446 (504 (
447 "a motion_mode symbol for a block shape with no CDF row here",505 "a motion_mode symbol for a block shape with no CDF row here",
448 "every_shape_that_allows_motion_variation_has_a_motion_mode_cdf_row",506 "every_shape_that_allows_motion_variation_has_a_motion_mode_cdf_row",
507+ Proof::Enumeration,
449 ),508 ),
450 // lane-av112bit: real-aomenc 12-bit streams, each refused by name509 // lane-av112bit: real-aomenc 12-bit streams, each refused by name
451 // (the gates encode with aomenc --bit-depth=12 and assert the exact510 // (the gates encode with aomenc --bit-depth=12 and assert the exact
@@ -470,6 +529,7 @@ const PROVEN: &[(&str, &str)] = &[
470 (529 (
471 "a chroma format of 4:2:2 (subsampling_x != subsampling_y): this decoder decodes 4:2:0 and 4:4:4; 4:2:2 is not ported, and 4:4:0 (0,1) is not a codable cell",530 "a chroma format of 4:2:2 (subsampling_x != subsampling_y): this decoder decodes 4:2:0 and 4:4:4; 4:2:2 is not ported, and 4:4:0 (0,1) is not a codable cell",
472 "a_non_420_subsampled_sequence_header_is_refused_by_name",531 "a_non_420_subsampled_sequence_header_is_refused_by_name",
532+ Proof::NegativeGate,
473 ),533 ),
474 // lane-av1txr-r2 paired, lane-av1-qmatrix RETIRED with its gate: the534 // lane-av1txr-r2 paired, lane-av1-qmatrix RETIRED with its gate: the
475 // refusal's witness is now535 // refusal's witness is now
@@ -488,6 +548,7 @@ const PROVEN: &[(&str, &str)] = &[
488 (548 (
489 "an intra mode this decoder does not code (round 2)",549 "an intra mode this decoder does not code (round 2)",
490 "every_intra_mode_symbol_of_the_y_mode_alphabet_is_coded",550 "every_intra_mode_symbol_of_the_y_mode_alphabet_is_coded",
551+ Proof::Enumeration,
491 ),552 ),
492 // lane-t900 r26, enumeration: `compute_image_size` is 0 only for a zero553 // lane-t900 r26, enumeration: `compute_image_size` is 0 only for a zero
493 // frame width/height, which no path a header can code produces (swept554 // frame width/height, which no path a header can code produces (swept
@@ -495,6 +556,7 @@ const PROVEN: &[(&str, &str)] = &[
495 (556 (
496 "a frame with no mode-info grid",557 "a frame with no mode-info grid",
497 "every_frame_size_a_header_can_code_has_a_mode_info_grid",558 "every_frame_size_a_header_can_code_has_a_mode_info_grid",
559+ Proof::Enumeration,
498 ),560 ),
499 // lane-t900 r26, negative gates: written streams that reach each refusal561 // lane-t900 r26, negative gates: written streams that reach each refusal
500 // by name (a 64x32 inter frame over a 64x64 reference; a stream opening on562 // by name (a 64x32 inter frame over a 64x64 reference; a stream opening on
@@ -511,6 +573,7 @@ const PROVEN: &[(&str, &str)] = &[
511 (573 (
512 "a reference frame selected with no picture at this frame's own ref_frame_idx slot for it",574 "a reference frame selected with no picture at this frame's own ref_frame_idx slot for it",
513 "a_selected_reference_with_an_empty_ref_frame_idx_slot_refuses_by_name",575 "a_selected_reference_with_an_empty_ref_frame_idx_slot_refuses_by_name",
576+ Proof::NegativeGate,
514 ),577 ),
515 // lane-t900 r27, negative gate + census: a written key frame carrying578 // lane-t900 r27, negative gate + census: a written key frame carrying
516 // each of the three mode-overriding features (over three segment ids) is579 // each of the three mode-overriding features (over three segment ids) is
@@ -536,6 +599,7 @@ const PROVEN: &[(&str, &str)] = &[
536 (599 (
537 "a frame whose segmentation enables SEG_LVL_REF_FRAME/SKIP/GLOBALMV (this decoder reads segment_id but never lets a segment override a block's reference, skip or mode)",600 "a frame whose segmentation enables SEG_LVL_REF_FRAME/SKIP/GLOBALMV (this decoder reads segment_id but never lets a segment override a block's reference, skip or mode)",
538 "a_frame_whose_segmentation_overrides_a_block_mode_is_refused_by_name",601 "a_frame_whose_segmentation_overrides_a_block_mode_is_refused_by_name",
602+ Proof::NegativeGate,
539 ),603 ),
540 // lane-t900 r27, structural audit + witness: `record_inter_rect_mi` is the604 // lane-t900 r27, structural audit + witness: `record_inter_rect_mi` is the
541 // single writer of the interp-filter neighbour band, and no call site605 // single writer of the interp-filter neighbour band, and no call site
@@ -549,6 +613,7 @@ const PROVEN: &[(&str, &str)] = &[
549 (613 (
550 "an OBMC neighbour whose switchable interp filter was never recorded",614 "an OBMC neighbour whose switchable interp filter was never recorded",
551 "every_inter_record_publishes_an_obmc_readable_filter",615 "every_inter_record_publishes_an_obmc_readable_filter",
616+ Proof::Enumeration,
552 ),617 ),
553 // lane-t900 r28: all three scaled-reference (superres) refusals -- the618 // lane-t900 r28: all three scaled-reference (superres) refusals -- the
554 // 8x8 partition leaf, the sub-8x8 inter block and warp -- are LIFTED and619 // 8x8 partition leaf, the sub-8x8 inter block and warp -- are LIFTED and
@@ -564,10 +629,12 @@ const PROVEN: &[(&str, &str)] = &[
564 (629 (
565 "a coded HORZ/VERT strip whose chroma transform has no rect coefficient tables here",630 "a coded HORZ/VERT strip whose chroma transform has no rect coefficient tables here",
566 "every_rect_strip_shape_the_split_path_codes_has_a_luma_and_chroma_table",631 "every_rect_strip_shape_the_split_path_codes_has_a_luma_and_chroma_table",
632+ Proof::Enumeration,
567 ),633 ),
568 (634 (
569 "a split intra strip whose transform unit is {tx_w}x{tx_h} (no luma coefficient tables for that shape here)",635 "a split intra strip whose transform unit is {tx_w}x{tx_h} (no luma coefficient tables for that shape here)",
570 "every_rect_strip_shape_the_split_path_codes_has_a_luma_and_chroma_table",636 "every_rect_strip_shape_the_split_path_codes_has_a_luma_and_chroma_table",
637+ Proof::Enumeration,
571 ),638 ),
572 // lane-av1-refusalaudit, enumeration + witness2 hunt: decode_block_rect64's639 // lane-av1-refusalaudit, enumeration + witness2 hunt: decode_block_rect64's
573 // chroma-unit table covers every conformant 64-axis strip unit in both640 // chroma-unit table covers every conformant 64-axis strip unit in both
@@ -581,6 +648,7 @@ const PROVEN: &[(&str, &str)] = &[
581 (648 (
582 "a 64-axis strip whose chroma unit has no coefficient table",649 "a 64-axis strip whose chroma unit has no coefficient table",
583 "every_chroma_unit_a_64_axis_strip_can_present_has_a_coefficient_table",650 "every_chroma_unit_a_64_axis_strip_can_present_has_a_coefficient_table",
651+ Proof::Enumeration,
584 ),652 ),
585 // lane-av1rect8x16, enumeration: `decode_block_rect`'s `_` arm. The nine653 // lane-av1rect8x16, enumeration: `decode_block_rect`'s `_` arm. The nine
586 // textual `decode_block_rect(` matches are 1 declaration + 8 call sites654 // textual `decode_block_rect(` matches are 1 declaration + 8 call sites
@@ -602,6 +670,7 @@ const PROVEN: &[(&str, &str)] = &[
602 (670 (
603 "a rectangular chroma transform whose size has no coefficient table",671 "a rectangular chroma transform whose size has no coefficient table",
604 "every_chroma_unit_decode_block_rect_can_present_has_a_coefficient_table",672 "every_chroma_unit_decode_block_rect_can_present_has_a_coefficient_table",
673+ Proof::Enumeration,
605 ),674 ),
606 // lane-t900 r33, enumeration: each of the four symbols this guard tests is675 // lane-t900 r33, enumeration: each of the four symbols this guard tests is
607 // read under a size gate that no 128-pixel side passes (the call site's676 // read under a size gate that no 128-pixel side passes (the call site's
@@ -610,6 +679,7 @@ const PROVEN: &[(&str, &str)] = &[
610 (679 (
611 "CfL, filter intra or a palette on a 128-root HORZ/VERT intra block (every one of their size gates caps at 64x64 or below, so none of these symbols exists there)",680 "CfL, filter intra or a palette on a 128-root HORZ/VERT intra block (every one of their size gates caps at 64x64 or below, so none of these symbols exists there)",
612 "no_128_root_half_reads_a_cfl_filter_intra_or_palette_symbol",681 "no_128_root_half_reads_a_cfl_filter_intra_or_palette_symbol",
682+ Proof::Enumeration,
613 ),683 ),
614 // lane-av1txr: the sub-8x8 intrabc refusal this census pinned is GONE (the684 // lane-av1txr: the sub-8x8 intrabc refusal this census pinned is GONE (the
615 // capability landed; see the note in `REFUSALS`). The census gate survives685 // capability landed; see the note in `REFUSALS`). The census gate survives
@@ -628,10 +698,12 @@ const PROVEN: &[(&str, &str)] = &[
628 (698 (
629 "a reference picture whose height does not match this frame's own true size",699 "a reference picture whose height does not match this frame's own true size",
630 "an_inter_frame_shorter_than_its_reference_is_refused_by_name",700 "an_inter_frame_shorter_than_its_reference_is_refused_by_name",
701+ Proof::NegativeGate,
631 ),702 ),
632 (703 (
633 "a frame naming primary_ref_frame at a reference slot with no saved CDF state",704 "a frame naming primary_ref_frame at a reference slot with no saved CDF state",
634 "an_inter_frame_naming_an_unrefreshed_primary_ref_slot_is_refused_by_name",705 "an_inter_frame_naming_an_unrefreshed_primary_ref_slot_is_refused_by_name",
706+ Proof::NegativeGate,
635 ),707 ),
636 ];708 ];
637 709
@@ -703,7 +775,8 @@ pub(crate) fn pins_refusal(src: &str, refusal: &str) -> bool {
703 #[cfg(test)]775 #[cfg(test)]
704 mod tests {776 mod tests {
705 use super::{777 use super::{
706- CAPABILITY_CLAIMS, GATES_THAT_SKIP_ON_A_DECODE_ERROR, PROVEN, REFUSALS, squash_source,778+ CAPABILITY_CLAIMS, GATES_THAT_SKIP_ON_A_DECODE_ERROR, PROVEN, Proof, REFUSALS,
779+ squash_source,
707 };780 };
708 use std::collections::BTreeSet;781 use std::collections::BTreeSet;
709 782
@@ -2544,7 +2617,7 @@ mod tests {
2544 let mut neither: Vec<&str> = Vec::new();2617 let mut neither: Vec<&str> = Vec::new();
2545 let mut unanchored: Vec<String> = Vec::new();2618 let mut unanchored: Vec<String> = Vec::new();
2546 let mut unbounded: Vec<String> = Vec::new();2619 let mut unbounded: Vec<String> = Vec::new();
2547- for (reason, gate) in PROVEN {2620+ for (reason, gate, _kind) in PROVEN {
2548 assert!(2621 assert!(
2549 found.contains(*reason),2622 found.contains(*reason),
2550 "{reason:?} is listed as proven but is no longer a decode-path refusal -- \2623 "{reason:?} is listed as proven but is no longer a decode-path refusal -- \
@@ -2646,7 +2719,7 @@ mod tests {
2646 #[test]2719 #[test]
2647 fn every_named_gate_body_is_bounded_in_these_files() {2720 fn every_named_gate_body_is_bounded_in_these_files() {
2648 let mut resolved = 0usize;2721 let mut resolved = 0usize;
2649- for (reason, gate) in PROVEN {2722+ for (reason, gate, _kind) in PROVEN {
2650 let body =2723 let body =
2651 gate_body(gate).unwrap_or_else(|why| panic!("{reason:?} names {gate}: {why}"));2724 gate_body(gate).unwrap_or_else(|why| panic!("{reason:?} names {gate}: {why}"));
2652 assert!(2725 assert!(
@@ -2668,6 +2741,82 @@ mod tests {
2668 }2741 }
2669 }2742 }
2670 2743
2744+ /// The taxonomy is a CLAIM about each row, so it carries its own
2745+ /// non-vacuity: every variant is used by at least one row (a variant no
2746+ /// row can be in is not a category), the two labels do not collapse into
2747+ /// one string, and the row lane-av1refusalclaim r3 wanted to RE-TAG is
2748+ /// tagged from evidence inside its own gate BODY -- never from the
2749+ /// gate's name, which is the only thing the previous 2-tuple carried.
2750+ ///
2751+ /// r3 minted a `TablePin` variant because "a rectangular chroma transform
2752+ /// whose size has no coefficient table" was pinned to a table whose
2753+ /// REACHED-OVER domain had never been measured. Main has since replaced
2754+ /// that row's gate with one that reads the eight `decode_block_rect` call
2755+ /// sites' own literal `bw`/`bh`, pins the resulting chroma table exactly,
2756+ /// and asserts the `(4,8)`/`(8,4)` residual is UNPRODUCIBLE. `Enumeration`
2757+ /// is therefore the honest tag and `TablePin` is not carried; if a later
2758+ /// edit weakens that gate back to a bare table pin, the three evidence
2759+ /// pins below go red instead of leaving the row quietly overclaiming.
2760+ #[test]
2761+ fn every_proven_row_names_which_kind_of_proof_it_carries() {
2762+ let mut negative = 0usize;
2763+ let mut enumeration = 0usize;
2764+ for (reason, gate, kind) in PROVEN {
2765+ eprintln!(" {} -- {reason:?} -> {gate}", kind.label());
2766+ match kind {
2767+ Proof::NegativeGate => negative += 1,
2768+ Proof::Enumeration => enumeration += 1,
2769+ }
2770+ }
2771+ assert_eq!(
2772+ negative + enumeration,
2773+ PROVEN.len(),
2774+ "a PROVEN row carries no proof kind, so the table says nothing about it"
2775+ );
2776+ assert!(
2777+ negative > 0,
2778+ "no row is tagged NEGATIVE, so the NegativeGate variant is dead weight"
2779+ );
2780+ assert!(
2781+ enumeration > 0,
2782+ "no row is tagged ENUMERATION, so the Enumeration variant is dead weight"
2783+ );
2784+ assert_ne!(
2785+ Proof::NegativeGate.label(),
2786+ Proof::Enumeration.label(),
2787+ "the two kinds print the same string, so the taxonomy is one category in two hats"
2788+ );
2789+
2790+ let (reason, gate, kind) = PROVEN
2791+ .iter()
2792+ .find(|(reason, _, _)| {
2793+ *reason == "a rectangular chroma transform whose size has no coefficient table"
2794+ })
2795+ .map(|(reason, gate, kind)| (*reason, *gate, kind))
2796+ .expect("the (4,8) chroma-table row left PROVEN");
2797+ assert!(
2798+ matches!(kind, Proof::Enumeration),
2799+ "{reason:?} is tagged {:?}, but its gate enumerates the caller domain",
2800+ kind.label()
2801+ );
2802+ let body = gate_body(gate).unwrap_or_else(|why| panic!("{reason:?} names {gate}: {why}"));
2803+ for evidence in [
2804+ "the number of decode_block_rect call sites changed",
2805+ "for residual in [(4usize, 8usize), (8, 4)]",
2806+ "the caller set can now produce a 4x8/8x4 chroma shape",
2807+ ] {
2808+ assert!(
2809+ body.contains(evidence),
2810+ "{gate} no longer carries {evidence:?}, so the Enumeration tag on {reason:?} \
2811+ claims a reach domain the gate has stopped measuring"
2812+ );
2813+ }
2814+ eprintln!(
2815+ "refusal inventory: {negative} NEGATIVE, {enumeration} ENUMERATION of {} PROVEN rows",
2816+ PROVEN.len()
2817+ );
2818+ }
2819+
2671 /// Lane-av1refusalspan: the invariant that catches a boundary that2820 /// Lane-av1refusalspan: the invariant that catches a boundary that
2672 /// over-reaches. Tested on its own text, so it cannot be satisfied by the2821 /// over-reaches. Tested on its own text, so it cannot be satisfied by the
2673 /// scanner happening to be right on the current sources.2822 /// scanner happening to be right on the current sources.