Lune

PLDI2024顶会

A HAT Trick: Automatically Verifying Representation Invariants using Symbolic Finite Automata

Zhe Zhou, Qianchuan Ye, Benjamin Delaware, Suresh Jagannathan

摘要

Functional programs typically interact with stateful libraries that hide state behind typed abstractions. One particularly important class of applications are data structure implementations that rely on such libraries to provide a level of efficiency and scalability that may be otherwise difficult to achieve. However, because the specifications of the methods provided by these libraries are necessarily general and rarely specialized to the needs of any specific client, any required application-level invariants must often be expressed in terms of additional constraints on the (often) opaque state maintained by the library.

In this paper, we consider the specification and verification of such representation invariants using symbolic finite automata (SFA). We show that SFAs can be used to succinctly and precisely capture fine-grained temporal and data-dependent histories of interactions between functional clients and stateful libraries. To facilitate modular and compositional reasoning, we integrate SFAs into a refinement type system to qualify stateful computations resulting from such interactions. The particular instantiation we consider, Hoare Automata Types (HATs), allows us to both specify and automatically type-check the representation invariants of a datatype, even when its implementation depends on stateful library methods that operate over hidden state.

We also develop a new bidirectional type checking algorithm that implements an efficient subtyping inclusion check over HATs, enabling their translation into a form amenable for SMT-based automated verification. We present extensive experimental results on an implementation of this algorithm that demonstrates the feasibility of type-checking complex and sophisticated HAT-specified OCaml data structure implementations layered on top of stateful library APIs.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 6 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Abstract Interpretation of Temporal Safety Effects of Higher Order Programs 引用了 Temporal Verification with Answer-Effect Modification: Dependent Temporal Type-and-Effect System with Delimited Continuations
  • On Higher-Order Model Checking of Effectful Answer-Type-Polymorphic Programs 引用了 Derivative-Guided Symbolic Execution
  • On Higher-Order Model Checking of Effectful Answer-Type-Polymorphic Programs 引用了 Temporal Verification with Answer-Effect Modification: Dependent Temporal Type-and-Effect System with Delimited Continuations
  • Choice Trees: Representing Nondeterministic, Recursive, and Impure Programs in Coq 引用了 Interaction trees: representing recursive and impure programs in Coq
  • Trace-Guided Synthesis of Effectful Test Generators 引用了 Data-driven inference of representation invariants
  • Trace-Guided Synthesis of Effectful Test Generators 引用了 Temporal Verification with Answer-Effect Modification: Dependent Temporal Type-and-Effect System with Delimited Continuations
  • Derivative-Guided Symbolic Execution 引用了 Data-driven inference of representation invariants
  • Derivative-Guided Symbolic Execution 引用了 Temporal Verification with Answer-Effect Modification: Dependent Temporal Type-and-Effect System with Delimited Continuations
  • Data-driven abductive inference of library specifications 引用了 Data-driven inference of representation invariants
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper6

  1. Derivative-Guided Symbolic ExecutionYongwei Yuan, Zhe Zhou, Julia Belyakova, Suresh JagannathanPOPL 2025 · 3 次引用
  2. Abstract Interpretation of Temporal Safety Effects of Higher Order ProgramsMihai Nicola, Chaitanya Agarwal, Eric Koskinen, Thomas WiesOOPSLA 2025 · 1 次引用
  3. Security Reasoning via Substructural Dependency TrackingHemant Gouni, Frank Pfenning, Jonathan AldrichPOPL 2026 · 1 次引用
  4. Trace-Guided Synthesis of Effectful Test GeneratorsZhe Zhou, Ankush Desai, Benjamin Delaware, Suresh JagannathanPLDI 2026 · 1 次引用
  5. On Higher-Order Model Checking of Effectful Answer-Type-Polymorphic ProgramsTaro Sekiyama, Ugo Dal Lago, Hiroshi UnnoOOPSLA 2025

它引用的 Paper5

  1. Interaction trees: representing recursive and impure programs in CoqLi-yao Xia, Yannick Zakowski, Paul He, Chung-Kil Hur 等POPL 2020 · 133 次引用
  2. Data-driven inference of representation invariantsAnders Miltner, Saswat Padhi, Todd D. Millstein, David WalkerPLDI 2020 · 33 次引用
  3. Choice Trees: Representing Nondeterministic, Recursive, and Impure Programs in CoqNicolas Chappe, Paul He, Ludovic Henrio, Yannick Zakowski 等POPL 2023 · 21 次引用
  4. Temporal Verification with Answer-Effect Modification: Dependent Temporal Type-and-Effect System with Delimited ContinuationsTaro Sekiyama, Hiroshi UnnoPOPL 2023 · 15 次引用
  5. Data-driven abductive inference of library specificationsZhe Zhou, Robert Dickerson, Benjamin Delaware, Suresh JagannathanOOPSLA 2021 · 15 次引用

相关 Paper

  1. Zoo: A Framework for the Verification of Concurrent OCaml 5 Programs using Separation LogicClément Allain, Gabriel SchererPOPL 2026 · 2 次引用
  2. Logical Relations for Formally Verified Authenticated Data StructuresSimon Oddershede Gregersen, Chaitanya Agarwal, Joseph TassarottiCCS 2025
  3. Automated Amortised Analysis of Skew Heaps and Leftist HeapsArmin Walch, Georg Moser, Berry Schoenmakers, Florian ZulegerCAV 2026
  4. Abstraction Functions as Types: Modular Verification of Cost and Behavior in Dependent Type TheoryHarrison Grodin, Runming Li, Robert HarperPOPL 2026 · 2 次引用
  5. Refinement Type RefutationsRobin Webbers, Klaus von Gleissenthall, Ranjit JhalaOOPSLA 2024 · 3 次引用
黄昏的海面,两侧是细线勾勒的悬崖