code wiki / (root) / nx_proof_log.nx

nx_proof_log.nx

buildroot/runtime/nx_proof_log.nx

4803 B121 linesdepth 4pulls 4 transitivereach 5 importersview sourcekind librarytopic proof
docsdependenciesstructsconstsfunctions

about

nx_proof_log.nx -- inference history tracking. Side table recording, per derived clause, the inference rule + parent clause indices. Foundation for TSTP-format proof certificate emission required by CASC submissions (LOSE -> WIN on the "proof certificate output" axis of the honest CASC verdict). API: nx_proof_log_new(cap) -> *ProofLog nx_proof_log_add(log, rule, parent_a, parent_b) -> entry_idx nx_proof_log_walk_unsat(log, empty_idx, visited[]) -> count (transitive parent walk from the empty clause back to inputs -- the "minimal proof support" set) Caller threading is the saturation loop's responsibility. A clause index in `log` corresponds 1:1 to its index in the clause set the loop manages. Input clauses get NX_PROOF_RULE_INPUT with parents -1.

dependencies 4 imports · 5 importers

nx_syscalls.nx nx_runtime.nx nx_tier.nx nx_result.nx nx_proof_log.nx nx_atp_to_derive.nx nx_atp_to_derive_test.nx nx_proof_log_test.nx nx_tstp_emit.nx nx_tstp_emit_test.nx

imports: nx_syscalls.nxnx_runtime.nxnx_tier.nxnx_result.nx

imported by: nx_atp_to_derive.nxnx_atp_to_derive_test.nxnx_proof_log_test.nxnx_tstp_emit.nxnx_tstp_emit_test.nx

structs

56struct ProofEntry
63struct ProofLog

consts

31const NX_PROOF_RULE_INPUT: nx_int = 0
32const NX_PROOF_RULE_RES: nx_int = 1 // binary resolution
33const NX_PROOF_RULE_FACTOR: nx_int = 2
34const NX_PROOF_RULE_PARAMOD: nx_int = 3
35const NX_PROOF_RULE_DEMOD: nx_int = 4
36const NX_PROOF_RULE_HYPERRES: nx_int = 5 // N-electron hyperresolution
37const NX_PROOF_RULE_EQ_FACTOR: nx_int = 6
38const NX_PROOF_RULE_INST_GEN: nx_int = 7
39const NX_PROOF_RULE_DEDUP: nx_int = 8 // literal dedup (preprocessing)
40const NX_PROOF_RULE_AVATAR_SPLIT: nx_int = 9
61const NX_PROOF_ENTRY_BYTES: nx_int = 24
68const NX_PROOF_LOG_BYTES: nx_int = 24

functions

42func nx_proof_rule_name(r: nx_int) -> *u8
70func nx_proof_log_new(cap: nx_int) -> *ProofLog
called by 3: mainmainmain calls 1: sys_mmap
79func nx_proof_log_add(log: *ProofLog, rule: nx_int,
called by 3: mainmainmain
91func nx_proof_log_get(log: *ProofLog, i: nx_int) -> *ProofEntry
103func nx_proof_walk_ancestors(log: *ProofLog, start_idx: nx_int,