Interaction trees and compositional linearizability
appendix sectionrules
Interaction trees and compositional linearizability
Guarded interaction trees
For 𝐸:U𝑖→U𝑖 and 𝑅:U𝑖, the complete constructor rules used in chapter 86 are
Γ⊢𝑟:𝑅
Γ⊢𝖱𝖾𝗍(𝑟):𝖨𝖳𝗋𝖾𝖾(𝐸,𝑅)
ITree-Ret
Γ⊢𝑡:𝖨𝖳𝗋𝖾𝖾(𝐸,𝑅)
Γ⊢𝖳𝖺𝗎(𝑡):𝖨𝖳𝗋𝖾𝖾(𝐸,𝑅)
ITree-Tau
Γ⊢𝑒:𝐸(𝑋)Γ⊢𝑘:𝑋→𝖨𝖳𝗋𝖾𝖾(𝐸,𝑅)
Γ⊢𝖵𝗂𝗌(𝑒,𝑘):𝖨𝖳𝗋𝖾𝖾(𝐸,𝑅)
ITree-Vis
Recursive calls must occur below 𝖳𝖺𝗎 or inside a continuation of 𝖵𝗂𝗌. Bind and interpretation are governed by the six equations (Bind-Ret)–(Bind-Vis) and (Interp-Ret)–(Interp-Vis).
For a candidate subtree relation 𝑆, the complete one-layer weak rules are
𝑎=𝑏
𝖤𝗎𝗍𝗍𝖥(𝑆,𝖱𝖾𝗍(𝑎),𝖱𝖾𝗍(𝑏))
Eutt-Ret
𝑒:𝐸(𝑋)isidenticalonbothsides∀𝑥:𝑋.𝑆(𝑘(𝑥),ℎ(𝑥))
𝖤𝗎𝗍𝗍𝖥(𝑆,𝖵𝗂𝗌(𝑒,𝑘),𝖵𝗂𝗌(𝑒,ℎ))
Eutt-Vis
𝑆(𝑡,𝑢)
𝖤𝗎𝗍𝗍𝖥(𝑆,𝖳𝖺𝗎(𝑡),𝖳𝖺𝗎(𝑢))
Eutt-Tau
𝖤𝗎𝗍𝗍𝖥(𝑆,𝑡,𝑢)
𝖤𝗎𝗍𝗍𝖥(𝑆,𝖳𝖺𝗎(𝑡),𝑢)
Eutt-TauL
𝖤𝗎𝗍𝗍𝖥(𝑆,𝑡,𝑢)
𝖤𝗎𝗍𝗍𝖥(𝑆,𝑡,𝖳𝖺𝗎(𝑢))
Eutt-TauR
𝖾𝗎𝗍𝗍 is the greatest fixed point of this monotone operator. The two asymmetric rules remain inside the inductive layer and therefore remove only finitely many unmatched silent steps.
The LTS and module rules
The artifact-local type 𝖯𝗋𝗈𝗀𝐸(𝐴) is the greatest fixed point of F(𝑋):=𝐴+𝑋+∑𝐵𝐸(𝐵)×(𝐵→𝑋), with observations 𝖱𝖾𝗍𝗎𝗋𝗇, 𝖳𝖺𝗎, and 𝖵𝗂𝗌. Its productive substitution is the mutually corecursive pair 𝗌𝗎𝖻𝗌𝗍 and 𝖻𝗂𝗇𝖽𝖲𝗎𝖻𝗌𝗍 whose six observation equations are displayed in definition 87.3; in particular, 𝗌𝗎𝖻𝗌𝗍𝑀(𝖵𝗂𝗌(𝑚,𝑘))≡𝖳𝖺𝗎(𝖻𝗂𝗇𝖽𝖲𝗎𝖻𝗌𝗍𝑀(𝑘,𝑀(𝑚))). The sequential-consistency judgment for finite thread traces is generated by
For 𝑀:𝖨𝗆𝗉𝗅(𝐸,𝐹) and 𝑉:𝖲𝗉𝖾𝖼𝑇(𝐸), the four visible thread-local linking rules are
𝑞(𝑖)=𝖨𝖽𝗅𝖾
𝑞𝑖:𝖼𝖺𝗅𝗅(𝑚)𝑞[𝑖↦𝖢𝗈𝗇𝗍(𝑚,𝑀(𝑚))]
CL-Overlay-call
𝑞(𝑖)=𝖢𝗈𝗇𝗍(𝑚,𝖱𝖾𝗍𝗎𝗋𝗇(𝑣))
𝑞𝑖:𝗋𝖾𝗍(𝑚,𝑣)𝑞[𝑖↦𝖨𝖽𝗅𝖾]
CL-Overlay-ret
𝑞(𝑖)=𝖢𝗈𝗇𝗍(𝑚,𝖵𝗂𝗌(𝑢,𝑘))𝑠𝖲𝗍𝖾𝗉𝑉(𝑖:𝖼𝖺𝗅𝗅(𝑢))𝑠′
(𝑞,𝑠)⟶𝖢𝖫(𝑞[𝑖↦𝖴𝖢𝖺𝗅𝗅(𝑚,𝑢,𝑘)],𝑠′)
CL-Underlay-call
𝑞(𝑖)=𝖴𝖢𝖺𝗅𝗅(𝑚,𝑢,𝑘)𝑠𝖲𝗍𝖾𝗉𝑉(𝑖:𝗋𝖾𝗍(𝑢,𝑣))𝑠′
(𝑞,𝑠)⟶𝖢𝖫(𝑞[𝑖↦𝖢𝗈𝗇𝗍(𝑚,𝑘(𝑣))],𝑠′)
CL-Underlay-ret
The silent case changes 𝖢𝗈𝗇𝗍(𝑚,𝖳𝖺𝗎(𝑝)) to 𝖢𝗈𝗇𝗍(𝑚,𝑝) and leaves the underlay state fixed. Interleaving chooses one thread name and applies one thread-local rule; there is no scheduler state.
Possibility commits and LHL program rules
For possibilities 𝜌,𝜎 over 𝑉𝐹, the two target commits are
Every lifted commit and return step separately requires an inhabited successor predicate and predecessor/successor reachability coverage.
For 𝖲𝖺𝗆𝖾𝖤𝗑𝖼𝖾𝗉𝗍𝑖(𝑓,𝑔):=∀𝑗≠𝑖.𝑔(𝑗)=𝑓(𝑗) and possibility predicates 𝑋,𝑌, put 𝖠𝖽𝗏𝖺𝗇𝖼𝖾(𝑋,𝑌):=(∃𝜎.𝑌𝜎)∧∀𝜎.𝑌𝜎⟹∃𝜌.𝑋𝜌∧𝖯𝗈𝗌𝗌𝖲𝗍𝖾𝗉𝗌(𝜌,𝜎). For interaction states 𝑠=(𝑞,𝑥) and 𝑡=(𝑞′,𝑥′), the exact commit obligation is 𝖢𝗈𝗆𝗆𝗂𝗍𝑖(G,P,𝑒,Q)⟺∀𝑠,𝑋,𝑡.P(𝑠,𝑋)∧𝖲𝖺𝗆𝖾𝖤𝗑𝖼𝖾𝗉𝗍𝑖(𝑞,𝑞′)∧𝖴𝗇𝖽𝖾𝗋𝖲𝗍𝖾𝗉(𝑞(𝑖),𝖲𝗈𝗆𝖾(𝑒),𝑞′(𝑖))∧𝑥𝖲𝗍𝖾𝗉𝑉𝐸(𝑖:𝑒)𝑥′⟹∃𝑌.𝖠𝖽𝗏𝖺𝗇𝖼𝖾(𝑋,𝑌)∧Q(𝑠,𝑋,𝑡,𝑌)∧G(𝑠,𝑋,𝑡,𝑌). The silent obligation replaces 𝖲𝗈𝗆𝖾(𝑒) by 𝖭𝗈𝗇𝖾 and requires both the underlay state and possibility predicate to remain fixed. Use the reset and consumption operations from definition 88.6, and put 𝑍𝑌:=𝖢𝗈𝗇𝗌𝗎𝗆𝖾𝖲𝖾𝗍𝑖,𝑚,𝑣(𝑌). The exact return obligation is ∀𝑠=(𝑞,𝑥),𝑋.P(𝑠,𝑋)∧𝑞(𝑖)=𝖢𝗈𝗇𝗍(𝑚,𝖱𝖾𝗍𝗎𝗋𝗇(𝑣))⟹∃𝑌.𝖠𝖽𝗏𝖺𝗇𝖼𝖾(𝑋,𝑌)∧∀𝜎.𝑌𝜎⟹𝜎𝑅(𝑖)=𝖱𝖾𝗍𝖯𝗈𝗌𝗌(𝑚,𝑣)∧𝜎𝐶(𝑖)=𝖢𝖺𝗅𝗅𝖣𝗈𝗇𝖾(𝑚)∧Q(𝑠,𝑋,𝖱𝖾𝗌𝖾𝗍𝑖(𝑠),𝑍𝑌)∧G(𝑠,𝑋,𝖱𝖾𝗌𝖾𝗍𝑖(𝑠),𝑍𝑌).
The program judgment is the greatest relation closed by exactly these three outer-form rules: