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.
• Software and its engineering → Language types; Software verification and validation.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了最后一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper6
- Derivative-Guided Symbolic ExecutionYongwei Yuan, Zhe Zhou, Julia Belyakova, Suresh JagannathanPOPL 2025 · 被引用 3 次
- Abstract Interpretation of Temporal Safety Effects of Higher Order ProgramsMihai Nicola, Chaitanya Agarwal, Eric Koskinen, Thomas WiesOOPSLA 2025 · 被引用 1 次
- Security Reasoning via Substructural Dependency TrackingHemant Gouni, Frank Pfenning, Jonathan AldrichPOPL 2026 · 被引用 1 次
- Trace-Guided Synthesis of Effectful Test GeneratorsZhe Zhou, Ankush Desai, Benjamin Delaware, Suresh JagannathanPLDI 2026 · 被引用 1 次
- On Higher-Order Model Checking of Effectful Answer-Type-Polymorphic ProgramsTaro Sekiyama, Ugo Dal Lago, Hiroshi UnnoOOPSLA 2025
它引用的顶会 Paper5
- Interaction trees: representing recursive and impure programs in CoqLi-yao Xia, Yannick Zakowski, Paul He, Chung-Kil Hur 等POPL 2020 · 被引用 133 次
- Data-driven inference of representation invariantsAnders Miltner, Saswat Padhi, Todd D. Millstein, David WalkerPLDI 2020 · 被引用 33 次
- Choice Trees: Representing Nondeterministic, Recursive, and Impure Programs in CoqNicolas Chappe, Paul He, Ludovic Henrio, Yannick Zakowski 等POPL 2023 · 被引用 21 次
- Temporal Verification with Answer-Effect Modification: Dependent Temporal Type-and-Effect System with Delimited ContinuationsTaro Sekiyama, Hiroshi UnnoPOPL 2023 · 被引用 15 次
- Data-driven abductive inference of library specificationsZhe Zhou, Robert Dickerson, Benjamin Delaware, Suresh JagannathanOOPSLA 2021 · 被引用 15 次
相关 Paper
- Zoo: A Framework for the Verification of Concurrent OCaml 5 Programs using Separation LogicClément Allain, Gabriel SchererPOPL 2026 · 被引用 2 次
- Abstraction Functions as Types: Modular Verification of Cost and Behavior in Dependent Type TheoryHarrison Grodin, Runming Li, Robert HarperPOPL 2026 · 被引用 2 次
- Refinement Type RefutationsRobin Webbers, Klaus von Gleissenthall, Ranjit JhalaOOPSLA 2024 · 被引用 3 次
- Type Inference LogicsDenis Carnier, François Pottier, Steven KeuchelOOPSLA 2024 · 被引用 3 次
- Practical Type Inference with LevelsAndong Fan, Han Xu, Ningning XiePLDI 2025 · 被引用 3 次
