Precise Reasoning About Container-Internal Pointers with Logical Pinning

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Guan, Yawen, Pit-Claudel, Clément
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912750617231360
author Guan, Yawen
Pit-Claudel, Clément
author_facet Guan, Yawen
Pit-Claudel, Clément
contents Most separation logics hide container-internal pointers for modularity. This makes it difficult to specify container APIs that temporarily expose those pointers to the outside, and to verify programs that use these APIs. We present logical pinning, a lightweight borrowing model for sequential programs that allows users to selectively track container-internal pointers at the logical level. Our model generalizes the magic-wand operator for representing partial data structures, making it easy to write and prove precise specifications, including pointer-stability properties. Because it only changes the way representation predicates and specifications are written, our approach is compatible with most separation logic variants. We demonstrate the practicality of logical pinning by verifying small but representative pointer-manipulating programs, and deriving more precise versions of common container specifications. In doing so, we show that our approach subsumes some well-known proof patterns, simplifies some complex proofs, and enables reasoning about program patterns not supported by traditional specifications. All of our results are mechanized in the Rocq proof assistant, using the CFML library.
format Preprint
id arxiv_https___arxiv_org_abs_2509_23229
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Precise Reasoning About Container-Internal Pointers with Logical Pinning
Guan, Yawen
Pit-Claudel, Clément
Programming Languages
D.2.4; F.3.1
Most separation logics hide container-internal pointers for modularity. This makes it difficult to specify container APIs that temporarily expose those pointers to the outside, and to verify programs that use these APIs. We present logical pinning, a lightweight borrowing model for sequential programs that allows users to selectively track container-internal pointers at the logical level. Our model generalizes the magic-wand operator for representing partial data structures, making it easy to write and prove precise specifications, including pointer-stability properties. Because it only changes the way representation predicates and specifications are written, our approach is compatible with most separation logic variants. We demonstrate the practicality of logical pinning by verifying small but representative pointer-manipulating programs, and deriving more precise versions of common container specifications. In doing so, we show that our approach subsumes some well-known proof patterns, simplifies some complex proofs, and enables reasoning about program patterns not supported by traditional specifications. All of our results are mechanized in the Rocq proof assistant, using the CFML library.
title Precise Reasoning About Container-Internal Pointers with Logical Pinning
topic Programming Languages
D.2.4; F.3.1
url https://arxiv.org/abs/2509.23229