NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Sharpen the Spec, Cut the Code: A Case for Generative File System with SYSSPEC

Qingyuan Liu, Mo Zou, Hengbin Zhang, Dong Du, Yubin Xia, Haibo Chen · DOI

Introduction: The Maintenance Nightmare of Modern File Systems

Building and maintaining file systems is a notorious engineering challenge. A longitudinal study of the Linux Ext4 file system reveals a stark reality: a staggering 82.4% of all commits are dedicated to bug fixes and maintenance, while new features account for a mere 5.1%. This "long tail" of stabilization stems from the inherent complexity of managing on-disk structures and intricate concurrency logic.

Longitudinal analysis of Ext4 commits showing the dominance of maintenance and bug fixes over new features.

As shown in the analysis of over 3,000 commits, the vast majority of effort is spent addressing semantic errors, memory issues, and concurrency bugs. Furthermore, while many changes are localized to a single file, the cumulative burden of these small but critical fixes is immense.

Breakdown of bug types and the distribution of files changed per commit in Ext4.

While Large Language Models (LLMs) have shown promise in code generation, they often falter when tasked with complex systems. Natural language prompts are frequently too ambiguous to capture the strict invariants required for operating system components, leading to "hallucinations" or failures in handling inter-module dependencies.

The SYSSPEC Framework: From Ambiguous Prompts to Formal Specs

SYSSPEC addresses these challenges by shifting the developer's focus from writing brittle C code to authoring high-level, structured design blueprints. The core philosophy is to "Sharpen the Spec" to guide the LLM effectively through three primary techniques:

  1. Structured Specifications: Developers use formal-method-inspired specs:
  2. Functionality: Defined via Hoare logic (pre-conditions, post-conditions, and invariants).
  3. Modularity: Enforced through a "Rely-Guarantee" discipline to ensure safe composition.
  4. Concurrency: Locking protocols are decoupled into standalone specifications, making thread-safety requirements explicit.
  5. The SYSSPEC Toolchain: A multi-agent system comprising:
  6. SpecCompiler: Employs "two-phase generation"—first synthesizing sequential logic, then instrumenting it with concurrency controls.
  7. SpecValidator: A "retry-with-feedback" loop where an LLM agent identifies flaws and drives corrections.
  8. SpecAssistant: A human-in-the-loop tool for refining specifications.
  9. DAG-Structured Evolution: Feature additions are authored as "spec patches" represented as a Directed Acyclic Graph (DAG), allowing for automatic propagation and selective regeneration of affected modules.

Key Insights: Bridging the Specification Gap

The failure of LLMs in systems programming is often not a lack of "coding skill" but a lack of "intent precision." By providing machine-understandable blueprints, SYSSPEC redefines the LLM's role from "architect" to "highly efficient implementer."

A critical realization in this work is the separation of concerns. LLMs struggle when handling logic and concurrency simultaneously. By forcing the model to generate a correct sequential version first and then "layering" locking logic on top, the synthesis task becomes significantly more tractable. Furthermore, SYSSPEC treats evolution as a first-class citizen, recognizing that the true value of a generative system lies in its ability to evolve safely over time.

Evaluation and Results

The researchers evaluated SYSSPEC using benchmarks like AtomFS (a formally verified baseline) and the standard xfstests suite. Testing against state-of-the-art models yielded impressive results:

  • 100% Accuracy: SYSSPEC achieved perfect accuracy in generating functional modules for SPECFS, their prototype file system.
  • Productivity Gains: Head-to-head tests showed productivity improvements of 3.0x for implementing "extents" and 5.4x for the complex "rename" operation.
  • Performance Optimization: A simple spec patch for "delayed allocation" resulted in a 99.9% reduction in data writes for specific workloads.
  • Complexity: SPECFS comprises ~4,300 lines of C code across 45 modules, comparable in scale to established kernel file systems like squashfs.

Current Constraints and Future Directions

While promising, SYSSPEC currently operates as a FUSE (Filesystem in Userspace) system, lacking the direct hardware access of kernel-mode implementations. Additionally, the current prototype does not explicitly model crash consistency, a vital requirement for production environments.

Future work aims to develop "SPECFS-Ext4," a generative version of a production-grade kernel file system. The team also explores using LLMs to "bootstrap" specifications from existing documentation to reduce the upfront design effort required from developers.

Summary updated

BibTeX
@inproceedings{liu2026sharpen,
  author = {Qingyuan Liu and Mo Zou and Hengbin Zhang and Dong Du and Yubin Xia and Haibo Chen},
  title = {{Sharpen the Spec, Cut the Code: A Case for Generative File System with SYSSPEC}},
  booktitle = {FAST},
  year = {2026},
}
Figure