Secure edge language for reversibility and accountability in hostile environments.
Oblíbený (Czech for "favorite" or "beloved") is a dual-form programming language that guarantees termination through Turing-incompleteness while maintaining full reversibility and complete accountability. Built for deployment in hostile environments where formal guarantees are essential.
Integration Complete — All core components implemented, tested, and formally verified (2026-02-07)
| Component | Status | Description |
|---|---|---|
Compiler & Runtime |
✅ 100% |
OCaml compiler with lexer, parser, type checker, evaluator, constrained form validator |
Static Analyzer |
✅ 100% |
Resource bounds tracking, reversibility checking, trace coverage analysis |
LSP Server |
✅ 100% |
Language Server Protocol with diagnostics, hover, completion (789 LOC) |
Debugger |
✅ 100% |
Reversible debugger with forward/backward stepping, checkpoint inspection |
Profiler |
✅ 100% |
Performance profiling with resource bounds, efficiency analysis, bottleneck detection |
VSCode Extension |
✅ 100% |
Syntax highlighting, reversible op highlighting, invalid keyword detection |
Documentation |
✅ 100% |
Language specification, tutorial, security model, API reference |
Crypto FFI |
✅ 100% |
Post-quantum crypto (liboqs + libsodium) via Zig FFI with Idris2 ABI proofs |
Deployment |
✅ 100% |
Svalinn/Vordr verified container stack with formal verification |
Oblibený separates compile-time and runtime concerns:
// Factory Form (Turing-complete, compile-time)
(define (generate-loop n)
(emit `(for i in 0..,(const n) {
trace("iteration", i);
})))
// Constrained Form (Turing-incomplete, runtime)
fn main() -> () {
checkpoint("start");
for i in 0..10 { // Static bound required
trace("iteration", i);
}
checkpoint("end");
}Theorem: All valid constrained form programs terminate.
Enforcement:
- ❌ NO while or loop keywords (rejected by parser)
- ❌ NO recursive function calls (enforced by call graph checker)
- ✅ ONLY bounded iteration: for i in 0..N where N is static
- ✅ Acyclic call graph guaranteed
Every operation has a well-defined inverse:
incr(x, 5); // Inverse: decr(x, 5)
swap(a, b); // Self-inverse
x ^= val; // Self-inverse (XOR)Reversible debugger can step backward through execution!
# Fedora/RHEL
sudo dnf install opam ocaml-dune ocaml-menhir
# Build dependencies
opam install dune menhir sedlex yojson ppx_deriving ppx_deriving_yojson alcotest
# Crypto libraries (for FFI)
sudo dnf install libsodium-develgit clone https://github.com/hyperpolymath/oblibeny.git
cd oblibeny
dune build
dune installCreate hello.obl:
fn main() -> () {
checkpoint("start");
trace("message", "Hello, Oblíbený!");
checkpoint("end");
}Run:
oblibeny hello.oblfn main() -> () {
let mut a: i64 = 0;
let mut b: i64 = 1;
checkpoint("start_fibonacci");
// Bounded iteration with static N
for i in 0..10 {
trace("fib", a);
let tmp: i64 = a + b;
a = b;
b = tmp;
}
checkpoint("end_fibonacci");
assert_invariant(a == 55, "10th Fibonacci should be 55");
}oblibeny --analyze fibonacci.oblOutput:
=== Oblíbený Static Analysis Report === ## Constrained Form Validation ✓ VALID - Program conforms to Turing-incomplete constrained form ## Resource Bounds (Static Guarantees) Max loop iterations: 10 Max call depth: 0 Estimated memory: 24 bytes ## Reversibility Analysis ✓ All reversible operations are properly balanced ## Accountability Trace Coverage Coverage: 40.0%
oblibeny input.obl # Compile and execute
oblibeny --check input.obl # Validate constrained form only
oblibeny --analyze input.obl # Static analysis with resource bounds
oblibeny --dump-ast input.obl # Show parsed AST
oblibeny --dump-trace input.obl # Show accountability trace
oblibeny -v input.obl # Verbose outputoblibeny --debug program.oblCommands:
s, step - Step forward b, back - Step BACKWARD (reversible!) p, print - Show current state t, trace - Show accountability trace c, continue - Run to next checkpoint h, help - Show help q, quit - Exit debugger
Oblibeny integrates with:
-
Idris2: ABI proofs for FFI safety (
src/abi/*.idr) -
Zig: Memory-safe FFI implementation (
ffi/zig/) -
Vörðr: Runtime verification with formal proofs
Verified properties: - ✓ Termination guaranteed - ✓ Resource bounds computable statically - ✓ Call graph is acyclic - ✓ No unbounded loops - ✓ Reversible operations correct
# Build with formal verification
svalinn-compose build
# Deploy LSP server (2 replicas)
svalinn-compose up
# Scale analyzer/debugger on-demand
svalinn-compose up --scale analyzer=1See svalinn-compose.yaml for full configuration.
-
Language Specification - Complete grammar and semantics
-
Tutorial - Step-by-step guide with examples
-
Examples - 10+ example programs
-
Core Specification - Formal specification in Scheme
┌─────────────────────────────────────────────────────────┐
│ Oblíbený Architecture │
├─────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────┐ ┌──────────────┐ │
│ │ Factory Form │────────▶│ Constrained │ │
│ │ (Turing- │ emits │ Form │ │
│ │ complete) │ │ (Turing- │ │
│ │ │ │ incomplete) │ │
│ └──────────────┘ └──────┬───────┘ │
│ Compile-time │ Runtime │
│ Metaprogramming │ Execution │
│ ▼ │
│ ┌─────────────────┐ │
│ │ Accountability │ │
│ │ Trace │ │
│ │ (Immutable) │ │
│ └─────────────────┘ │
│ │
├─────────────────────────────────────────────────────────┤
│ Tooling Layer │
├─────────────────────────────────────────────────────────┤
│ Compiler │ Static Analyzer │ Debugger │ Profiler │
│ LSP │ VSCode Ext │ CLI │ Crypto FFI │
└─────────────────────────────────────────────────────────┘Oblibeny’s constrained form is intentionally Turing-incomplete:
-
Syntactic restrictions prevent unbounded computation
-
Call graph analysis ensures acyclicity
-
Static bounds checking verifies all loops terminate
-
Formal verification proves termination mathematically
This makes Oblibeny ideal for: - Hardware Security Modules (HSMs) - Secure enclaves (SGX, TrustZone) - Smart cards - Critical embedded systems - High-assurance cryptographic code
| Metric | Value |
|---|---|
Lines of Code |
5,200+ |
Files |
65 |
Languages |
OCaml (54 files), Zig (3 files), Idris2 (1 file) |
Completion |
100% |
Test Coverage |
Core components tested |
Documentation |
Complete (spec + tutorial + examples) |
Container Size |
~50MB (minimal runtime) |
See CONTRIBUTING.md for development guidelines.
Code of Conduct: CODE_OF_CONDUCT.md
SPDX-License-Identifier: PMPL-1.0-or-later
Oblíbený is free software under the Palimpsest License (PMPL-1.0-or-later).
See LICENSE for full terms.
-
Svalinn - Edge gateway for verified containers
-
Vörðr - Formally verified container runtime
-
Selur - Zero-copy WASM bridge
-
Verified Container Spec - Formal specification
-
NextGen Languages - Language portfolio
-
Discussions: https://github.com/hyperpolymath/oblibeny/discussions
-
Author: Jonathan D.A. Jewell <jonathan.jewell@open.ac.uk>
Guardian of correctness. Keeper of accountability. Beloved for its guarantees. 🔐✨