SepLogic.lean
Declarations on this page (32)
- def InRegion
- instance instDecidableInRegion
- notation " ⊨ "
- infix L281
- prefix L282
- notation "⌜"
- infixr L284
- infixr L285
- notation "∃∗ "
- notation "∃∗ "
- infix L400
- infix L401
- infix L402
- infix L403
- infix L404
- infix L405
- infix L406
- infix L440
- infix L441
- infix L442
- infix L443
- infix L444
- infix L445
- infix L446
- infix L448
- infix L449
- postfix L482
- postfix L483
- postfix L484
- postfix L485
- postfix L486
- postfix L487
Byte-Granular Separation Logic Primitives
Defines byte-granular partial heaps (Heap, GhostName), nominal separation-logic propositions and connectives (SepProp, m ⊨ P, P ∗ Q, P -∗ Q, ∃∗ x, P x, P ⊢ Q, |==> P, ⌜φ⌝), multi-width points-to assertions (↦₈, ↦₁₆, ↦₃₂, ↦₆₄, ↦₁₂₈, ↦ₛ, ↦₆₄*, ↦₈ₙ, ↦ₙ, and their read-only and lazy-free counterparts), byte regions (InRegion, DisjointRegions, regionBlock, memRegion, regionBlockProtNone, memRegionProtNone), downward stack frames (stackFrame, stackFrame16, stackFrame32, stackFrameAt), and abstract allocator interfaces (Allocator, AllocatorOom).
SepProp is a nominal structure whose projection (SepProp.) and core connective/points-to definitions live inside a plain public section (without @[expose]), keeping connective bodies module-opaque to client proofs unless Arm64/ is imported explicitly. The partial commutative monoid laws for Heap and BI laws for SepProp are verified in Arm64/.
namespace Arm64@[expose] public sectionMemory Regions
def InRegion
a lies in the len-byte region [base, base + len) (wrapping modulo 2^64).
def InRegion (base : BitVec 64) (len : Nat) (a : BitVec 64) : Prop :=
(a - base).toNat < leninstance instDecidableInRegion
instance instDecidableInRegion (base : BitVec 64) (len : Nat) (a : BitVec 64) :
Decidable (InRegion base len a) :=
inferInstanceAs (Decidable ((a - base).toNat < len))22 declarations not shown (lines 49–220): theorems, which Lean checks, or definitions that no headline statement uses
Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64.
end -- @[expose] public section10 declarations not shown (lines 226–274): theorems, which Lean checks, or definitions that no headline statement uses
Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64.
notation " ⊨ "
notation:50 m:50 " ⊨ " P:51 => SepProp.Satisfies P minfix
infix:50 " ⊢ " => SepProp.Entailsprefix
prefix:58 "|==> " => SepProp.bupdnotation "⌜"
notation "⌜" φ "⌝" => SepProp.pure φinfixr
infixr:60 " ∗ " => SepProp.sepConjinfixr
infixr:55 " -∗ " => SepProp.sepImpnotation "∃∗ "
notation:65 "∃∗ " x ", " P => SepProp.sepExists (fun x => P)notation "∃∗ "
notation:65 "∃∗ " x " : " α ", " P => SepProp.sepExists (fun (x : α) => P)19 declarations not shown (lines 289–398): theorems, which Lean checks, or definitions that no headline statement uses
Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64.
infix
infix:70 " ↦₈ " => pointsTo8infix
infix:70 " ↦ₛ " => pointsToBytesinfix
infix:70 " ↦₁₆ " => pointsTo16infix
infix:70 " ↦₃₂ " => pointsTo32infix
infix:70 " ↦₆₄ " => pointsTo64infix
infix:70 " ↦₁₂₈ " => pointsTo128infix
infix:70 " ↦₆₄* " => pointsToWords645 declarations not shown (lines 408–438): theorems, which Lean checks, or definitions that no headline statement uses
Arm64., Arm64., Arm64., Arm64., Arm64.
infix
infix:70 " ↦₈ᵣ " => pointsTo8ROinfix
infix:70 " ↦ᵣ " => pointsToBytesROinfix
infix:70 " ↦₁₆ᵣ " => pointsTo16ROinfix
infix:70 " ↦₃₂ᵣ " => pointsTo32ROinfix
infix:70 " ↦₆₄ᵣ " => pointsTo64ROinfix
infix:70 " ↦₁₂₈ᵣ " => pointsTo128ROinfix
infix:70 " ↦₆₄ᵣ* " => pointsToWords64ROinfix
infix:70 " ↦₈ₙ " => pointsTo8ProtNoneinfix
infix:70 " ↦ₙ " => pointsToBytesProtNone5 declarations not shown (lines 451–480): theorems, which Lean checks, or definitions that no headline statement uses
Arm64., Arm64., Arm64., Arm64., Arm64.
postfix
postfix:70 " ↦₈ₗ" => pointsTo8Lazypostfix
postfix:70 " ↦₁₆ₗ" => pointsTo16Lazypostfix
postfix:70 " ↦₃₂ₗ" => pointsTo32Lazypostfix
postfix:70 " ↦₆₄ₗ" => pointsTo64Lazypostfix
postfix:70 " ↦₁₂₈ₗ" => pointsTo128Lazypostfix
postfix:70 " ↦ₗ" => pointsTo8Lazy12 declarations not shown (lines 489–577): theorems, which Lean checks, or definitions that no headline statement uses
Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64., Arm64.
end Arm64