code wiki / (root) / nx_codec_caps_gate.nx

nx_codec_caps_gate.nx

buildroot/runtime/nx_codec_caps_gate.nx

8541 B180 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/prooftopic codec
docsdependenciesstructsconstsfunctions

about

nx_codec_caps_gate.nx -- proves the advertised header equals the capability. The property under test is an IFF, in both directions, over the whole registry: a format appears in the emitted header if and only if we can decode it. T1 walks every registry entry and checks both directions at once, so neither an over-claim (advertise what we cannot read) nor an under-claim (hide what we can) can survive. T3 and T4 pin the two live defects by name. `image/avif` and `br` were being advertised by nx_http_client and nx_polite_browser respectively with no decoder behind either. If someone flips those registry flags to 1 without landing the decoders, T1 still passes -- so T3/T4 assert the SPECIFIC absence, and they are meant to be deleted by the same commit that lands the decoder, not before. T7 is the non-vacuity control: an unknown format must answer 0, not a plausible 1. If the query answered 1 for anything it did not recognise, T1's forward direction would be satisfiable by an empty registry. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_codec_caps.nx nx_codec_caps_gate.nx

imports: nx_syscalls.nxnx_codec_caps.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap nx_codec_caps_accept_image cc_image_have nx_cc_put cc_image_name nx_codec_caps_accept_encod cc_encoding_have nx_cc_put ↻ cc_encoding_name nx_codec_caps_accept_docum sys_mmap ↻ nx_codec_caps_accept_image ↻ nx_cc_put ↻ nx_codec_caps_headers sys_mmap ↻ nx_codec_caps_accept_docum ↻ nx_codec_caps_accept_encod ↻ nx_cc_put ↻ nx_cc_find nx_cc_len cc_image_name ↻ cc_image_have ↻ nx_codec_caps_have_image nx_cc_eq cc_image_name ↻ cc_image_have ↻ nx_cc_count_tokens nx_cc_len ↻ cc_encoding_name ↻ cc_encoding_have ↻ nx_codec_caps_have_encodin nx_cc_eq ↻ cc_encoding_name ↻ cc_encoding_have ↻ nx_cc_len ↻ nx_cc_eq ↻ g_puts sys_write sys_exit

structs

none

consts

none

functions

24func g_puts(s: *u8) -> i64
called by 2: g_putnmain calls 1: sys_write
31func g_putn(v: i64) -> i64
called by 1: main calls 3: sys_mmapg_putssys_write
45func main() -> i64