Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Ubel Stratum

The right memory model for every function.

Ubel Stratum is a statically-typed systems and game-development language. Its defining feature is a tier system: every function declares which memory strategy it uses, and the compiler enforces the rules statically.

TierAnnotationMemoryAsyncUse case
HIGH@tier(high) (default)Garbage collectedYesBusiness logic, I/O
MID@tier(mid)Arena allocatedNoParsers, hot paths
LOW@tier(low)Manual, borrow-checkedNoSystems, FFI, packets

Functions without a @tier annotation default to HIGH. Tiers are opted into for performance, not opted out of for convenience.

Why a tier system

Most languages make one memory bet for an entire program:

LanguageBetCost
Go, Java, C#GC everywherePauses, GC pressure, heap bloat
RustOwnership everywhereSteep learning curve, slow compiles
C, C++Manual everywhereSafety bugs, undefined behavior

Ubel Stratum lets each function make its own bet: garbage collection where that is the easier choice, arenas where speed matters, manual ownership where correctness under tight constraints matters most. The compiler guarantees the bets never clash at runtime, and cross-tier calls follow an explicit set of rules covered in The Tier Model.

Current status

Ubel Stratum is early and under active development. The end goal is native machine code through an LLVM backend; today the language runs on a tree-walking interpreter, a deliberate stepping stone rather than the final architecture. Building the interpreter first proves out the language’s semantics completely before the much heavier lift of LLVM integration begins.

PhaseStatusCovers
1DoneCore design, memory model, lexer, arena AST, parser
2DoneSemantic analysis: name resolution, type inference, tier enforcement
3DoneTree-walking interpreter, the current execution model
4Not startedLLVM backend, native binaries
5Not startedStandard library, tooling, package manager

Source files use the .ubl extension. There is no installable compiler or package manager yet; running Ubel Stratum today means building the interpreter from source, covered in Getting Started.

The source, issue tracker, and full engineering documentation live at github.com/MidManStudio/ubel_stratum. A browser playground runs the tokenizer, parser, semantic analyzer, and interpreter on arbitrary .ubl source without installing anything, and the CI results page tracks the fixture suite and benchmark history that back every change to the language.