The fixed resource metric is 𝐾𝗉𝖺𝗂𝗋=𝐾𝖼𝗈𝗇𝗌=1,𝐾𝖼𝑖=0otherwise. Evaluation is terminating big-step 𝑉,𝐻⊢𝑞𝑞′𝑒⇓𝑣,𝐻′ and typing is Σ;Γ⊢𝑝𝑝′𝑒:𝐴. Degree-𝑑 list potential uses 𝜑(𝑛,⃗𝑝)=𝑑∑𝑖=1𝑝𝑖(𝑛𝑖),𝖢(𝑝1,…,𝑝𝑑)=(𝑝1+𝑝2,…,𝑝𝑑−1+𝑝𝑑,𝑝𝑑). The identity 𝜑(𝑛+1,⃗𝑝)=𝑝1+𝜑(𝑛,𝖢⃗𝑝) drives both list construction and matching. The evaluation rules used by the soundness proof are
List construction and the structural typing rules are
⃗𝑝=(𝑝1,…,𝑝𝑑)
Σ;𝑥ℎ:𝐴,𝑥𝑡:𝐿𝖢(⃗𝑝)(𝐴)⊢𝑝1+𝐾𝖼𝗈𝗇𝗌0𝖼𝗈𝗇𝗌(𝑥ℎ,𝑥𝑡):𝐿⃗𝑝(𝐴)
T-Cons
Σ;Γ1⊢𝑞−𝐾𝗅𝖾𝗍1𝑝𝑒1:𝐴Σ;Γ2,𝑥:𝐴⊢𝑝−𝐾𝗅𝖾𝗍2𝑞′+𝐾𝗅𝖾𝗍3𝑒2:𝐵
Σ;Γ1,Γ2⊢𝑞𝑞′𝗅𝖾𝗍𝑥=𝑒1𝗂𝗇𝑒2:𝐵
T-Let
Σ;Γ,𝑥:𝐴1,𝑦:𝐴2⊢𝑞𝑞′𝑒:𝐵𝗌𝗁𝖺𝗋𝖾(𝐴;𝐴1,𝐴2)
Σ;Γ,𝑧:𝐴⊢𝑞𝑞′𝑒[𝑧/𝑥,𝑧/𝑦]:𝐵
T-Share
Σ;Γ⊢𝑞𝑞′𝑒:𝐵𝑥∉dom(Γ)
Σ;Γ,𝑥:𝐴⊢𝑞𝑞′𝑒:𝐵
T-Weak
Function application, empty lists, subtyping, and relaxation are
Σ(𝑓)=(𝐴1,…,𝐴𝑘)𝑞/𝑞′←←←←←←←→𝐴
Σ;𝑥1:𝐴1,…,𝑥𝑘:𝐴𝑘⊢𝑞+𝐾𝖺𝗉𝗉1𝑞′−𝐾𝖺𝗉𝗉2𝑓(𝑥1,…,𝑥𝑘):𝐴
T-FunApp
𝐴𝗍𝗒𝗉𝖾
Σ;∅⊢𝐾𝗇𝗂𝗅0[]:𝐿⃗0(𝐴)
T-Nil
Σ;Γ,𝑥:𝐴⊢𝑞𝑞′𝑒:𝐵𝐴0<:𝐴
Σ;Γ,𝑥:𝐴0⊢𝑞𝑞′𝑒:𝐵
T-Supertype
Σ;Γ⊢𝑞𝑞′𝑒:𝐵𝐵<:𝐵0
Σ;Γ⊢𝑞𝑞′𝑒:𝐵0
T-Subtype
Σ;Γ⊢𝑝𝑝′𝑒:𝐵𝑞≥𝑝𝑞−𝑝≥𝑞′−𝑝′
Σ;Γ⊢𝑞𝑞′𝑒:𝐵
T-Relax
Sharing splits coefficients additively; affine weakening adds an unused assumption; same-shape subtyping may only discard potential. Soundness assumes a well-formed stack and heap, an existing terminating evaluation, a typing derivation, and nonnegative slack. It returns the same value and heap with residual resource at least the output potential plus the promised residual annotation and slack.
The selected provider judgment is Γ;Δ⊢𝑃::𝑧:𝐴, with unrestricted Γ, linear Δ, and pairwise-disjoint interface names. The type constructors 𝟏,𝐴⊗𝐵,𝐴⊸𝐵,𝐴⊕𝐵,𝐴&𝐵,!𝐴 follow the intuitionistic-linear right/left rules. The unit, tensor, implication, and cut rules are
Γ;⋅⊢𝟎::𝑧:𝟏
1R
Γ;Δ⊢𝑃::𝑧:𝐶
Γ;Δ,𝑥:𝟏⊢𝑃::𝑧:𝐶
1L
Γ;Δ1⊢𝑃::𝑦:𝐴Γ;Δ2⊢𝑄::𝑥:𝐵
Γ;Δ1,Δ2⊢(𝜈𝑦)𝑥⟨𝑦⟩.(𝑃∣𝑄)::𝑥:𝐴⊗𝐵
Γ;Δ,𝑦:𝐴,𝑥:𝐵⊢𝑃::𝑧:𝐶
Γ;Δ,𝑥:𝐴⊗𝐵⊢𝑥(𝑦).𝑃::𝑧:𝐶
Γ;Δ,𝑦:𝐴⊢𝑃::𝑥:𝐵
Γ;Δ⊢𝑥(𝑦).𝑃::𝑥:𝐴⊸𝐵
μltimapR
Γ;Δ1⊢𝑃::𝑦:𝐴Γ;Δ2,𝑥:𝐵⊢𝑄::𝑧:𝐶
Γ;Δ1,Δ2,𝑥:𝐴⊸𝐵⊢(𝜈𝑦)𝑥⟨𝑦⟩.(𝑃∣𝑄)::𝑧:𝐶
μltimapL
Γ;Δ1⊢𝑃::𝑥:𝐴Γ;Δ2,𝑥:𝐴⊢𝑄::𝑧:𝐶
Γ;Δ1,Δ2⊢(𝜈𝑥)(𝑃∣𝑄)::𝑧:𝐶
Cut
Cut connects exactly one provider to one client. Replicated provision has an empty linear context. Principal cut reductions synchronize send/receive and selection/branch. The unit has no communication action: 1R is inaction and 1L leaves its process unchanged. The additive rules are
Γ;Δ⊢𝑃::𝑥:𝐴
Γ;Δ⊢𝑥.𝗂𝗇𝗅;𝑃::𝑥:𝐴⊕𝐵
⊕R_1
Γ;Δ⊢𝑃::𝑥:𝐵
Γ;Δ⊢𝑥.𝗂𝗇𝗋;𝑃::𝑥:𝐴⊕𝐵
⊕R_2
Γ;Δ,𝑥:𝐴⊢𝑃::𝑧:𝐶Γ;Δ,𝑥:𝐵⊢𝑄::𝑧:𝐶
Γ;Δ,𝑥:𝐴⊕𝐵⊢𝑥.𝖼𝖺𝗌𝖾(𝑃,𝑄)::𝑧:𝐶
⊕L
Γ;Δ⊢𝑃::𝑥:𝐴Γ;Δ⊢𝑄::𝑥:𝐵
Γ;Δ⊢𝑥.𝖼𝖺𝗌𝖾(𝑃,𝑄)::𝑥:𝐴&𝐵
Γ;Δ,𝑥:𝐴⊢𝑃::𝑧:𝐶
Γ;Δ,𝑥:𝐴&𝐵⊢𝑥.𝗂𝗇𝗅;𝑃::𝑧:𝐶
_1
Γ;Δ,𝑥:𝐵⊢𝑃::𝑧:𝐶
Γ;Δ,𝑥:𝐴&𝐵⊢𝑥.𝗂𝗇𝗋;𝑃::𝑧:𝐶
_2
Replication is governed by
Γ;⋅⊢𝑃::𝑦:𝐴
Γ;⋅⊢!𝑥(𝑦).𝑃::𝑥:!𝐴
!R
Γ,𝑢:𝐴;Δ⊢𝑃::𝑧:𝐶
Γ;Δ,𝑥:!𝐴⊢𝑃[𝑥/𝑢]::𝑧:𝐶
!L
Γ,𝑢:𝐴;Δ,𝑦:𝐴⊢𝑃::𝑧:𝐶
Γ,𝑢:𝐴;Δ⊢(𝜈𝑦)𝑢⟨𝑦⟩.𝑃::𝑧:𝐶
Copy
Γ;⋅⊢𝑃::𝑦:𝐴Γ,𝑢:𝐴;Δ⊢𝑄::𝑧:𝐶
Γ;Δ⊢(𝜈𝑢)(!𝑢(𝑦).𝑃∣𝑄)::𝑧:𝐶
Cut!
Preservation retains the same judgment. Closed progress requires ⋅;⋅⊢𝑃::𝑥:𝟏 and a live nonreplicated top-level prefix. The local recursive extension is both contractive and tail-recursive: every transmitted session type is closed with respect to the surrounding recursion variables. Naive syntactic duality commutes with unfolding only on that fragment; arbitrary contractive types require message closure or another corrected duality. The recursive equality and typing closure rules are
𝑆[𝜇𝑡.𝑆/𝑡]≃𝑇
𝜇𝑡.𝑆≃𝑇
Eq-Unfold-L
𝑆≃𝑇[𝜇𝑡.𝑇/𝑡]
𝑆≃𝜇𝑡.𝑇
Eq-Unfold-R
Γ;Δ,𝑥:𝑆⊢𝑃::𝑧:𝐶𝑆≃𝑇
Γ;Δ,𝑥:𝑇⊢𝑃::𝑧:𝐶
T-Rec-Conv
The separate graded journal card first defines 𝖻𝗎𝖿𝖿𝖾𝗋𝖾𝖽(𝐶,Δ). It says exactly that every runtime channel typed 𝖢𝗁𝖺𝗇(𝖱𝖾𝖼𝗏𝐴𝑃) has a head value. Term/global progress and post-context preservation require the paper’s separately typed term, process, and channel configurations. Primitive rules use SingleAction and ExactSemiring, ReceivePrefix, or Sends where displayed; 𝖦𝗋𝖺𝖽𝖾𝖽𝑛𝑃 is a protocol type function in the multicast channel type, not a predicate premise.
The repaired global/local types have explicit queue addresses. Full projection is partial. A global type is coherent exactly when it is projectable, linear, and coinductively unstuck: every relaxed barb has a true global transition to another unstuck type. Local and decomposed local/queue environments inherit coherence through full projection and a path decomposition. Subject reduction allows the coherent global specification either to remain fixed or to make one labelled interaction step, and yields a possibly changed process typing environment and queue specification. Linearity closes the input- and output-dependency relations by
𝖨𝖮(𝑎0,𝑎1)𝖨𝗇𝖣𝖾𝗉(𝑎1,…,𝑎𝑛)
𝖨𝗇𝖣𝖾𝗉(𝑎0,𝑎1,…,𝑎𝑛)
I-Step
𝖨𝖮(𝑎0,𝑎1)∨𝖮𝖮(𝑎0,𝑎1)
𝖮𝗎𝗍𝖣𝖾𝗉(𝑎0,𝑎1)
O-Base
𝖨𝖮(𝑎0,𝑎1)∨𝖮𝖮(𝑎0,𝑎1)𝖮𝗎𝗍𝖣𝖾𝗉(𝑎1,…,𝑎𝑛)
𝖮𝗎𝗍𝖣𝖾𝗉(𝑎0,𝑎1,…,𝑎𝑛)
O-Step
The process and queue interfaces are connected by
Γ⊢𝑒:𝑈Γ⊢𝐷𝑃▹𝐶Δ,𝑠𝑝:𝑇;𝑄
Γ⊢𝐷𝑠𝑝[𝑘]!⟨𝑒⟩;𝑃▹𝐶Δ,𝑠𝑝:!𝑘⟨𝑈⟩.𝑇;𝑄
T-Send
Γ⊢𝑣:𝑈Γ⊢𝐷𝑠[𝑘]::̃ℎ▹𝐶Δ;𝑄
Γ⊢𝐷𝑠[𝑘]::(̃ℎ⋅𝑝!𝑣)▹𝐶Δ;𝑄⋅(𝑘,𝑝,𝑈)
T-Queue
Communication safety follows; progress, deadlock freedom, orphan freedom, fairness, and liveness do not.
Pirouette is a separate synchronous calculus parameterized by a local language with decidable location equality, substitution laws, closed values, unique typing and structural/substitution rules. Relative progress also needs Boolean inversion and local progress; relative preservation needs local preservation. The choreography semantics uses block sets for out-of-order steps and synchronizes higher-order calls globally. Endpoint projection uses partial merge. Global projection soundness assumes LN(𝐶)⊆𝐿≠∅. The reached-projection deadlock corollary separately assumes 𝖯𝗂𝗋𝖤𝗑𝗉𝗋𝖢𝗅𝗈𝗌𝖾𝖽(𝐶), the displayed choreography typing judgment, and a choreography type system with progress and preservation.