code wiki / (root) / nx_term_order_test.nx

nx_term_order_test.nx

buildroot/runtime/nx_term_order_test.nx

6759 B157 linesdepth 6pulls 6 transitivereach 0 importersview sourcekind gate/prooftopic term
docsdependenciesstructsconstsfunctions

about

nx_term_order_test.nx -- KBO smoke covering all four verdicts.

dependencies 6 imports · 0 importers

nx_syscalls.nx nx_runtime.nx nx_tier.nx nx_result.nx nx_unify.nx nx_term_order.nx nx_term_order_test.nx

imports: nx_syscalls.nxnx_runtime.nxnx_tier.nxnx_result.nxnx_unify.nxnx_term_order.nx

imported by: nobody (leaf or entry point)

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

main println sys_write strlen sys_mmap nx_kbo_new sys_mmap ↻ nx_kbo_register nx_result_err sys_mmap ↻ nx_result_ok sys_mmap ↻ nx_kbo_check_admissibility nx_result_err ↻ nx_result_ok ↻ nx_result_is_err print sys_write ↻ strlen ↻ print_i64 sys_mmap ↻ itoa sys_mmap ↻ sys_write ↻ nx_result_unwrap nx_term_const sys_mmap ↻ mk_unary sys_mmap ↻ nx_term_app sys_mmap ↻ nx_kbo_compare nx_term_eq nx_term_eq ↻ nx_term_arg nx_kbo_var_dominates nx_kbo_var_count nx_kbo_var_count ↻ nx_term_arg ↻ nx_kbo_weight

structs

none

consts

12const SYM_A: nx_int = 100 // constant, weight 1, prec 10
13const SYM_B: nx_int = 101 // constant, weight 1, prec 11
14const SYM_C: nx_int = 102 // constant, weight 1, prec 12
15const SYM_F: nx_int = 200 // unary, weight 1, prec 20
16const SYM_G: nx_int = 201 // unary, weight 1, prec 21
17const SYM_H: nx_int = 250 // binary, weight 1, prec 30
20const VAR_X: nx_int = 0
21const VAR_Y: nx_int = 1
22const NX_MAX_VAR: nx_int = 4

functions

25func mk_unary(sym: nx_int, child: *Term) -> *Term
called by 1: main calls 2: sys_mmapnx_term_app
34func mk_binary(sym: nx_int, c0: *Term, c1: *Term) -> *Term
called by 1: main calls 2: sys_mmapnx_term_app
43func report(name: *u8, expected: nx_int, actual: nx_int) -> nx_int
58func main() -> nx_exit