code wiki / (root) / nx_mathml_gate.nx

nx_mathml_gate.nx

buildroot/runtime/nx_mathml_gate.nx

8651 B151 linesdepth 5pulls 8 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_mathml_gate.nx -- IS THE SOVEREIGN LATEX->MATHML TYPESETTER CORRECT, AND CAN IT REFUSE? The teeth are structural facts about the emitted markup, not stored golden strings: a golden string records that its author agreed with the code on the day they wrote it, whereas "a superscript produces an msup element" is true of any correct implementation and false of any wrong one. THE REFUSALS ARE THE LOAD-BEARING HALF. A typesetter that silently drops what it cannot read produces a formula that is wrong in a way the reader cannot see -- worse than no formula at all -- so an unknown command, an unbalanced brace and a short buffer each have their own negative control, and each asserts WHICH rule fired rather than merely that something was refused. license_tier: ORIGINAL expect_exit: 0

dependencies 3 imports · 0 importers

syscalls.nx nx_mathml_lib.nx nx_gate_verdict.nx nx_mathml_gate.nx

imports: syscalls.nxnx_mathml_lib.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

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

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gv_head gv_puts sys_write ↻ mg_conv lm_to_mathml lm_lit lm_slen he_put mg_slen gv_check gv_puts ↻ mg_has mg_slen ↻ gv_check_eq gv_check ↻ gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap lm_to_mathml ↻ gv_values_head gv_puts ↻

structs

none

consts

17const MG_CAP: i64 = 65536

functions

19func mg_slen(s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { i = i + 1 } return i }
called by 2: mg_hasmg_conv
21func mg_has(buf: *u8, n: i64, pat: *u8) -> i64
called by 1: main calls 1: mg_slen
36func mg_conv(latex: *u8, out: *u8, cap: i64, bo: *i64, bl: *i64) -> i64
called by 1: main calls 2: lm_to_mathmlmg_slen
40func main() -> i64