code wiki / (root) / nx_object_spec_match.nx

nx_object_spec_match.nx

buildroot/runtime/nx_object_spec_match.nx

11771 B335 linesdepth 4pulls 4 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_object_spec_match.nx -- spec-compliance verification. CAPABILITY_COMPLETENESS: FULL Composes: nx_object_spec (the catalog primitive) caller-provided observed_parts list (upstream: nx_part_ classifier, queued) Algorithm: 1. For each REQUIRED part in spec: check if in observed list 2. For each NEGATION in spec: check if in observed list 3. Classify: all required present + no negations -> MATCHES_SPEC any negation present -> WRONG_CLASS some required missing + no negations -> PART_MISSING both required missing + negations -> PARTIAL_MATCH 4. If WRONG_CLASS or PARTIAL_MATCH: scan all other specs for the best-matching alternative (highest required-presence score + no negations violated) genealogy_id: substrate_object_spec_match_2026_05_16 lineage_id: nx_object_spec_match_v1

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_runtime.nx nx_tier.nx nx_object_spec.nx nx_object_spec_match.nx

imports: nx_syscalls.nxnx_runtime.nxnx_tier.nxnx_object_spec.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_object_spec_match sys_mmap ↻ nx_object_spec_get nx_object_spec_is_valid _spec_build_sword_long sys_mmap ↻ _spec_alloc_part_list sys_mmap ↻ _spec_build_bubble_wand sys_mmap ↻ _spec_alloc_part_list ↻ _spec_build_dagger sys_mmap ↻ _spec_alloc_part_list ↻ _spec_build_bow_long sys_mmap ↻ _spec_alloc_part_list ↻ _spec_build_wand_magic sys_mmap ↻ _spec_alloc_part_list ↻ _spec_build_shirt_button sys_mmap ↻ _spec_alloc_part_list ↻ _spec_build_shirt_t sys_mmap ↻ _spec_alloc_part_list ↻ _spec_build_lingerie_bra sys_mmap ↻ _spec_alloc_part_list ↻ _spec_build_orc sys_mmap ↻ _spec_alloc_part_list ↻ _spec_build_elf sys_mmap ↻ _spec_alloc_part_list ↻ _spec_build_dragon sys_mmap ↻ _spec_alloc_part_list ↻

structs

43struct NxObjectMatchResult

consts

29const NX_MAGIC_1024: i64 = 1024
33const NX_OSM_VERDICT_MATCHES_SPEC: nx_int = 0
34const NX_OSM_VERDICT_PART_MISSING: nx_int = 1
35const NX_OSM_VERDICT_WRONG_CLASS: nx_int = 2
36const NX_OSM_VERDICT_PARTIAL_MATCH: nx_int = 3
37const NX_OSM_VERDICT_NO_OBSERVATION: nx_int = 4
39const NX_OSM_NO_ALTERNATIVE: nx_int = -1
57const NX_OSM_RESULT_BYTES: nx_size = 96

functions

61func _osm_in_list(list: *nx_int, n: nx_int, val: nx_int) -> nx_int
82func _osm_find_alternative(
127func nx_object_spec_match(
221func main() -> nx_int