GenLang-V/GenDB-V
About
Towards AI-Generated and Formally Verified Database Systems
Data & AnalyticsMeasured star growth
- in 24h
- Collecting history
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Original
GenDB-V
AI-generated, formally verified database engines
Website · Paper · Guide · Results
Databases are rebuilt again and again for new workloads and new hardware.
→ GenDB-V synthesizes a fast engine for your workload and hardware.
Mature systems still return wrong answers, after years of engineering and testing.
→ GenDB-V formally verifies your engine for correctness and program safety.
Fast
GenDB-V synthesizes three kinds of verified code. Each fits another use:
| Result | The agents synthesize | Made for |
|---|---|---|
| Robust query code | Query code over plain column arrays | Data that changes: the code stays fast on other databases and parameter values |
| Joint storage and query optimization | The storage and the query code | One database state (read-only analytics): the fastest code on the given database |
| General-purpose engine | One engine for every supported query | Any supported query over any schema, without a package per query; its speed is tuned on the given databases |
Every result is correct on every valid database. The table is about speed. Next step: robust code synthesis for joint optimization and for the general-purpose engine.
Robust query code over plain arrays. On TPC-H SF100, the robust verified code is 5.69× faster than DuckDB and 2.22× faster than Umbra (geometric mean). It remains the fastest system in total time on 86 attack databases built by the agents and on 29 held-out databases built independently. On these, the code before robust code synthesis (GenDB-V initial) is very slow in 79% and 24% of the runs.
| Total time (s) | Given database | Attack databases | Held-out databases |
|---|---|---|---|
| DuckDB | 1,310 | 799 | 4,018 |
| Umbra | 567 | 930 | 3,443 |
| GenDB-V initial | 165 | 31,250 | 13,827 |
| GenDB-V robust | 182 | 213 | 141 |
Every run, very slow run and worst case: results/tpch-robust/.
Joint storage and query optimization. The agents also design the storage, for the given database:
| Speedup of GenDB-V | vs DuckDB | vs Umbra |
|---|---|---|
| TPC-H, 22 queries | 51.6× | 22.0× |
| SEC-EDGAR, 6 queries | 61.3× | 28.3× |
Every query, time and verified crate: results/tpch-sf100/, results/sec-edgar-sf3/.
General-purpose engine. One verified engine serves both benchmarks and is 1.09–5.02× faster than DuckDB and Umbra in total workload time: results/general-engine/.
Correct
Verus proves correctness, memory safety, arithmetic safety, no data races and termination. Each answer is correct for every valid database and every parameter value. Tests check some inputs; a proof covers all of them.
Our experiments expose wrong answers in a human-built engine and in a testing-based LLM synthesis method:
- Umbra 26.08 (the
latesttag of its Docker image at the time of writing) returns a wrong query result, which later versions correct. For Q2 with the skewed bindings of JCC-H, direct execution in Umbra returns an empty result, while its prepared-statement execution, DuckDB and GenDB-V return the same non-empty result. A small example in a Colab notebook reproduces the bug. - Bespoke OLAP, a testing-based LLM synthesis method, returns wrong answers for 16 of 28 templates: 10 TPC-H templates and all 6 SEC-EDGAR templates. Its generated code makes assumptions that valid data can break; for example, valid line prices overflow its 32-bit arithmetic.
GenDB-V's proofs cover every input within the declared domain, and its implementations agree with DuckDB on all tested databases.
How it works
- SQLSpec fixes the claim. GenDB-V translates the SQL into SQLSpec, a formal meaning of SQL modeled on PostgreSQL. The agent cannot change the claim.
- An AI agent writes Rust code and its proofs. It chooses the data layout, the algorithms and the proofs. It tries designs first and proves only the fastest one.
- Robust code synthesis. Agents construct valid databases and parameter bindings that expose weaknesses of the code, and revise the code and the proofs to remove them.
- Verus checks the whole crate. It checks the code and the proofs against SQLSpec. GenDB-V runs only code that Verus accepts.
GenDB-V has two modes:
- Engine synthesis. One verified engine answers every supported query over a schema. Our engine is open source:
results/general-engine/. - Template synthesis. One verified package answers one hot query template, for every parameter value.
Getting started
Tested on Linux. You need Rust, Python 3.12, the pinned Verus and Z3, and Claude Code (only to synthesize). Then run a first query, end to end:
gendb run benchmarks/readings-count # the data, the verified storage, then the agent writes and proves the query (paid)
gendb serve benchmarks/readings-count # the answer at $1 = 4: [[3]]
The guide shows every step: install, this first run, your own workload (a folder with a schema, one SQL file per query, and the data), and how to run our published packages for free with gendb import.
Repository
| Path | Content |
|---|---|
src/gendb/ |
The GenDB-V system, one Cargo workspace |
results/ |
TPC-H and SEC-EDGAR: every query, time and verified crate; the robust TPC-H code on attack and held-out databases; the general engine; one small query end to end |
benchmarks/ |
The workloads: TPC-H, SEC-EDGAR, a first example and the engine's check workload, each a folder gendb run reads; and the databases of the TPC-H robustness benchmark |
docs/ |
The website: design, SQLSpec, an example and the performance results |
Paper
GenDB-V: AI-Generated and Formally Verified Database Systems
@misc{lao2026stophandcraftingenginegendbv,
title={GenDB-V: AI-Generated and Formally Verified Database Systems},
author={Jiale Lao and Immanuel Trummer},
year={2026},
eprint={2611.02779},
archivePrefix={arXiv},
primaryClass={cs.DB},
url={https://arxiv.org/abs/2611.02779},
}
Contact and license
Contact: [email protected]. GenDB-V uses the PolyForm Noncommercial License 1.0.0. You may use it for research and education. For commercial use, contact us.
Explore related projects
Loading…