The finite protocol of chapter 19 has states 𝑞::=𝖮(𝐴)∣𝖣∣𝖲𝐵(𝐴)∣𝖷¯𝛼(𝐴), where 𝐵 is a nonempty finite set and ¯𝛼 a nonempty lifetime stack. The complete state-changing rules are
𝑘∉dom(Ω)
L;Ω,ℎ:𝖮(𝐴)⊢𝗆𝗈𝗏𝖾ℎ𝖺𝗌𝑘⇒L;Ω,ℎ:𝖣,𝑘:𝖮(𝐴)
Move
L;Ω,ℎ:𝖮(𝐴)⊢𝖽𝗋𝗈𝗉ℎ⇒L;Ω,ℎ:𝖣
Drop
𝛼∉L
L;Ω,ℎ:𝖮(𝐴)⊢𝖻𝖾𝗀𝗂𝗇𝖲𝛼ℎ⇒L𝛼;Ω,ℎ:𝖲{𝛼}(𝐴)
Share-begin
𝛼∉L
L;Ω,ℎ:𝖲𝐵(𝐴)⊢𝖻𝖾𝗀𝗂𝗇𝖲𝛼ℎ⇒L𝛼;Ω,ℎ:𝖲𝐵∪{𝛼}(𝐴)
Share-nest
𝐵∖{𝛼}≠∅
L𝛼;Ω,ℎ:𝖲𝐵(𝐴)⊢𝖾𝗇𝖽𝖲𝛼ℎ⇒L;Ω,ℎ:𝖲𝐵∖{𝛼}(𝐴)
Share-end
𝐵={𝛼}
L𝛼;Ω,ℎ:𝖲𝐵(𝐴)⊢𝖾𝗇𝖽𝖲𝛼ℎ⇒L;Ω,ℎ:𝖮(𝐴)
Share-return
𝛼∉L
L;Ω,ℎ:𝖮(𝐴)⊢𝖻𝖾𝗀𝗂𝗇𝖷𝛼ℎ⇒L𝛼;Ω,ℎ:𝖷𝛼(𝐴)
Ex-begin
𝛽∉L
L;Ω,ℎ:𝖷¯𝛼(𝐴)⊢𝗋𝖾𝖻𝗈𝗋𝗋𝗈𝗐𝖷𝛽ℎ⇒L𝛽;Ω,ℎ:𝖷¯𝛼𝛽(𝐴)
Ex-reborrow
¯𝛼≠𝜖
L𝛽;Ω,ℎ:𝖷¯𝛼𝛽(𝐴)⊢𝖾𝗇𝖽𝖷𝛽ℎ⇒L;Ω,ℎ:𝖷¯𝛼(𝐴)
Ex-pop
L𝛼;Ω,ℎ:𝖷𝛼(𝐴)⊢𝖾𝗇𝖽𝖷𝛼ℎ⇒L;Ω,ℎ:𝖮(𝐴)
Ex-return
Access and sequencing are
𝑞∈{𝖮(𝐴),𝖲𝐵(𝐴),𝖷¯𝛼(𝐴)}
L;Ω,ℎ:𝑞⊢𝗋𝖾𝖺𝖽ℎ⇒L;Ω,ℎ:𝑞
Read
𝑞∈{𝖮(𝐴),𝖷¯𝛼(𝐴)}𝑣:𝐴
L;Ω,ℎ:𝑞⊢𝗐𝗋𝗂𝗍𝖾ℎ𝑣⇒L;Ω,ℎ:𝑞
Write
L;Ω⊢𝑐1⇒L1;Ω1L1;Ω1⊢𝑐2⇒L2;Ω2
L;Ω⊢𝑐1;𝑐2⇒L2;Ω2
Seq
The runtime realization performs the same mode update. Move transfers the payload to the fresh destination, drop removes it, read leaves it unchanged, and write replaces it by the displayed closed value. Agreement is L;𝑅⊧𝗈𝗐𝗇Ω; it requires equal domains and modes, well-typed live payloads, and every lifetime in a shared set or exclusive stack to occur in L with the stack-induced order.
The affine target representation for the local simulation is R(L;Ω)=𝖫𝗂𝖿𝖾(L)⊗𝖢𝖺𝗉ℎ1(Ω(ℎ1))⊗⋯⊗𝖢𝖺𝗉ℎ𝑚(Ω(ℎ𝑚)), where ℎ1,…,ℎ𝑚 is the ordered domain of Ω. Each primitive protocol derivation contributes an affine constant from the representation of its premise to the representation of its conclusion; sequencing is affine composition. The primitive contracts on the canonical input in one target step.
The selected Affe rules are 𝑋𝐶⊢Γ,𝑥:𝜎=(Γ1,[𝑥:𝜎]𝑛𝑏)⋉(Γ2,𝑥:𝜎)Susp,
[𝑥:𝜏𝑥]𝑛𝑏∈Γ𝐶⊢𝑥Γ⇝𝗋𝖾𝗀Γ′𝐶∣Γ′⊢𝑒:𝜏𝐶⊢kind(𝜏)≤𝖫𝑛−1
𝐶∣Γ⊢{|𝑒|}𝑛𝑥,𝑏:𝜏
Region
&𝑏𝑥:&𝑘𝜎∈Γ𝐶𝑥,𝜏𝑥=inst(Γ,𝜎)𝐶⊢𝐶𝑥∧drop(Γ∖𝑥)
𝐶∣Γ⊢&𝑏𝑥:&𝑘𝜏𝑥
Borrow
The paper-facing Pure Borrow interface includes 𝗋𝗎𝗇𝖡𝖮:𝖫𝗂𝗇𝖾𝖺𝗋𝗅𝗒⇒(∀𝛼.𝖡𝖮𝛼(𝖤𝗇𝖽𝛼→𝑎))⊸𝑎,𝖻𝗈𝗋𝗋𝗈𝗐:𝖫𝗂𝗇𝖾𝖺𝗋𝗅𝗒⇒𝑎⊸(𝖬𝗎𝗍𝛼𝑎⊗𝖫𝖾𝗇𝖽𝛼𝑎),𝗌𝗁𝖺𝗋𝖾:𝖬𝗎𝗍𝛼𝑎⊸𝖴𝗋(𝖲𝗁𝖺𝗋𝖾𝛼𝑎),𝗋𝖾𝖼𝗅𝖺𝗂𝗆:𝖫𝖾𝗇𝖽𝛼𝑎⊸𝖤𝗇𝖽𝛼→𝑎. Pure Borrow keeps its two executions distinct. A mutative configuration is (𝐻;𝜇;𝑥) and steps by ⟼𝗆; a denotational configuration is (𝐺;𝑥) and steps by ⟼𝖽. Allocation, update, lifetime end, and reclamation respectively mutate global memory in the first semantics and construct a pure reference, update a borrow history, move the history to a dead token, and replay that history in the second. The association judgment is 𝑀⋈𝐴𝐷. These signatures do not identify either execution with the finite protocol above.