AI-Native Systems Programming Language - Designed to reduce AI hallucinations and enable AI self-iteration
AetherLang is an AI-Native Programming Language built from the ground up to:
- Reduce AI Hallucinations - Explicit interfaces, constrained syntax, semantic annotations
- Enable AI Self-Iteration - AI-readable IR, structured feedback, sandboxed optimization
- Maintain Rigor & Safety - Contract programming, effect system, ownership semantics
π Self-hosting complete! AetherLang compiler is written in AetherLang.
| Component | Status | Functions | Notes |
|---|---|---|---|
| Lexer | β 100% | 23 | Tokenization with 80+ token types |
| Parser | β 100% | 76 | Full AST generation |
| Semantic Analyzer | β 100% | 68 | Type checking, ownership analysis |
| IR Generator | β 100% | 52 | Three-address code generation |
| Codegen | β 100% | 40 | Native object file output |
| Total | β | 259 | All modules compile to native code |
AetherLang enforces "Radical Explicitness" to reduce AI hallucinations:
// β Forbidden - type inference
let x = 10;
// β
Required - explicit types
let x: i32 = 10;
let name: *u8 = "hello\0" as *u8;
// β Compile error - calling effect[io] without declaring it
fn bad_caller() {
puts("hello\0" as *u8);
}
// β
Correct - effect declared
fn good_caller() effect[io] {
puts("hello\0" as *u8);
}
| Effect | Description |
|---|---|
io |
Input/Output |
alloc |
Memory allocation |
read |
Read global state |
write |
Write global state |
panic |
May panic |
// β Does not exist - unwrap() is not defined
let value: i32 = maybe_value.unwrap();
// β
Use match or unwrap_or
let value: i32 = maybe_value.unwrap_or(0);
use alloc::{Allocator, GlobalAllocator, ArenaAllocator}
// Vec requires allocator parameter
let v: Vec<i32, GlobalAllocator> = Vec::new_in(GlobalAllocator::new());
// Use Arena for batch deallocation
let arena: ArenaAllocator = ArenaAllocator::new(1024);
let v: Vec<i32, ArenaAllocator> = Vec::new_in(arena);
AetherLang introduces a novel Dual-Layer Architecture to balance high-level productivity with system-level control.
The high-level logic layer. Used for rapid development, scripting, and business logic.
# hello.ath - Python-like syntax
def main():
print("Hello from Script!")
return 0- Indentation-based syntax for readability
- Mutable-by-default to align with algorithmic pseudocode
- Transpiles directly to Layer 0 (Aether Core)
The low-level system layer. Used for kernel, drivers, and performance-critical paths.
// hello.aeth - Rust-like syntax
extern "C" { fn puts(s: *u8) -> i32; }
fn main() -> i32 {
puts("Hello, AetherLang!\0" as *u8);
return 0;
}
- Explicit Ownership & Lifetimes
- Effect System (
pure,effect[io]) tracking side-effects - Contract Programming (
requires/ensures) for formal verification
src/
βββ frontend/ # Lexer, Parser, Semantic Analysis, Module System
βββ script/ # Aether Script Transpiler (Layer 1 β Layer 0)
βββ middle/ # IR Generation and Optimization
βββ backend/ # C / LLVM Code Generation
β βββ c/ # C backend (portable)
β βββ llvm/ # LLVM backend (optimized)
βββ ai_ir/ # AI-Readable IR Layer
βββ types/ # Type System & Resolution
# Build the compiler
cargo build --release --features llvm
# Compile and run a program
cargo run --features llvm -- build examples/hello.aeth
./hello
# Or use C backend (no LLVM required)
cargo build --release --no-default-features
./target/release/aethc --emit-c examples/hello.aeth
cc -o hello examples/hello.c && ./hello
# Run all tests
cargo test| Phase | Status | Description |
|---|---|---|
| P0: Self-Hosting | β | 5/5 modules, 259 functions compiled |
| P1: Core Language | β | Floats, generics, closures, traits, lifetimes, modules |
| P2: Platforms | β | Linux, macOS, Windows CI passing |
| P3: SIMD/Matrix | β | Vector types f32x4, BLAS FFI, Matrix4x4 |
| P4: Kernel Dev | β | Inline ASM, naked functions, atomic, MMIO |
| P5: AI-Native | β | Mandatory types, effect system, no unwrap, explicit allocators |
| P6: Engineering | β | CI/CD, .ath transpiler, jxz config, C backend fixes |
AetherLang includes JXZ - a cross-platform package manager written in AetherLang:
# Project management
jxz init # Create new project with Jxz.toml
jxz build # Build project (reads config from Jxz.toml)
jxz run # Build and run
jxz test # Run tests
jxz clean # Remove build artifacts
# Dependency management
jxz add <pkg> # Add dependency to Jxz.toml
jxz remove <pkg> # Remove dependency
jxz install # Install from Jxz.lock161 functions written entirely in AetherLang (self-hosting!)
- Language Guide - Complete language reference with P5 rules
- Grammar Spec - Formal EBNF grammar
- AI-IR Design - AI-Native Interface
- Dual-Layer Architecture - .ath/.aeth layers
- Aether Script Spec - Layer 1 syntax
- Context Pattern - Explicit context passing
- Quick Start Guide - Getting started
AetherLang is designed to be AI-friendly:
- Constrained Syntax - Fewer ways to express the same thing
- Explicit Semantics - Ownership, effects, contracts all visible
- Structured Errors - Machine-readable output with fix suggestions
- AI-IR Layer - Semantic graph + intent annotations for AI understanding
- No Hidden Magic - Every operation is explicit and traceable
Contributions welcome! See CONTRIBUTING.md for guidelines.
Apache License 2.0 - see LICENSE