Aniket Raj

SDE · Systems & AI

India

2026-02-15

Lexum

A deterministic, declarative systems programming language for building reliable, long-lived distributed systems.

Situation

Modern distributed systems and control planes are inherently fragile. As infrastructure scales, teams rely heavily on imperative scripting (Python, Bash, Go) to orchestrate state changes. This approach inevitably introduces race conditions, non-deterministic side-effects, silent state corruption, and cascading failures. The industry standard accepts that systems will drift into unpredictable states, requiring complex, external "chaos engineering" to patch the symptoms rather than curing the disease at the architectural level.

Task

I set out to engineer a solution from first principles: a radically deterministic, statically typed programming language built exclusively for zero-trust, high-assurance control-plane operations. The language needed to mathematically guarantee state convergence, isolate failures natively, and eliminate non-deterministic side-effects at compile time—shifting the paradigm from "hope it works" to "provably correct."

Action

I designed and developed Lexum, building its complete compiler (lexum-compiler) and execution engine (lexum-runtime) from scratch in Rust to ensure memory safety and high performance.

  • Language Design: Modeled the language around Actor-model concepts heavily optimized for control planes. I introduced core primitives:
    • Domains: Fully isolated state machines.
    • Invariants: Mathematical assertions evaluated continuously; if violated, the domain halts gracefully.
    • Goals: Declarative target states the engine autonomously attempts to reconcile.
    • Capabilities: Zero-trust security boundaries natively restricting what a domain can modify or message.
  • Compiler & Toolchain: Wrote a custom lexer, parser, semantic analyzer, and intermediate representation (IR) generator. Implemented a unified CLI to compile, simulate, and verify deterministic systems without external dependencies.
  • Runtime Engineering: Built a highly robust, deterministic scheduler that tracks logical clocks and causality. To guarantee reliability, I engineered deep traps for divergent logical clocks, infinite message loops, and malformed state snapshots.
  • Rigorous Validation: Subjected the runtime to extreme adversarial stress tests, including:
    • Massive Neural Cascades: Successfully scheduled and converged over 100,000 interacting domains simultaneously.
    • Byzantine Containment: Isolated and contained recursive spam attacks and contradictory invariants.
    • Distributed Scenarios: Simulated and resolved split-brain network partitions, oscillation patterns, and transactional banking consensus.

Result

Lexum successfully demonstrated that complex control-plane logic can be strictly deterministic. The runtime gracefully contained adversarial attacks and massive domain loads while maintaining perfect state predictability. By enforcing "Math, not magic," Lexum eliminates entire classes of distributed system bugs providing engineers with a unified, zero-trust toolchain to build self-healing infrastructure.

Future Plans

  • Time-Travel Debugging & Visualizer: Develop a graphical trace viewer allowing developers to step backwards and forwards through deterministic state transitions and network message flows.
  • Formal Verification Engine: Integrate automated theorem provers to statically prove that a Lexum system's invariants cannot be violated under any topological configuration.
  • Native Consensus Protocols: Embed native Raft/Paxos abstractions at the language level so domains can achieve distributed quorum without requiring third-party libraries.
  • WASM Compilation: Allow Lexum control-planes to be compiled to WebAssembly for edge-deployment execution.

Project Resources

Lexumarrow Repoarrow Whitepaperarrow