A balanced ternary programming language, dual-target compiler, and the photonic-ternary microkernel operating system. Compiled and executed.
This patent covers the complete software stack for photonic-ternary hardware: the ManiT programming language, its dual-target compiler, and the THATTEOS microkernel operating system. Together, they provide the means to write, compile, and run software on balanced ternary processors.
ManiT is a systems programming language designed from first principles for balanced ternary. Its type system, arithmetic, and control flow all operate natively in base-3. The compiler is implemented in Rust (~11,600 lines of code) and targets both LLVM IR (for execution on binary host systems) and T3ISA (for native execution on the ternary processor defined in Thatte3).
THATTEOS is a microkernel operating system written entirely in ManiT. It includes
a boot loader, scheduler, interrupt handler, process manager, three privilege domains,
virtual memory management, inter-process communication, a syscall interface, and a
TTY driver. The kernel has been compiled to .t3b binaries and executed
on the T3ISA emulator.
trit, tryte, tword)The ManiT compiler follows a traditional pipeline: lexer, parser, AST construction, semantic analysis (type checking, scope resolution), IR lowering to balanced ternary SSA form, and finally code generation to one of two backends. The LLVM backend allows ManiT programs to run on conventional hardware for development and testing; the T3ISA backend generates native ternary machine code.
THATTEOS is structured as a microkernel: minimal kernel code runs in the highest privilege domain, with drivers and services in lower domains communicating via message-passing IPC. The scheduler, interrupt table, and syscall dispatcher are all implemented in ManiT and compiled to T3ISA instructions.
The compiler passes 16 test suites covering lexing, parsing, type checking, IR lowering,
and code generation. THATTEOS has been compiled to .t3b binaries and
executed on the T3ISA emulator, with execution traces confirming correct boot sequence,
scheduler operation, interrupt handling, and process management.
The ManiT language, compiler, and THATTEOS are available for licensing. Software is intended for eventual open release.
Licensing Information