Location-Based Frame Rule #
This file provides a location-based frame rule for pRHL, the CatCrypt analogue
of separation logic's frame rule and Bluebell's P * Q (separating conjunction
= independence). The key idea: assertions on disjoint heap regions plus
computations with bounded footprints enable compositional reasoning.
Main definitions #
DependsOn P L— assertion P only examines locations in LPreservesOutside c L— computation c only modifies locations in Lr_frame_local— the frame rule: disjoint footprints preserve the frame
Design notes #
RPre = Heap → Heap → Prop is deterministic (no probabilistic separation needed).
The right analogue of Bluebell's probabilistic separation is location-based
separation: assertions on disjoint heap regions + computations with bounded
footprints.
References #
- Bluebell (POPL 2025) —
P * Qseparating conjunction for independence - O'Hearn, Reynolds, Yang — Separation logic
Assertion locality #
DependsOn P L means P only examines locations in L: heap pairs
agreeing on L cannot be distinguished by P.
Equations
- CatCrypt.Relational.DependsOn P L = ∀ (h₁ h₁' h₂ h₂' : CatCrypt.Core.Heap), h₁.agreeOn h₁' L → h₂.agreeOn h₂' L → P h₁ h₂ → P h₁' h₂'
Instances For
DependsOn instances #
Computation footprint #
PreservesOutside c L means c does not modify locations outside L:
for every output in c's support, non-L locations are unchanged.
Equations
- CatCrypt.Relational.PreservesOutside c L = ∀ (h : CatCrypt.Core.Heap) (a : α) (h' : CatCrypt.Core.Heap), (c h) (some (a, h')) ≠ 0 → ∀ id ∉ L, Finmap.lookup id h'.data = Finmap.lookup id h.data
Instances For
PreservesOutside instances #
The frame rule #
Location-based frame rule: if computations only modify locations in L_c,
and the frame assertion only depends on locations in L_f, and these
sets are disjoint, then the frame is preserved.
This is the CatCrypt analogue of separation logic's frame rule.