code wiki / (root) / nx_bprov_chain.nx

nx_bprov_chain.nx

buildroot/runtime/nx_bprov_chain.nx

3524 B100 linesdepth 4pulls 4 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_bprov_chain.nx -- ergonomic wrappers over nx_bit_provenance. Cardinal: feedback-bit-provenance-systemic-auto-injection. The bit-provenance ledger primitive (nx_bit_provenance.nx) exposes alloc / emit / emit3 / join. Used directly, each producer site needs 2-3 lines of boilerplate: let id: i64 = nx_bprov_alloc() nx_bprov_emit(id, src_a, src_b, layer, tag) This wrapper collapses that into a single chain-call: let id: i64 = nx_bprov_chain2(layer, tag, src_a, src_b) Or for 3 sources: let id: i64 = nx_bprov_chain3(layer, tag, src_a, src_b, src_c) Or 0 sources (silicon-born input): let id: i64 = nx_bprov_chain0(layer, tag) These are the "born into what we build" half of the systemic answer. New substrate primitives use these in their main paths. The other half (retroactive injection on existing primitives) is the self-host IR pass per docs/NISHI_BPROV_AUTO_INJECTION_DESIGN.md.

dependencies 1 imports · 0 importers

nx_bit_provenance.nx nx_bprov_chain.nx

imports: nx_bit_provenance.nx

imported by: nobody (leaf or entry point)

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

main nx_bprov_init nx_bprov_chain0 nx_bprov_alloc nx_bprov_init ↻ nx_bprov_emit _nx_bprov_write nx_bprov_init ↻ nx_bprov_chain2 nx_bprov_alloc ↻ nx_bprov_emit ↻ nx_bprov_chain3 nx_bprov_alloc ↻ nx_bprov_emit3 _nx_bprov_write ↻ nx_bprov_chain1 nx_bprov_alloc ↻ nx_bprov_emit ↻ nx_bprov_audit_zombies nx_bprov_init ↻ nx_bprov_consume nx_bprov_join nx_bprov_init ↻ nx_bprov_n_records nx_bprov_init ↻

structs

none

consts

none

functions

30func nx_bprov_chain0(layer: i64, tag: i64) -> i64
called by 1: main calls 2: nx_bprov_allocnx_bprov_emit
37func nx_bprov_chain1(layer: i64, tag: i64, src_a: i64) -> i64
called by 1: main calls 2: nx_bprov_allocnx_bprov_emit
44func nx_bprov_chain2(layer: i64, tag: i64, src_a: i64, src_b: i64) -> i64
called by 1: main calls 2: nx_bprov_allocnx_bprov_emit
51func nx_bprov_chain3(layer: i64, tag: i64,
called by 1: main calls 2: nx_bprov_allocnx_bprov_emit3
60func nx_bprov_consume(in_bit_id: i64, layer: i64, tag: i64) -> i64
called by 1: main calls 1: nx_bprov_join
67func main() -> i64