Next: Auxiliary functions, Previous: Domain equations, Up: Formal semantics [Contents][Index]
𝒦:Con→Eℰ:Exp→U→P→K→Cℰ∗:Exp∗→U→P→K→C𝒞:Com∗→U→P→C→C
Definition of 𝒦 deliberately omitted.
ℰ⁡⟦K⟧=λ⁣ρ⁣ω⁣κ.send⁡(𝒦⁡⟦K⟧)⁣κ
ℰ⁡⟦I⟧=λ⁣ρ⁣ω⁣κ.hold⁡
(lookup⁡ρ⁣I)
(single⁡(λ⁣ϵ.
ϵ=undefined⁡→
wrong⁡“undefined variable”,
send⁡ϵκ))
ℰ⁡⟦(E0⁣E∗)⟧=
λ⁣ρ⁣ω⁣κ.ℰ∗⁡
(permute⁡(〈E0〉§E∗))
ρ
ω
(λ⁣ϵ∗.(
(λ⁣ϵ∗.applicate⁡(ϵ∗↓1)⁣(ϵ∗†1)⁣ω⁣κ)
(unpermute⁡ϵ∗)))
ℰ⁡⟦(lambda⁡(I∗)⁣Γ∗⁣E0)⟧=
λ⁣ρ⁣ω⁣κ.λ⁣σ.
new⁡σ∈L→
send⁡
(
〈
new⁡σ|L,
λ⁣ϵ∗⁣ω′⁣κ′.#⁡ϵ∗=#⁡I∗→
tievals⁡
(λ⁣α∗.
(λ⁣ρ′.𝒞⁡⟦Γ∗⟧ρ′⁣ω′⁣(ℰ⁡⟦E0⟧⁣ρ′ω′κ′))
(extends⁡ρ⁣I∗⁣α∗))
ϵ∗,
wrong⁡“wrong number of arguments”〉
inE
κ
(update⁡(new⁡σ|L)⁣unspecified⁡σ),
wrong⁡“out of memory”⁣σ
ℰ⁡⟦(lambda⁡(I∗.I)⁣Γ∗⁣E0)⟧=
λ⁣ϵ∗⁣ω′⁣κ′.
#⁡ϵ∗≥#⁡I∗→
tievalsrest⁡
(extends⁡ρ⁣(I∗§〈I〉)⁣α∗))
ϵ∗
(#⁡I∗),
wrong⁡“too few arguments”〉inE)
ℰ⁡⟦(lambda⁡I⁣Γ∗⁣E0)⟧=ℰ⁡⟦(lambda⁡(.I)⁣Γ∗⁣E0)⟧
ℰ⁡⟦(if⁡E0⁣E1⁣E2)⟧=
λ⁣ρ⁣ω⁣κ.ℰ⁡⟦E0⟧⁣ρ⁣ω⁣(single⁡(λ⁣ϵ.
truish⁡ϵ→ℰ⁡⟦E1⟧⁣ρ⁣ω⁣κ,
ℰ⁡⟦E2⟧⁣ρ⁣ω⁣κ))
ℰ⁡⟦(if⁡E0⁣E1)⟧=
send⁡unspecified⁡κ))
Here and elsewhere, any expressed value other than undefined may be used in place of unspecified.
ℰ⁡⟦(set!⁡I⁣E)⟧=
λ⁣ρ⁣ω⁣κ.ℰ⁡⟦E⟧⁣ρ⁣ω⁣(single⁡(λ⁣ϵ.assign⁡
ϵ
(send⁡unspecified⁡κ)))
ℰ∗⁡⟦⟧=λ⁣ρ⁣ω⁣κ.κ〈〉
ℰ∗⁡⟦E0⁣E∗⟧=
λ⁣ρ⁣ω⁣κ.ℰ⁡⟦E0⟧⁣ρ⁣ω⁣(single⁡(λ⁣ϵ0.ℰ∗⁡⟦E∗⟧⁣ρ⁣ω⁣(λ⁣ϵ∗.κ⁣(〈ϵ0〉§ϵ∗))))
𝒞⁡⟦⟧=λ⁣ρ⁣ω⁣θ.θ
𝒞⁡⟦Γ0⁣Γ∗⟧=λ⁣ρ⁣ω⁣θ.ℰ⁡⟦Γ0⟧⁣ρ⁣ω⁣(λ⁣ϵ∗.𝒞⁡⟦Γ∗⟧⁣ρ⁣ω⁣θ)