code wiki / (root) / nx_lpo_test.nx

nx_lpo_test.nx

buildroot/runtime/nx_lpo_test.nx

6211 B134 linesdepth 7pulls 7 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_lpo_test.nx -- LPO smoke covering all four verdicts + each rule.

dependencies 7 imports · 0 importers

nx_syscalls.nx nx_runtime.nx nx_tier.nx nx_result.nx nx_unify.nx nx_term_order.nx nx_lpo.nx nx_lpo_test.nx

imports: nx_syscalls.nxnx_runtime.nxnx_tier.nxnx_result.nxnx_unify.nxnx_term_order.nxnx_lpo.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 mk_state nx_kbo_new sys_mmap ↻ nx_kbo_register nx_result_err sys_mmap ↻ nx_result_ok sys_mmap ↻ mk_unary sys_mmap ↻ nx_term_app sys_mmap ↻ nx_term_const sys_mmap ↻ report print sys_write ↻ strlen ↻ nx_lpo_verdict_name println ↻ nx_lpo_compare nx_term_eq nx_term_eq ↻ nx_term_arg nx_term_contains_var nx_term_contains_var ↻ nx_term_arg ↻ nx_lpo_is_proper_subterm nx_term_arg ↻ nx_term_eq ↻ nx_lpo_is_proper_subterm ↻ nx_lpo_prec_cmp nx_lpo_compare ↻ nx_term_arg ↻ mk_binary

structs

none

consts

11const SYM_A: nx_int = 100 // const, prec 10
12const SYM_B: nx_int = 101 // const, prec 11
13const SYM_F: nx_int = 200 // unary, prec 20
14const SYM_G: nx_int = 201 // unary, prec 21
15const SYM_H: nx_int = 250 // binary, prec 30
17const VAR_X: nx_int = 0
18const VAR_Y: nx_int = 1

functions

20func mk_unary(sym: nx_int, child: *Term) -> *Term
called by 1: main calls 2: sys_mmapnx_term_app
27func mk_binary(sym: nx_int, c0: *Term, c1: *Term) -> *Term
called by 1: main calls 2: sys_mmapnx_term_app
36func mk_state() -> *KboState
called by 1: main calls 2: nx_kbo_newnx_kbo_register
46func report(name: *u8, expected: nx_int, actual: nx_int) -> nx_int
54func main() -> nx_exit