Lune

POPL2023Top-tier venue

Dargent: A Silver Bullet for Verified Data Layout Refinement

Zilin Chen, Ambroise Lafont, Liam O'Connor, Gabriele Keller, Craig McLaughlin, Vincent Jackson, Christine Rizkallah

Abstract

Systems programmers need fine-grained control over the memory layout of data structures, both to produce performant code and to comply with well-defined interfaces imposed by existing code, standardised protocols or hardware. Code that manipulates these low-level representations in memory is hard to get right. Traditionally, this problem is addressed by the implementation of tedious marshalling code to convert between compilerselected data representations and the desired compact data formats. Such marshalling code is error-prone and can lead to a significant runtime overhead due to excessive copying. While there are many languages and systems that address the correctness issue, by automating the generation and, in some cases, the verification of the marshalling code, the performance overhead introduced by the marshalling code remains. In particular for systems code, this overhead can be prohibitive. In this work, we address both the correctness and the performance problems.

We present a data layout description language and data refinement framework, called Dargent, which allows programmers to declaratively specify how algebraic data types are laid out in memory. Our solution is applied to the Cogent language, but the general ideas behind our solution are applicable to other settings. The Dargent framework generates C code that manipulates data directly with the desired memory layout, while retaining the formal proof that this generated C code is correct with respect to the Cogent functional semantics. This added expressivity removes the need for implementing and verifying marshalling code, which eliminates copying, smoothens interoperability with surrounding systems, and increases the trustworthiness of the overall system.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

2 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers2

  1. Unboxed Data Constructors: Or, How cpp Decides a Halting ProblemNicolas Chataing, Stephen Dolan, Gabriel Scherer, Jeremy YallopPOPL 2024 · 3 citations
  2. Decoupling Data Layouts from Bounding Volume HierarchiesChristophe Gyurgyik, Alexander J. Root, Fredrik KjolstadPLDI 2026

Builds on1

  1. EverParse: Verified Secure Zero-Copy Parsers for Authenticated Message FormatsTahina Ramananandro, Antoine Delignat-Lavaud, Cédric Fournet, Nikhil Swamy et al.USENIX Security 2019 · 70 citations

Related papers

  1. Deductive optimization of relational data storageJohn K. Feser, Sam Madden, Nan Tang, Armando Solar-LezamaOOPSLA 2020 · 5 citations
  2. VIP: verifying real-world C idioms with integer-pointer castsRodolphe Lepigre, Michael Sammler, Kayvan Memarian, Robbert Krebbers et al.POPL 2022 · 11 citations
  3. Optimizing Tensor Programs on Flexible StorageMaximilian Schleich, Amir Shaikhha, Dan SuciuSIGMOD 2023 · 21 citations
  4. Verified tensor-program optimization via high-level scheduling rewritesAmanda Liu, Gilbert Louis Bernstein, Adam Chlipala, Jonathan Ragan-KelleyPOPL 2022 · 25 citations
  5. A Dependent Nominal Physical Type System for Static Analysis of Memory in Low Level CodeJulien Simonnet, Matthieu Lemerre, Mihaela SighireanuOOPSLA 2024 · 4 citations
Dusk over the sea between two cliffs drawn in fine vertical lines