TuxPL 2.0.0: Architecture of a Deterministic, Adversarial Virtual Machine with Galois-Field Control-Flow Integrity and Modular Residue Arithmetic
A Provably Complete, Self-Modifying Virtual Machine and Constraint Satisfaction Language
Technical Report & System Specification — Version 2.0.0 (C99 / POSIX.1-2001 Compliant)
🌐 English | Русский
This specification defines TuxPL 2.0.0, a deterministic, adversarial, polymorphic programming language and execution environment engineered as a high-order Constraint Satisfaction Problem (CSP). Departing fundamentally from trivial substitution-based esoteric architectures (such as Malbolge or INTERCAL), TuxPL integrates cryptographic control-flow integrity (CFI), modular arithmetic representations, latent
In the TuxPL 2.0.0 kernel, discrete memory modes, classic stack interpreters, and behavioral mode switches have been permanently eliminated: the runtime operates exclusively on a flat cryptographic torus uint32_t words), completely blurring the boundary between executable machine code and cryptographic entropy. Programs constitute bounded trajectories across a .tu), with local development supported via the orthogonal --no-shadow flag.
Traditional esoteric languages achieve obfuscation through ad-hoc randomness or lookup tables (e.g., Malbolge’s ternary crazy function applied to a static 59,049-cell ring). Such designs suffer from deterministic pre-image vulnerabilities and rapid entropy collapse.
TuxPL 2.0.0 formalizes execution as a monolithic system of simultaneous non-linear invariants across five orthogonal execution strata:
[ SOURCE CODE ]
│
┌────────────────────────────┴────────────────────────────┐
▼ ▼
[ LEXICAL STRATUM ] [ STRUCTURAL STRATUM ]
• Alphabet: Σ = {T,t,U,u,X,x} • File size in bits: |F| = bits(F)
• Opcode: De Bruijn Mealy Machine (252 states) • Mandatory micro-libraries Tux/
• Operand: RNS-CRT 12-char suffix (M = 7,436,429) • Harmonic cycle: 1-2-3-4-5 tokens
│
┌────────────────────────────┴────────────────────────────┐
▼ ▼
[ CRYPTOGRAPHIC CFI ] [ FLAT TORUS Z_M & METABOLISM ]
• 11-byte GBSV terminator: :[Σ|Χ|Τ];Ζ} • Flat torus Z_M (64K uint32_t, M=7436429)
• Base64 cyclic spectral shift • 3-adic age: nu_3(W) mod 4
• Galois Field F_{2^8} syndrome (Rijndael 0x11B) • Affine Borrow Checker: W != 0 mod 17
• p-adic wavelet analysis: nu_2(W) vs nu_3(W) • Torsion shift: PCD += popcount(W) + 1
• Hamming collapse Z relative to P_{prev} • SP-Round: Irreversible AES S-Box round
│
▼
[ MONOLITHIC ADVERSARIAL RUNTIME ]
• Context A (Main User Thread, PC=0)
• Context B (Shadow Adversary)
• The Orphan Paradox: Mandatory companion (.tu)
• Flag --no-shadow for local development
• Deterministic quantum scheduler
• Metabolic gas budget (100) & time debt
To ensure execution trace validity
-
Orthographic Invariant: Every instruction token
$w \in \Sigma^*$ is a valid path on the De Bruijn directed graph generating an opcode$\lambda(q, w) \in [0, 41]$ . -
Modular Operand Invariant: Every integer argument
$N \in [0, M-1]$ is mapped to residue vector$�ec{r} = (N �mod m_i)_{i=0}^5$ and encoded into exactly 12 characters via Radix-6 projection. -
Harmonic Line-Length Invariant: Line
$L_k$ contains exactly$k \pmod 5 + 1$ tokens ($1 \le |L_k| \le 5$ ). -
Delimiter Steganography: The trailing space interval after token
$w$ contains strictly$\delta(w)$ spaces, where$\delta(w) = \sum_{c \in w} [c \in {U, u}]$ . -
Galois Integrity Invariant: Every line of source code terminates with a valid 11-byte GBSV signature $\mathcal{S}k = (\sigma{ ext{b64}}, \chi_{ ext{gf}}, au_{ ext{tux}}, \zeta)$, chaining the line's prefix with the algebraic state of line
$k-1$ in$\mathbb{F}_{2^8}$ and Hamming metric. -
Affine Ownership Invariant: Any attempt to fetch an instruction from
$\mathrm{PC}_{\mathrm{code}}$ or read memory where$W \equiv 0 \pmod{17}$ triggers an immediate Move-semantics panic (PANIC_AFFINE_USE_AFTER_MOVE). -
Thermodynamic Energy Invariant: Gas balance
$B_{t+1} = B_t - 1 \ge 0$ . Upon exhaustion ($B_t = 0$ ), execution terminates with code 3 (PANIC_BUDGET_EXHAUSTION) unless replenished viaOP_FISH.
Any invariant breach immediately halts execution with a deterministic [VM_PANIC] diagnostic vector and strict POSIX exit code (1, 2, or 3).
Opcodes in TuxPL 2.0.0 are not static constants. They are synthesized dynamically as output signals of a deterministic Mealy machine
Automaton Parameters:
State Space: |Q| = 252 (multiple of 42, 6 * 42)
Input Alphabet: |Σ| = 6
Output Alphabet: |Δ| = 42 (Opcodes 0..41)
Initial State: q_0 = 0x5A (90)
-
State Transition Function:
$$\delta(q, c) = (6q + ext{idx}(c)) \pmod{252}$$ -
Mealy Output Function:
$$\lambda(q, c) = (q \oplus (7 \cdot ext{idx}(c))) \pmod{42}$$
Empirical Proof: The verification suite tests/test_rns_debruijn.c explores all debruijn_encode_fixed3 (fixed length 3) and debruijn_encode_opcode (shortest path 1 to 3 characters).
To eliminate integer overflow vulnerabilities and maximize operand entropy diffusion, integer constants are represented using a Residue Number System based on the Chinese Remainder Theorem (CRT).
A tuple of six pairwise coprime moduli is employed:
Any integer
The reconstruction isomorphism
Because
Each character pair
Direct canonical encoding in
Example: Encoding operand N = 42
Moduli: m = (7, 11, 13, 17, 19, 23)
Residues:
42 mod 7 = 0 --> (0, 0) --> "TT"
42 mod 11 = 9 --> (1, 3) --> "tu"
42 mod 13 = 3 --> (0, 3) --> "Tu"
42 mod 17 = 8 --> (1, 2) --> "tU"
42 mod 19 = 4 --> (0, 4) --> "TX"
42 mod 23 = 19 --> (3, 1) --> "ut"
12-Character Suffix: "TTtuTutUTXut"
Verification: Sum(r_i * C_i) mod 7436429 = 42. Bijection confirmed.
The decoding API rns_decode_operand(const char *buf, size_t len, uint32_t *out) accepts explicit buffer lengths, enabling safe parsing within dense instruction streams without requiring null terminators \0.
Every line of program source code is protected by an explicit 11-byte cryptographic terminator preceded by a mandatory single space:
:[<sigma_b64>|<chi_gf>|<tau_tux>];<zeta>}
Terminator Layout (Exactly 11 bytes):
:[ - 2-byte preamble (ASCII 0x3A 0x5B)
σ - Base64 cyclic spectral shift token (1 byte)
| - 1-byte separator (ASCII 0x7C)
χ - Galois Field F_{2^8} syndrome token (AES 0x11B) (1 byte)
| - 1-byte separator (ASCII 0x7C)
τ - 2-adic vs 3-adic wavelet analysis token ∈ {'T', 'U', 'X'} (1 byte)
]; - 2-byte delimiter (ASCII 0x5D 0x3B)
ζ - Hamming metric collapse token ∈ {'t', 'u', 'x', 'p', 'l'} (1 byte)
} - 1-byte block terminator (ASCII 0x7D)
Line Prefix: "TuX tux TUX"
│
┌────────────────┼────────────────┬────────────────┐
▼ ▼ ▼ ▼
[ Spectral Shift ] [ Galois Field ] [ p-Adic Wavelet ] [ Hamming Collapse ]
Base64 F_{2^8} nu_2 vs nu_3 d_H(P, P_{prev})
σ = B64(acc) χ = chr(33+S%94) τ ∈ {T,U,X} ζ ∈ {t,u,x,p,l}
│ │ │ │
└────────────────┴────────┬───────┴────────────────┘
▼
Terminator: " :[k|Ω|X];u}"
-
Cyclic Spectral Shift Base64 (
$\sigma_{ ext{b64}}$ ): The line prefix$P$ of length$N$ is divided into 6-bit sliding windows$C_i$ offset by$i imes 6$ bits. Each chunk undergoes a cyclic left bit-shift by$s = i \pmod 6$ : $$V_i = ext{rotl}6(C_i, i \pmod 6)$$ $$ ext{acc} = \sum{i=0}^{K-1} (V_i \oplus (i \pmod{64}))$$$$\sigma_{ ext{b64}} = ext{Base64Table}[ ext{acc} \pmod{64}]$$ -
Galois Field $\mathbb{F}{2^8}$ Multiplicative Syndrome ($\chi{ ext{gf}}$): Evaluated over the Rijndael finite field $\mathbb{F}{2^8} \cong \mathbb{Z}2[x] / (x^8 + x^4 + x^3 + x + 1)$ with irreducible polynomial
0x11B: $$S = �igoplus{i=0}^{N-1} \mathrm{inv}{\mathrm{GF}}(P[i] �ullet �lpha^{(i+1) \pmod{255}})$$$$\chi_{ ext{gf}} = ext{chr}(33 + (S \pmod{94}))$$ where$�ullet$ represents Galois multiplication,$�lpha = 0x03$ is the generator element, and $\mathrm{inv}{\mathrm{GF}}(y)$ is multiplicative inversion in $\mathbb{F}{2^8}$ ($\mathrm{inv}(0) = 0$ ). -
$p$ -Adic Wavelet Analysis ($ au_{ ext{tux}}$): The prefix$P$ is mapped to a 64-bit integer$W = \sum_{i=0}^{N-1} ((uint64)P[i] \ll (i \pmod 8))$ . If$W = 0$ ,'T'is returned. Otherwise, 2-adic and 3-adic valuation orders are compared: $$ u_2(W) = ext{ctz}(W), \quad u_3(W) = \max {k \in \mathbb{N}0 : 3^k \mid W}$$ $$ au{ ext{tux}} = �egin{cases} ext{'X'}, & ext{if } u_3(W) > u_2(W) \ ext{'U'}, & ext{if } u_2(W) > u_3(W) \ ext{'T'}, & ext{if } u_3(W) = u_2(W) \end{cases}$$ -
Hamming Metric Chain Collapse (
$\zeta$ ): Measures bitwise Hamming distance between the current line prefix$P_{ ext{curr}}$ and the previous line prefix$P_{ ext{prev}}$ (the first line utilizes the genesis seedTUX_SEED = "TUXPL_2.0_GENESIS"):$$d_H = \sum_{j=0}^{\max(N_c, N_p)-1} ext{popcount}(P_{ ext{curr}}[j] \oplus P_{ ext{prev}}[j])$$ $$\zeta = ext{ZETA_TABLE}[d_H \pmod 5] \in {'t', 'u', 'x', 'p', 'l'}$$
Because tux_helper.py serves as a critical compiler and code-generator, any minute arithmetic divergence (such as odd-bit window alignment at PANIC_GBSV_GF).
In tests/test_py_gbsv_cross.py, a rigorous automated cross-verification harness is implemented:
- Evaluates 1,010 test vectors (extreme boundary conditions, empty prefix mutations, long polynomial streams, and 1,000 pseudorandom sequences).
- Loads the C library
src/gbsv.cviactypesand verifies bit-for-bit identity of(sigma_b64, chi_gf, tau_tux, zeta)against the native Python implementation. - Result: 100% bitwise parity (0 bits drift). The cross-test is executed automatically as a mandatory prerequisite in
tests/run.sh.
Any single-bit mutation or whitespace perturbation in TuxPL source code immediately triggers PANIC_GBSV_GF, PANIC_GBSV_B64, PANIC_GBSV_TUX, or PANIC_GBSV_ZETA, abruptly terminating the process.
TuxPL 2.0.0 completely eliminates the legacy 40-byte bookkeeping structure TuxCell. The entire virtual machine memory is consolidated into a continuous one-dimensional array uint32_t *unified_mem residing on a flat cryptographic torus
This paradigm erases the boundary between code and data: memory is homogeneous cryptographic noise. Every 32-bit machine word
┌─────────────────────────────────────────────────────────────┐
│ Flat Modular Torus Z_M (65,536 words uint32_t) │
├─────────────────────────────┬───────────────────────────────┤
│ [0 ... prog_len - 1] │ [prog_len ... 65535] │
│ Active Executable Core │ Data, Heap & Shadow Zone │
└──────────────▲──────────────┴───────────────▲───────────────┘
│ │
PC_CODE (Fetch) PC_DATA (Dual-PC)
Every memory cell
-
Latent Cell Age via 3-Adic Valuation $ u_3(W)$: Cell age reflects entropy degradation. In pure mathematics, the
$p$ -adic order of zero is undefined ($ u_p(0) = \infty$), creating an infinite loop trap. The TuxPL kernel introduces a strict boundary condition: $$ u_3(0) = 3 \implies ext{DEAD}$$ For any$W > 0$ , the valuation is the maximum power of three dividing$W$ : $$ u_3(W) = \max {k \in \mathbb{N}_0 : 3^k \mid W}$$ $$ ext{Age}(W) = u_3(W) \pmod 4 \in {0: ext{YOUNG}, 1: ext{ADULT}, 2: ext{OLD}, 3: ext{DEAD}}$$- YOUNG (0): Opcode is decoded directly by the base dynamic decoder.
-
ADULT (1): Opcode undergoes genomic mutation via chromosome
$G_1$ : $ ext{op} \leftarrow ( ext{op} \oplus G_1) \pmod{42}$. - OLD (2): Opcode is distorted by CRAZY64 ternary convolution: $ ext{op} \leftarrow ext{tux_crazy64}( ext{op}, G_2) \pmod{42}$.
-
DEAD (3): Complete cellular collapse. Cell irreversibly degrades into an inert
OP_NOP(41).
-
Latent Operand Type: Derived from the modular projection offset of invariant
$0x5A$ (90): $$ ext{Type}(W) = (W \oplus 0x5A) \pmod 6$$-
0:TUX_TYPE_ADDR(Address on torus$\mathbb{Z}_M$ ) -
1:TUX_TYPE_I8(8-bit signed integer) -
2:TUX_TYPE_I16(16-bit signed integer) -
3:TUX_TYPE_I32(32-bit modular integer) -
4:TUX_TYPE_I64(64-bit extended integer) -
5:TUX_TYPE_OPCODE(Executable kernel opcode)
-
-
Affine Ownership Invariant (Borrow Checker): In torus $\mathbb{Z}M$, 17 is one of the six generating prime moduli ($m_3 = 17$). A memory cell is considered Moved / Consumed if and only if it is a multiple of 17: $$W \equiv 0 \pmod{17} \iff ext{Cell is Moved}$$ Any instruction fetch (
Fetch) from $\mathrm{PC}{\mathrm{code}}$ or indirect data read (OP_LOADIND) at a location where$W \equiv 0 \pmod{17}$ is caught as Use-After-Move, triggering:[VM_PANIC] PANIC_AFFINE_USE_AFTER_MOVE: Affine borrow checker: cell moved (W = 0 mod 17) -
Torsion Data Pointer Shift (
$\Delta \mathrm{PCD}$ ): During indirect operations and decoding, data pointer$\mathrm{PCD}$ dynamically advances by the population count of the word:$$\mathrm{PCD}_{t+1} = (\mathrm{PCD}_t + ext{popcount}(W) + 1) \pmod{65536}$$
Upon executing an instruction, the cell at
Cycle False-Move Protection:
If after the SP-Round mutation the resulting pseudorandom value
TuxPL 2.0.0 completely eliminates disparate startup modes. Adversarial execution of two isolated agents across the flat torus
┌─────────────────────────────────────────────────────────┐
│ Flat Torus Z_M (64K uint32_t) │
└────────────▲────────────────────────▲───────────────────┘
│ │
┌──────┴──────┐ ┌──────┴──────┐
│ Context A │ │ Context B │
│ (User Main) │ │ (Adversary) │
└──────▲──────┘ └──────▲──────┘
│ │
└───────────┬────────────┘
│
┌───────────┴────────────┐
│ Quantum Scheduler │
│ (scheduler.c) │
└────────────────────────┘
- Context A (Main Execution Thread): User program initialized at $\mathrm{PC}{\mathrm{code}, A} = 0$, $\mathrm{PC}{\mathrm{data}, A} = 1024$.
-
Context B (Shadow Adversary): Injected into a pseudorandom memory location derived from the program FNV-1a hash and genome chromosome
$G_1$ : $$\mathrm{PC}{\mathrm{code}, B} = (K{\mathrm{prog}} \oplus G_1) \pmod{65536}$$ $$\mathrm{PC}{\mathrm{data}, B} = (\mathrm{PC}{\mathrm{code}, B} + 512 + (G_2 \pmod{1024})) \pmod{65536}$$ Registers and entropy for Context B are seeded from the binary companion container.tu. The adversary executes within the memory torus, exerting continuous pressure on user state.
Because the adversarial engine is monolithic, launching any program with zero flags (./tuxpl program.tux) mandates the presence of the paired 88-byte companion container program.tu.
- If a programmer writes
test.tuxin a text editor and executes it directly, the runtime panics immediately:The language fundamentally rejects unsigned code lacking companion metadata.[VM_PANIC] PANIC_COMPANION_ORPHAN: Required companion metadata container (.tu) not found - Local Mode
--no-shadow(alias--deterministic): The primary development workflow for unit testing and local experimentation without companion generation. Disables Context B spawning and runs strictly in single-context mode.
Execution is strictly bounded by a metabolic gas budget:
- The initial budget defaults to 100 units of gas.
- Every executed instruction consumes 1 unit of gas.
- Upon budget exhaustion, the VM halts with POSIX code 3 (
PANIC_BUDGET_EXHAUSTION). - The only mechanism to sustain long-running programs (such as Cyber-Reactor) is periodic energetic replenishment via
OP_FISH(tuuUUuuUuux).
TuxPL supports temporal reversibility through a thermodynamic ring buffer TuxHistoryBuffer:
- Enabled exclusively via
--reversible(or--REVERSIBLE). - When active,
OP_UNDO(tuuUUuUUuuX) performs a physical rollback of the last state modification (registers, stack, and memory). - Executing
OP_UNDOwithout--reversibleproduces a specification panic:[VM_PANIC] PANIC_SPEC_NO_HISTORY: Attempted state rollback (OP_UNDO) without reversible snapshot buffer
Context switching is deterministic and independent of operating system timers. At each execution step, an entropy convolution of registers and torus memory is computed:
Registers
Instructions accumulate temporal debt time_debt:
- Standard instructions:
$+1$ - Heavy non-linear operations (
CRAZY,CAST):$+1 + ( ext{entropy} \pmod 3)$ - Cellular cloning (
CLONE):$+5$
If time_debt OP_PAY_TIME at the expense of metabolic gas (gas_budget).
Variables and memory cells operate under strict affine move semantics:
- Reading a variable via
OP_LOADmoves the value to the stack, marking the memory cell as moved ($W \leftarrow 17$ ). - Subsequent reads without an intervening
OP_STOREtriggerPANIC_AFFINE_USE_AFTER_MOVE(POSIX code3). - Indirect reading via
OP_LOADINDon any address where$W \equiv 0 \pmod{17}$ similarly triggers an immediate move-after-use abort.
The operand stack is subjected to dynamic acceleration limits:
- Consecutive push operations increase stack tension.
- Exceeding 7 consecutive
PUSHinstructions without intermediate computation or pops triggers gravitational collapse:$$\mathrm{depth} > 7 \implies ext{Stack Gravity Overflow [Exit Code 3]}$$
TuxPL implements a 40-trit extension of Malbolge’s ternary crazy operation (
| 0 | 1 | 2 | |
|---|---|---|---|
| 0 | 1 | 0 | 0 |
| 1 | 1 | 0 | 2 |
| 2 | 2 | 2 | 1 |
Implemented via parallel bitwise SIMD emulation in src/state.c.
| Opcode | Mnemonic | Classic Trajectory | Mathematical Semantics |
|---|---|---|---|
0 |
OP_ADD |
TuX |
|
1 |
OP_SUB |
Tux |
|
2 |
OP_MUL |
TUx |
|
3 |
OP_DIV |
TUX |
|
| eq 0$ | |||
4 |
OP_DUP |
tux |
|
5 |
OP_SWAP |
tuX |
|
6 |
OP_POP |
tUx |
|
7 |
OP_PRINTCHAR |
tUX |
Emits |
8 |
OP_PUSH |
Tuu<bits>X |
Pushes constant |
9 |
OP_LOAD |
Tuu<bits>x |
Move value from vars[N] onto stack |
10 |
OP_STORE |
TuU<bits>x |
Stores stack top into vars[N]
|
11 |
OP_LOADIND |
TuU<bits>X |
Reads mem[PC_DATA + offset] (requires $W |
| ot\equiv 0 \pmod{17}$) | |||
12 |
OP_STOREIND |
TUu<bits>x |
Writes mem[PC_DATA + offset] = val
|
13 |
OP_JMP |
TUu<bits>X |
Jump: |
14 |
OP_JZ |
TUU<bits>x |
Conditional branch if |
15 |
OP_JNZ |
TUU<bits>X |
Conditional branch if $a |
| eq 0$ | |||
16 |
OP_CMP |
tuu<bits>X |
|
17 |
OP_LISTNEW |
tuuUUuux |
Allocates dynamic vector in torus memory |
18 |
OP_LISTPUSH |
tuuUUuuX |
Appends element to vector |
19 |
OP_LISTGET |
tuuUUuUx |
Reads from vector index |
20 |
OP_LISTSET |
tuuUUuUX |
Writes to vector index |
21 |
OP_LISTLEN |
tuuUUUUx |
Returns vector length |
22 |
OP_PRINTNUM |
tUU<bits>x |
Prints decimal number |
23 |
OP_INPUTNUM |
tUU<bits>X |
Reads decimal number from stdin |
24 |
OP_REGGET |
TuU<reg>X |
Reads register |
25 |
OP_REGSET |
TUu<reg>x |
Writes stack top to register |
26 |
OP_FISH |
tuuUUuuUuux |
OP_REPLENISH_GAS: Replenishes gas budget ( |
27 |
OP_CRAZY |
tuuUUuuUuuX |
64-bit ternary Malbolge convolution |
28 |
OP_CAST |
tuu<bits>x |
Explicit semantic type tag conversion |
29 |
OP_DIR |
tuuUUuuUuUx |
Inverts stack direction |
30 |
OP_PUSH_PC |
tuuUUuuUUuUx |
Pushes current |
31 |
OP_SET_PC |
tuuUUuuUUuUX |
Branch: |
32 |
OP_SWAP_PC |
tuuUUuuUUUux |
Swap: $\mathrm{PC}{\mathrm{code}} \leftrightarrow \mathrm{PC}{\mathrm{data}}$ |
33 |
OP_ADD_PC |
tuuUUuuUUUuX |
Relative offset: $\mathrm{PC}{\mathrm{code}} \leftarrow (\mathrm{PC}{\mathrm{code}} + \Delta) \pmod{65536}$ |
34 |
OP_XOR_PC |
tuuUUuuUUUUx |
Masking: $\mathrm{PC}{\mathrm{code}} \leftarrow (\mathrm{PC}{\mathrm{code}} \oplus M) \pmod{65536}$ |
35 |
OP_CLONE |
tuuUUuuUUUUX |
Clones cell with generational evolution |
36 |
OP_DECAY |
tuuUUuUUuuux |
Forces cell aging to $ ext{DEAD}$ ( |
37 |
OP_WAKE |
tuuUUuUUuuuX |
Awakens cell from $ ext{DEAD}$ ( |
38 |
OP_REINTERPRET |
tuuUUuUUuux |
Reinterprets data word as executable opcode |
39 |
OP_UNDO |
tuuUUuUUuuX |
Reversible state rollback via history buffer |
40 |
OP_PAY_TIME |
tuuUUuUUuUx |
Amortizes temporal debt via gas budget |
41 |
OP_NOP |
tuuUUuUUuUX |
Inert operation (terminal dead-cell state) |
TuxPL implements an unambiguous diagnostic panic subsystem ([VM_PANIC]). Messages are emitted to stderr in standard canonical format:
[VM_PANIC] PANIC_<CATEGORY>_<DETAIL>: <Human readable diagnostic message>
| POSIX Code | Semantic Category | Representative Panics |
|---|---|---|
1 |
Runtime Arithmetic Errors | PANIC_RUNTIME_MATH_DIV_ZERO, PANIC_RUNTIME_STACK_UNDERFLOW, PANIC_GBSV_GF, PANIC_GBSV_B64, PANIC_GBSV_TUX, PANIC_GBSV_ZETA |
2 |
Specification, CFI & Companion | PANIC_SPEC_LEGACY_REJECTED, PANIC_SPEC_FILENAME_MISMATCH, PANIC_SPEC_HARMONIC_VIOLATION, PANIC_SPEC_MISSING_PRELUDE, PANIC_COMPANION_ORPHAN, PANIC_COMPANION_HERESY, PANIC_SPEC_NO_HISTORY |
3 |
Resources, Memory & Ownership | PANIC_AFFINE_USE_AFTER_MOVE, PANIC_STACK_GRAVITY_OVERFLOW, PANIC_BUDGET_EXHAUSTION, PANIC_OUT_OF_MEMORY |
Offset Size Field Description
─────────────────────────────────────────────────────────────────
0x00 4 B Magic Signature: 0x54 0x55 0x58 0x32 ("TUX2")
0x04 4 B Format Version: 0x00000002
0x08 8 B 64-bit FNV-1a Hash of source file .tux
0x10 8 B Initial Entropy Seed
0x18 8 B Genome Chromosome 0 (G0: Structural mutation key)
0x20 8 B Genome Chromosome 1 (G1: Context B Code Pointer)
0x28 8 B Genome Chromosome 2 (G2: Context B Data Pointer)
0x30 8 B Genome Chromosome 3 (G3: Awakening harmonic)
0x38 8 B Initial Register R0
0x40 8 B Initial Register R1
0x48 8 B Initial Register R2
0x50 8 B Initial Register R3
─────────────────────────────────────────────────────────────────
Total: Exactly 88 bytes of structured binary data.
Missing companion files abort execution with PANIC_COMPANION_ORPHAN (code 2). FNV-1a checksum mismatches abort with PANIC_COMPANION_HERESY (code 2).
The runtime is authored in standard ISO C99 and compiles with any POSIX C compiler:
# Build monolithic release binary
make
# Clean compilation artifacts
make cleanThe verification suite exercises unit, integration, and invariant layers:
# Run all 8 test suites and 74k+ formal mathematical assertions
make test-
Galois Field Verification (
make test-gbsv): 24/24 tests verifying$\mathbb{F}_{2^8}$ multiplicative inversion, the Rijndael polynomial, and GBSV signature sensitivity. -
De Bruijn Automaton & RNS-CRT Engine (
make test-rns):-
Bézout Inverses:
$C_i \equiv 1 \pmod{m_i}$ and$C_i \equiv 0 \pmod{m_j}$ . -
CRT Isomorphism: 100,000 pseudorandom integers verified for
$\text{decode}(\text{encode}(N)) == N$ . -
Dirichlet Resolution: 100% residue coverage of
$m_5=23$ via 12-char Radix-6 suffix. - Streaming Decoder: Zero-byte-agnostic parsing from raw bytecode buffers.
-
De Bruijn Completeness: All 10,584 pairs reached within
$\le 3$ transitions. - Avalanche Diffusion: 1-character perturbations propagate maximal entropy. (74,307 formal assertions)
-
Bézout Inverses:
-
Flat Torus
$\mathbb{Z}_M$ Core (make test-flat-core): 36/36 checks verifying latent age ($ u_3(0) = 3$), latent types ($0x5A$ ), Affine Move Checker ($W \equiv 0 \pmod{17}$ ), and SP-Round loop protection. -
Galois/Rijndael Python
$\leftrightarrow$ C Cross-Test (tests/test_py_gbsv_cross.py): 1,010/1,010 test vectors verifying bit-for-bit identity (0 bits drift). -
Classic Monolithic Test Suite (
tests/run.sh): 15/15 tests covering stack, arithmetic, branching, and dynamic lists. -
Structural Invariants Suite (
tests/test_cursed.sh): 8/8 tests verifying bit length filenames, whitespace parity, and checksums. -
Memory Safety & Purgatory Suite (
tests/test_hardcore.sh): 12/12 tests validating borrow-checker, stack gravity, and gas exhaustion. -
Golden Vectors Suite (
tests/test_golden_vectors.sh): 22/22 tests validating deterministic FNV-1a, CRAZY64, and cell aging. -
Monolithic Adversarial Suite (
tests/test_apocalypse.sh): 11/11 tests validating dual-context scheduling, adversary injection,OP_UNDOreversibility, and the orphan paradox.
Verification Summary:
Test Suites: 8 / 8 (100% PASS)
Total Assertions: 74,445 (100% PASS)
Compiler Warnings: 0 (-Wall -Wextra -pedantic)
Memory Sanitizers: ASan + UBSan (0 leaks, 0 undefined behavior)
# De Bruijn opcode synthesis
python3 tux_helper.py debruijn 8 0x5A
# Outputs: 3-character path and minimal trajectory resolving to OP_PUSH
# RNS operand encoding
python3 tux_helper.py rns-enc 42
# Outputs: 12-character RNS suffix "TTtuTutUTXut"
# RNS operand decoding
python3 tux_helper.py rns-dec TTtuTutUTXut
# Outputs: 42
# Compute GBSV signature for line
python3 tux_helper.py gbsv-sig "TuX tux TUX"
# Outputs: " :[k|Ω|X];u}"
# Verify GBSV signature
python3 tux_helper.py gbsv-verify "TuX tux TUX :[k|Ω|X];u}"
# Generate valid 88-byte companion container
python3 tux_helper.py companion examples/141248.tuxIn TuxPL 2.0.0, legacy execution modes (--CLASSIC, --STRICT, --UNIFIED-VM, --ADVERSARIAL) have been completely superseded. Adversarial execution across the flat torus under GBSV verification is the sole, monolithic default.
Usage: tuxpl [OPTIONS] <source_file.tux>
Runtime Options:
--no-shadow, --deterministic Execute in single-context mode without shadow adversary
(allows running code without companion .tu container)
--reversible, --REVERSIBLE Enable thermodynamic history ring buffer (enables OP_UNDO)
--disasm Disassemble torus memory prior to execution
--trace-state Emit step-by-step trace of quantum scheduler state
--help Display technical reference and command options
--version Display build version and kernel architectural summary
TuxPL 2.0.0 demonstrates that esoteric programming languages can serve as rigorous mathematical proving grounds for research in computer security, formal verification, and fault tolerance. By unifying Galois field theory, Chinese Remainder Theorem modular representations, topological routing over De Bruijn graphs, a flat cryptographic torus
