Lune

PLDI2021Top-tier venue

RefinedC: automating the foundational verification of C code with refined ownership types

Michael Sammler, Rodolphe Lepigre, Robbert Krebbers, Kayvan Memarian, Derek Dreyer, Deepak Garg

Abstract

Given the central role that C continues to play in systems software, and the difficulty of wr iting sa fe an d co rrect C code, it remains a grand challenge to develop effective formal methods for verifying C programs. In this paper, we propose a new approach to this problem: a type system we call RefinedC, which combines ownership types (for modular reasoning about shared state and concurrency) with refinement types (for encoding precise invariants on C data types and Hoare-style specifications for C functions).

RefinedC is both automated (requiring minimal user intervention) and foundational (producing a proof of program correctness in Coq), while at the same time handling a range of low-level programming idioms such as pointer arithmetic. In particular, following the approach of RustBelt, the soundness of the RefinedC type system is justified semantically by interpretation into the Coq-based Iris framework for higherorder concurrent separation logic. However, the typing rules of RefinedC are also designed to be encodable in a new "separation logic programmingž language we call Lithium. By restricting to a carefully chosen (yet expressive) fragment of separation logic, Lithium supports predictable, automatic, goal-directed proof search without backtracking. We demonstrate the effectiveness o f RefinedC on a range of representative examples of C code.

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.

48 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

  • Transfinite Iris: resolving an existential dilemma of step-indexed separation logic cites RustBelt meets relaxed memory
  • Simple High-Level Code for Cryptographic Arithmetic - With Proofs, Without Compromises cites HACL: A Verified Modern Cryptographic Library
  • Diaframe: automated verification of fine-grained concurrent programs in Iris cites RustBelt meets relaxed memory
  • Diaframe: automated verification of fine-grained concurrent programs in Iris cites The future is ours: prophecy variables in separation logic
  • Simuliris: a separation logic framework for verifying concurrent program optimizations cites Transfinite Iris: resolving an existential dilemma of step-indexed separation logic
  • RefinedRust: A Type System for High-Assurance Verification of Rust Programs cites Flux: Liquid Types for Rust
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers48

  1. Simuliris: a separation logic framework for verifying concurrent program optimizationsLennard Gäher, Michael Sammler, Simon Spies, Ralf Jung et al.POPL 2022 · 33 citations
  2. Flux: Liquid Types for RustNico Lehmann, Adam T. Geller, Niki Vazou, Ranjit JhalaPLDI 2023 · 29 citations
  3. RefinedRust: A Type System for High-Assurance Verification of Rust ProgramsLennard Gäher, Michael Sammler, Ralf Jung, Robbert Krebbers et al.PLDI 2024 · 29 citations
  4. Islaris: verification of machine code against authoritative ISA semanticsMichael Sammler, Angus Hammond, Rodolphe Lepigre, Brian Campbell et al.PLDI 2022 · 28 citations
  5. Diaframe: automated verification of fine-grained concurrent programs in IrisIke Mulder, Robbert Krebbers, Herman GeuversPLDI 2022 · 27 citations

Builds on7

  1. HACL*: A Verified Modern Cryptographic LibraryJean Karim Zinzindohoué, Karthikeyan Bhargavan, Jonathan Protzenko, Benjamin BeurdoucheCCS 2017 · 258 citations
  2. Simple High-Level Code for Cryptographic Arithmetic - With Proofs, Without CompromisesAndres Erbsen, Jade Philipoom, Jason Gross, Robert Sloan et al.S&P 2019 · 147 citations
  3. RustBelt meets relaxed memoryHoang-Hai Dang, Jacques-Henri Jourdan, Jan-Oliver Kaiser, Derek DreyerPOPL 2020 · 68 citations
  4. The future is ours: prophecy variables in separation logicRalf Jung, Rodolphe Lepigre, Gaurav Parthasarathy, Marianna Rapoport et al.POPL 2020 · 62 citations
  5. Transfinite Iris: resolving an existential dilemma of step-indexed separation logicSimon Spies, Lennard Gäher, Daniel Gratzer, Joseph Tassarotti et al.PLDI 2021 · 32 citations

Related papers

  1. Compositional Non-Interference for Fine-Grained Concurrent ProgramsDan Frumin, Robbert Krebbers, Lars BirkedalS&P 2021 · 20 citations
  2. Conditional Contextual RefinementYoungju Song, Minki Cho, Dongjae Lee, Chung-Kil Hur et al.POPL 2023 · 29 citations
  3. An Iris Instance for Verifying CompCert C ProgramsWilliam Mansky, Ke DuPOPL 2024 · 14 citations
  4. Proof Automation for Linearizability in Separation LogicIke Mulder, Robbert KrebbersOOPSLA 2023 · 8 citations
  5. Nola: Later-Free Ghost State for Verifying Termination in IrisYusuke Matsushita, Takeshi TsukadaPLDI 2025 · 2 citations
Dusk over the sea between two cliffs drawn in fine vertical lines