Skip to content

Instantly share code, notes, and snippets.

@leque
Last active May 4, 2019 10:40
Show Gist options
  • Save leque/b62eed416afdb31ac53bcc4e934ace12 to your computer and use it in GitHub Desktop.
Save leque/b62eed416afdb31ac53bcc4e934ace12 to your computer and use it in GitHub Desktop.
ℰ : Exp -> Env -> Cont -> Ans
Proc = Val -> Cont -> Ans
ρ ∈ Env = Var -> Val
κ ∈ Cont = Val -> Ans
ℰ⟦x⟧ρκ = κ (ρ⟦x⟧)
ℰ⟦E1 E2⟧ρκ = ℰ⟦E1⟧ρ (λf. ℰ⟦E2⟧ρ (λa. f a κ)
ℰ⟦λx.E⟧ρκ = κ (λv.λκ'. ℰ⟦E1⟧ρ[⟦x⟧↦v]κ')
ℰ⟦Sk.E⟧ρκ = ℰ⟦E⟧ρ[⟦k⟧↦λv.λκ'.κ' (κ v)] (λx. x)
ℰ⟦<E>⟧ρκ = κ (ℰ⟦E⟧ρ(λx. x))
※ ρ[⟦x⟧↦v] ≡ 環境ρに⟦x⟧↦vという束縛を追加する。関数適用より強く結合する
※ Abstracting Control http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.43.8753 も参照
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment