Epoch Rebuild Stages 3 and 4 (Old-Buffer Drain and Trie Node Clearing) #
Internal correctness proofs for epochTickStage3 and epochTickStage4
[BFCKK24].
Main results #
Cslib.DataStructure.Dictionary.SuccinctWhp.epochTickStage3_spec: Stage 3 preservesCoreFastInvandOvermarsBucketInvand restoresValidEpochStage.Cslib.DataStructure.Dictionary.SuccinctWhp.epochTickStage4_spec: Stage 4 preservesCoreFastInvandOvermarsBucketInvand restoresValidEpochStage.
References #
theorem Cslib.DataStructure.Dictionary.SuccinctWhp.epochTickStage3_spec {c U V n_max : ℕ} {θ : SeedWhp c U n_max} {fs : FastState} {dict : State U} (hc : CoreFastInv c U V n_max θ fs dict) (hom : ∀ b < numBucketsWhp n_max, OvermarsBucketInv c U n_max θ fs b) (hs3 : fs.rebStage = 3) (hpre : ValidEpochStagePreTick c U n_max θ fs) :
have fs1 := epochTickStage3 c U n_max θ fs;
CoreFastInv c U V n_max θ fs1 dict ∧ (∀ b < numBucketsWhp n_max, OvermarsBucketInv c U n_max θ fs1 b) ∧ ValidEpochStage c U n_max θ fs1 ∧ fs1.epochClock = fs.epochClock
Stage-3 tick promotes 2 + oldEp items to locState = 1 and deletes them from buf oldEp.
theorem Cslib.DataStructure.Dictionary.SuccinctWhp.epochTickStage4_spec {c U V n_max : ℕ} {θ : SeedWhp c U n_max} {fs : FastState} {dict : State U} (hc : CoreFastInv c U V n_max θ fs dict) (hom : ∀ b < numBucketsWhp n_max, OvermarsBucketInv c U n_max θ fs b) (hs4 : fs.rebStage = 4) :
have fs1 := epochTickStage4 fs;
CoreFastInv c U V n_max θ fs1 dict ∧ (∀ b < numBucketsWhp n_max, OvermarsBucketInv c U n_max θ fs1 b) ∧ ValidEpochStage c U n_max θ fs1 ∧ fs1.epochClock = fs.epochClock
Stage-4 tick clears 8 trie nodes of buf oldEp per step until empty (rebStage = 5).