StackMap
Subscribe

bend vs Specula

Bend 2: a Python-like language with dependent types that compiles to fast CPU/GPU code; LAWS.bend declares invariants the compiler forces AI-written code to prove before it builds. — versus — Agentic formal verification: coding agents write TLA+ specs and invariants of your distributed system, model-check them, and reproduce violations at code level. arXiv paper + public bug list.

The curated verdict

Both use formal methods to stop agent mistakes before they ship: specula has agents write and model-check TLA+ specs of your existing system, Bend makes proof obligations part of the language the agent writes in.

bendSpecula
Stars23k498
Forks70855
LanguageTypeScriptPython
LicenseApache-2.0Apache-2.0
Last activitytoday4 days ago
Topicscodingcoding
Curated connections14

bend — the curator's take

The most radical answer on the map to 'how do I trust code I did not read': write rules like 'balances sum to zero' in LAWS.bend, and the compiler rejects any agent edit it cannot prove keeps them, so the agent retries until it can. It is also built for speed, with implicit parallelism across CPU and GPU cores. The catch is total: it only protects code written in Bend, a young language (its README says so) that your agent learns via `bend guide`, best suited to back-end logic on Linux or macOS. Your existing TypeScript or Python gets nothing. For guarantees about a system you already run, specula's TLA+ model checking fits; for everyday agent code, tests and type checkers remain the pragmatic floor.

Specula — the curator's take

The division of labor is right: the LLM writes the spec (the part humans never do), the model checker delivers ground truth (the part LLMs can't fake) — and the public spreadsheet of real bugs found in open-source systems is receipts most agentic tools don't have. When NOT: this is heavy machinery — Java+TLC, 32GB+ RAM, frontier agents (Opus/GPT-5.5 class) recommended; single-threaded CRUD code will never pay back the spec cost.