code wiki / (root) / nx_unified_solver.nx

nx_unified_solver.nx

buildroot/runtime/nx_unified_solver.nx

7364 B158 linesdepth 4pulls 4 transitivereach 1 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_unified_solver.nx -- the "one ring" dispatcher. Per user 2026-05-14: "i want support for all of this as we do the casc path and to exceed all of these languages and systems so a simple notebook ui is usable by all these types of mathmaticians one ring to rule them all and all that but this time for good". Routes a query to the appropriate solver subsystem: PROBLEM_SAT -> nx_sat_solver (DPLL today, CDCL queued) PROBLEM_SMT -> theory-tagged dispatcher (UF/LIA/LRA/BV/...) PROBLEM_FOL -> nx_resolution / nx_saturation PROBLEM_QED_PROOF -> nx_derive_verify PROBLEM_TPTP -> parse via nx_tptp, then route to FOL or SMT Result is sealed: SAT / UNSAT / VALID / INVALID / UNKNOWN / TIMEOUT. Each result carries a provenance row pointing to which subsystem decided.

dependencies 4 imports · 1 importers

nx_syscalls.nx nx_runtime.nx nx_tier.nx nx_result.nx nx_unified_solver.nx nx_unified_solver_test.nx

imports: nx_syscalls.nxnx_runtime.nxnx_tier.nxnx_result.nx

imported by: nx_unified_solver_test.nx

structs

110struct SolveRequest
116struct SolveResponse

consts

30const NX_PROBLEM_SAT: nx_int = 1
31const NX_PROBLEM_SMT: nx_int = 2
32const NX_PROBLEM_FOL: nx_int = 3
33const NX_PROBLEM_QED_PROOF: nx_int = 4
34const NX_PROBLEM_TPTP_FOF: nx_int = 5
35const NX_PROBLEM_TPTP_CNF: nx_int = 6
36const NX_PROBLEM_TPTP_TFF: nx_int = 7
37const NX_PROBLEM_TPTP_THF: nx_int = 8
38const NX_PROBLEM_NOTEBOOK: nx_int = 9 // cell evaluation
41const NX_SMT_THEORY_UF: nx_int = 101 // uninterpreted functions
42const NX_SMT_THEORY_LIA: nx_int = 102 // linear integer arithmetic
43const NX_SMT_THEORY_LRA: nx_int = 103 // linear real arithmetic
44const NX_SMT_THEORY_BV: nx_int = 104 // bit vectors
45const NX_SMT_THEORY_ARRAYS: nx_int = 105
46const NX_SMT_THEORY_STRINGS: nx_int = 106
47const NX_SMT_THEORY_NONLINEAR: nx_int = 107
48const NX_SMT_THEORY_DATATYPES: nx_int = 108
49const NX_SMT_THEORY_PRESBURGER: nx_int = 109
52const NX_VERDICT_SAT_RES: nx_int = 1 // satisfiable
53const NX_VERDICT_UNSAT_RES: nx_int = 2 // unsatisfiable
54const NX_VERDICT_VALID_RES: nx_int = 3 // logically valid (FOL)
55const NX_VERDICT_INVALID_RES: nx_int = 4 // not valid (FOL)
56const NX_VERDICT_UNKNOWN_RES: nx_int = 5 // undecidable / incomplete
57const NX_VERDICT_TIMEOUT_RES: nx_int = 6 // ran out of resources
58const NX_VERDICT_PROOF_OK: nx_int = 7 // QED derivation kernel-verified
59const NX_VERDICT_PROOF_FAIL: nx_int = 8 // QED derivation rejected by kernel
60const NX_VERDICT_NOTEBOOK_OK: nx_int = 9 // notebook cell evaluated cleanly
122const NX_SOLVE_RESPONSE_BYTES: nx_int = 24

functions

62func nx_verdict_name(v: nx_int) -> *u8
75func nx_problem_name(p: nx_int) -> *u8
called by 1: nx_solve
88func nx_smt_theory_name(t: nx_int) -> *u8
called by 1: nx_solve
126func nx_solve(req: *SolveRequest) -> *SolveResponse
155func nx_unified_n_subsystems() -> nx_int { return 9 }
158func nx_unified_n_smt_theories() -> nx_int { return 9 }