nx_object_spec_match.nx
buildroot/runtime/nx_object_spec_match.nx
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
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
structs
| 43 | struct NxObjectMatchResult |
consts
| 29 | const NX_MAGIC_1024: i64 = 1024 |
| 33 | const NX_OSM_VERDICT_MATCHES_SPEC: nx_int = 0 |
| 34 | const NX_OSM_VERDICT_PART_MISSING: nx_int = 1 |
| 35 | const NX_OSM_VERDICT_WRONG_CLASS: nx_int = 2 |
| 36 | const NX_OSM_VERDICT_PARTIAL_MATCH: nx_int = 3 |
| 37 | const NX_OSM_VERDICT_NO_OBSERVATION: nx_int = 4 |
| 39 | const NX_OSM_NO_ALTERNATIVE: nx_int = -1 |
| 57 | const NX_OSM_RESULT_BYTES: nx_size = 96 |
functions
| 61 | func _osm_in_list(list: *nx_int, n: nx_int, val: nx_int) -> nx_int |
| 82 | func _osm_find_alternative( |
| 127 | func nx_object_spec_match( |
| 221 | func main() -> nx_int |