Lectures onType Theory
MixML linking and definedness
appendix sectionrules

MixML linking and definedness

For Mix0, Ω maps slots to core types, D is the defined subset, and signatures contain imports p:A and exports p+:A. The operation 1 selects the entries below label and removes that prefix. The complete primitive transition rules are

Ω(p)=A
Ω;Dimp(p:A):{p:A}D
Mix-Imp
Ω(p)=AΩ;Dcoree:ApDwr(e)={p}
Ω;Ddef(p=e:A):{p+:A}D{p}
Mix-Def
Ω;DM:Σ1D1Ω;D1N:Σ2D2merge(Σ1,Σ2)=Σ
Ω;DMwithN:ΣD2
Mix-With
1Ω;1DM:ΣD0
Ω;D{=M}:Σ(D(1D))D0
Mix-Struct
Ω;DM:ΣDQdom(Σ)Σ|Q=Σ0
Ω;DsealΣ0(M):Σ0D
Mix-Seal
Ω;DM:ΣDpdom(Σ).A.Σ(p)=p+:A
Ω;Dcomplete(M):ΣD
Mix-Complete

The ordered slot checker extracts traces by

ΞUvv:A
Ξreturn v:AΞϵ
Slot-Return
Ξ=Ξ0,x:AU
Ξget x:AΞget x
Slot-Get
Ξ=Ξ0,x:ALΞ0Uvv:A
Ξset x v:1Ξ0,x:AUset x
Slot-Set
Ξc1:1Ξ1t1Ξ1c2:BΞ2t2
Ξc1;c2:BΞ2t1t2
Slot-Seq
xdom(Ξ)dom(Ξ)Ξ,x:ALc:BΞ,x:AUt
ΞnewA(x.c):BΞνx.t
Slot-New

The corresponding trace validator is

ΞtrϵΞ
Tr-Empty
Ξ=Ξ0,x:AU
Ξtrget xΞ
Tr-Get
Ξ=Ξ0,x:AL
Ξtrset xΞ0,x:AU
Tr-Set
Ξtrt1Ξ1Ξ1trt2Ξ2
Ξtrt1t2Ξ2
Tr-Seq
xdom(Ξ)dom(Ξ)Ξ,x:ALtrtΞ,x:AU
Ξtrνx.tΞ
Tr-New

This checker is stricter than LTG. Full LTG has stores s::=ϵs,x:?τs,x:=e:τ, the split (?τ)L(?τ)U=(?τ)L, and the two dereference reductions s1,x:=e:τ,s2;E[!x]0s1,x:=e:τ,s2;E[e],s1,x:?τ,s2;E[!x]0.

The imported MixML rules use semantic signatures Σ::=[[=A]][[A]]±[[Φ]]±{|:Σ|},Φ::=α¯.β¯.(Li;Le;Σ). Their deterministic link rule first computes both templates, then runs the static right-hand pass, bidirectional locator lookup, the two main checks, and the final semantic-signature merge, exactly as (15.2)(15.5).

Search the book

Type to search the local edition.