The Logos Programming Language
A compiled, statically-typed systems language with ownership, traits, generics, and pattern matching — and Writ, a code-and-data substrate built into the grammar itself.
package graph_reach;
use logos.std.wql.wql; // the deem query engine
use logos.mem.collections.vec;
struct Edge { pub src: i64, pub dst: i64 }
// A recursive Datalog query as a language item, prepared at
// compile time: transitive reachability over a graph of edges.
pub deem reach(edges: &[Edge], start: i64) {
rel path(a: i64, b: i64) {
from edges e select (e.src, e.dst);
from path p join edges e on p.b == e.src select (p.a, e.dst);
}
from path p where p.a == start select p.b order by p.b
}
fn main() -> i32 {
let edges: [Edge; 4] = [
Edge { src: 1i64, dst: 2i64 },
Edge { src: 2i64, dst: 3i64 },
Edge { src: 2i64, dst: 4i64 },
Edge { src: 2i64, dst: 3i64 }, // duplicate — set semantics dedup it
];
// Everything reachable from node 1, transitively:
let hits: Vec<i64> = reach(&edges[..], 1i64).unwrap(); // → [2, 3, 4]
return hits.len() as i32; // 3
}
AI-first ergonomics
A strong, expressive type system that models generate and verify reliably — and a toolchain that gives an agent a dense, honest reward signal.
Code + data unified — Writ
A schema-aware, tagged object graph over zones, built into the grammar itself — the substrate that unifies values and data.
Query & reasoning — Deem
A full incremental Datalog engine, first-class in the language — query and reason over Writ graphs and ordinary Logos objects alike.
Transformation — Trama
A typed, compile-checked transformation engine — today a Jinja2-style templating layer sharing Deem's schema'd IR.
Dataflow — Hest
The operator graph raised to a first-class language construct — Logos's dataflow aspect. Design stage, no stable syntax yet.
Compile-time metaprogramming — Metacall
Ordinary Logos functions the compiler runs at compile time, splicing their results into your program. No separate macro language.
Ownership, tracking Rust
Affine types, &/&mut references, lifetimes, traits, and generics with monomorphization. Semantics track Rust 1.93, minus a blessed list of divergences.
Native AOT pipeline
The logosc compiler lowers parse → sema → borrow-check → monomorphization → MLIR → LLVM to native code. No VM in the run path.