Mechanised Hypersafety Proofs about Structured Data
Vladimir Gladshtein, Qiyuan Zhao, Willow Ahrens, Saman P. Amarasinghe, Ilya Sergey
Abstract
Arrays are a fundamental abstraction to represent collections of data. It is often possible to exploit structural properties of the data stored in an array ( e.g ., repetition or sparsity) to develop a specialised representation optimised for space efficiency. Formally reasoning about correctness of manipulations with such structured data is challenging, as they are often composed of multiple loops with non-trivial invariants. In this work, we observe that specifications for structured data manipulations can be phrased as hypersafety properties, i.e ., predicates that relate traces of k programs. To turn this observation into an effective verification methodology, we developed the Logic for Graceful Tensor Manipulation (LGTM), a new Hoare-style relational separation logic for specifying and verifying computations over structured data. The key enabling idea of LGTM is that of parametrised hypersafety specifications that allow the number k of the program components to depend on the program variables . We implemented LGTM as a foundational embedding into Coq, mechanising its rules, meta-theory, and the proof of soundness. Furthermore, we developed a library of domain-specific tactics that automate computer-aided hypersafety reasoning, resulting in pleasantly short proof scripts that enjoy a high degree of reuse. We argue for the effectiveness of relational reasoning about structured data in LGTM by specifying and mechanically proving correctness of 13 case studies including computations on compressed arrays and efficient operations over multiple kinds of sparse tensors.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext eba0ebc9-677b-402f-ba33-607623aed2c5Cited by top-tier papers5
- Hypra: A Deductive Program Verifier for Hyper Hoare LogicThibault Dardinier, Anqi Li, Peter MüllerOOPSLA 2024 · 6 citations
- Foundational Multi-Modal Program VerifiersVladimir Gladshtein, George Pîrlea, Qiyuan Zhao, Vitaly Kurin et al.POPL 2026 · 4 citations
- KestRel: Relational Verification using E-Graphs for Program AlignmentRobert Dickerson, Prasita Mukherjee, Benjamin DelawareOOPSLA 2025 · 3 citations
- Verifying Asynchronous Hyperproperties in Reactive SystemsRaven Beutner, Bernd FinkbeinerOOPSLA 2025 · 2 citations
- Hyper Separation LogicTrayan Gospodinov, Peter Müller, Thibault DardinierPLDI 2026 · 1 citation
Builds on7
- SparseTIR: Composable Abstractions for Sparse Compilation in Deep LearningZihao Ye, Ruihang Lai, Junru Shao, Tianqi Chen et al.ASPLOS 2023 · 86 citations
- Hyper Hoare Logic: (Dis-)Proving Program HyperpropertiesThibault Dardinier, Peter MüllerPLDI 2024 · 28 citations
- Automatic generation of efficient sparse tensor format conversion routinesStephen Chou, Fredrik Kjolstad, Saman P. AmarasinghePLDI 2020 · 26 citations
- Verified tensor-program optimization via high-level scheduling rewritesAmanda Liu, Gilbert Louis Bernstein, Adam Chlipala, Jonathan Ragan-KelleyPOPL 2022 · 25 citations
- Proving hypersafety compositionallyEmanuele D'Osualdo, Azadeh Farzan, Derek DreyerOOPSLA 2022 · 16 citations
Related papers
- Infinitary Relational LogicVladimir Gladshtein, Qiyuan Zhao, Yuxi Ling, Sean Wang et al.OOPSLA 2026
- A Mechanized Algebra of Verified Data Structures for Optimizing Sparse Tensor ProgramsAmanda Liu, Gilbert Louis Bernstein, Shoaib Kamil, Adam Chlipala et al.PLDI 2026
- Structural Temporal Logic for Mechanized Program VerificationEleftherios Ioannidis, Yannick Zakowski, Steve Zdancewic, Sebastian AngelOOPSLA 2025 · 1 citation
- A concurrent program logic with a future and historyRoland Meyer, Thomas Wies, Sebastian WolffOOPSLA 2022 · 9 citations
- Generically Automating Separation Logic by Functors, Homomorphisms, and ModulesQiyuan Xu, David Sanán, Zhe Hou, Xiaokun Luan et al.POPL 2025
