Skip to content

Djinnlang: a high-level programming language that implements unambiguous specifications with an LLM compilerDjinnlang: Higher-Level Programming by Unambiguous Specification with an LLM in the Compiler

arXiv: Dangerous Capabilities & Safety Evals· arXiv:2609.23954· Simon Henniger, Stephen Chong, Nada Amin·Indexed by this site · 2026-10-01· Originally publishedAlignment

Translation in progress — untranslated text is omitted.

Quick read

Other

Based on the paper PDF (AI-generated); refer to the original

AI summaryDjinnlang is a high-level specification language in which one writes only specifications, not executable code, with the LLM filling in implementations and proofs inside the compiler. It requires the LLM to prove not only that the implementation satisfies the specification, but also that any other implementation satisfying the specification produces the same outputs on the same inputs, i.e., the constraint relation is deterministic, leaving no room in the program's semantics. Its symbolic translator lowers specifications to Dafny stubs and proof obligations, scheduled by a driver framework for the LLM to complete, all checked by the Dafny verifier; the language is bootstrapped, and the LLM can implement the Djinnlang translator from specifications, with the reimplementation able to self-verify.

Questions
The authors argue that programmers write only formal specifications, with the LLM implementing and proving conformance to the specification; the key is that the specification must be unambiguous, otherwise the semantics of the generated code are still determined by the model.
Methods
Djinnlang contains only specifications. The translator lowers specifications to Dafny stubs and obligations (unambiguity, existence, implementation correctness); an off-the-shelf coding agent fills in bodies, and Dafny verifies; procedures handle side effects via algebraic-effect step functions.
Experiments and results
Examples like sorting and integer/string conversion show specification style. On Sudoku, LZ77, and Imp VM, both Claude Fable 5.1 and GPT 6 Astra prove all obligations; Codex is faster and cheaper but often slower after optimization. The compiler itself is bootstrapped from specifications and re-verified.
Limitations and future work
The authors note that performance, timing side channels, and denial of service are still determined by the implementation, and if the verifier errs there is no human oversight at all; they plan to add performance bounds and event-trace specifications. The experiments cover the three programs above, two implementers, and the bootstrapped compiler.
Read originalarxiv.org