Tie story begins almost 50 years ago with the invention of domain theory and denotational semantics . Main idea: find category in which mixed variance operators have fixed points. Variety of techniques employed today, but the problem of mixed variance fixed points remained the fundamental struggle of PL semantics. Jonathan Sterling and Robert Harper Guarded Computational Type Tieory 2
Tie story begins almost 50 years ago with the invention of domain theory and denotational semantics . Main idea: find category in which mixed variance operators have fixed points. Variety of techniques employed today, but the problem of mixed variance fixed points remained the fundamental struggle of PL semantics. Jonathan Sterling and Robert Harper Guarded Computational Type Tieory 2
In 2001, Appel and McAllester invent new stratified semantic technique to construct fixed points of mixed variance, called step-indexing . Main idea: index everything by its “stage” of construction. step-indexed predicate = monotone sequence of predicates Jonathan Sterling and Robert Harper Guarded Computational Type Tieory 3
In 2001, Appel and McAllester invent new stratified semantic technique to construct fixed points of mixed variance, called step-indexing . Main idea: index everything by its “stage” of construction. step-indexed predicate = monotone sequence of predicates (no!! not well-defined) Jonathan Sterling and Robert Harper Guarded Computational Type Tieory 3 � 𝜈𝛽.𝐵 � 𝜍 ≜ { fold (𝑓) ∣ 𝑓 ∈ � 𝐵 � (𝜍, 𝛽 ↦ � 𝜈𝛽.𝐵 � 𝜍)} � 𝐵 → 𝐶 � 𝜍 ≜ {𝜇𝑦.𝑓 ∣ ∀𝑤 ∈ � 𝐵 � 𝜍. 𝑓[𝑤/𝑦] ∈ � 𝐶 � 𝜍}
In 2001, Appel and McAllester invent new stratified semantic technique to construct fixed points of mixed variance, called step-indexing . Main idea: index everything by its “stage” of construction. step-indexed predicate = monotone sequence of predicates Jonathan Sterling and Robert Harper Guarded Computational Type Tieory 3 � 𝑗 ∣ 𝜈𝛽.𝐵 � 𝜍 ≜ { fold (𝑓) ∣ ∀𝑘 < 𝑗. 𝑓 ∈ � 𝑘 ∣ 𝐵 � (𝜍, 𝛽 ↦ � 𝑘 + 1 ∣ 𝜈𝛽.𝐵 � 𝜍)} � 𝑗 ∣ 𝐵 → 𝐶 � 𝜍 ≜ {𝜇𝑦.𝑓 ∣ ∀𝑘 ≤ 𝑗. ∀𝑤 ∈ � 𝑘 ∣ 𝐵 � 𝜍. 𝑓[𝑤/𝑦] ∈ � 𝑘 ∣ 𝐶 � 𝜍}
Using ideas from Nakano [2000], abstract version of step-indexing factored in terms of approximation modality ▷ , called “later” [Appel et al., 2007]. Jonathan Sterling and Robert Harper Guarded Computational Type Tieory 4 � 𝑗 ∣ 𝜈𝛽.𝐵 � 𝜍 ≜ { fold (𝑓) ∣ ∀𝑘 < 𝑗. 𝑓 ∈ � 𝑘 ∣ 𝐵 � (𝜍, 𝛽 ↦ � 𝑘 + 1 ∣ 𝜈𝛽.𝐵 � 𝜍)} � 𝑗 ∣ 𝐵 → 𝐶 � 𝜍 ≜ {𝜇𝑦.𝑓 ∣ ∀𝑘 ≤ 𝑗. ∀𝑤 ∈ � 𝑘 ∣ 𝐵 � 𝜍. 𝑓[𝑤/𝑦] ∈ � 𝑘 ∣ 𝐶 � 𝜍}
Using ideas from Nakano [2000], abstract version of step-indexing factored in terms of approximation modality ▷ , called “later” [Appel et al., 2007]. Jonathan Sterling and Robert Harper Guarded Computational Type Tieory 4 � 𝜈𝛽.𝐵 � 𝜍 ≜ fix ℛ . { fold (𝑓) ∣ ▷(𝑓 ∈ � 𝐵 � (𝜍, 𝛽 ↦ ℛ ))} � 𝐵 → 𝐶 � 𝜍 ≜ {𝜇𝑦.𝑓 ∣ ∀𝑤 ∈ � 𝐵 � 𝜍. 𝑓[𝑤/𝑦] ∈ � 𝐶 � 𝜍}
Using ideas from Nakano [2000], abstract version of step-indexing factored in terms of approximation modality ▷ , called “later” [Appel et al., 2007]. not just for predicates! can also form guarded-recursive “sets”: gstream ≅ ℕ × ▷ gstream Jonathan Sterling and Robert Harper Guarded Computational Type Tieory 4 � 𝜈𝛽.𝐵 � 𝜍 ≜ fix ℛ . { fold (𝑓) ∣ ▷(𝑓 ∈ � 𝐵 � (𝜍, 𝛽 ↦ ℛ ))} � 𝐵 → 𝐶 � 𝜍 ≜ {𝜇𝑦.𝑓 ∣ ∀𝑤 ∈ � 𝐵 � 𝜍. 𝑓[𝑤/𝑦] ∈ � 𝐶 � 𝜍}
Programming Example: Guarded Streams that all observations are causal . Jonathan Sterling and Robert Harper Guarded Computational Type Tieory 5 type gstr[X] = cons of X * |> gstr[X] let head (xs : gstr[X]) : X = let cons (x, _) = xs in x let tail (xs : gstr[X]) : |> gstr[X] = let cons (_, ys) = xs in ys let zipWith (f : X -> Y -> Z) : gstr[X] -> gstr[Y] -> gstr[Z] = gfix F in fun (cons (x, xs)) (cons (y, ys)) -> cons (f x y, F <+> xs <+> ys) Can’t write unguarded tail function! Guarded-recursive types ensure
Constant modality Models of guarded recursion often include another modal operator gstream ≅ ℕ × ▷ gstream Jonathan Sterling and Robert Harper Guarded Computational Type Tieory 6 □ which neutralizes ▷ : □ 𝐵 → 𝐵 □ 𝐵 → □□ 𝐵 □ ▷ 𝐵 → □ 𝐵 Converts guarded recursion to coinduction.
Constant modality Models of guarded recursion often include another modal operator gstream ≅ ℕ × ▷ gstream Jonathan Sterling and Robert Harper Guarded Computational Type Tieory 6 □ which neutralizes ▷ : □ 𝐵 → 𝐵 □ 𝐵 → □□ 𝐵 □ ▷ 𝐵 → □ 𝐵 Converts guarded recursion to coinduction. □ gstream ≅ ℕ × □ gstream
Constant modality Models of guarded recursion often include another modal operator gstream ≅ ℕ × ▷ gstream sequence ≅ ℕ × sequence Jonathan Sterling and Robert Harper Guarded Computational Type Tieory 6 □ which neutralizes ▷ : □ 𝐵 → 𝐵 □ 𝐵 → □□ 𝐵 □ ▷ 𝐵 → □ 𝐵 Converts guarded recursion to coinduction.
Constant modality Models of guarded recursion often include another modal operator gstream ≅ ℕ × ▷ gstream sequence ≅ ℕ × sequence Jonathan Sterling and Robert Harper Guarded Computational Type Tieory 6 □ which neutralizes ▷ : □ 𝐵 → 𝐵 □ 𝐵 → □□ 𝐵 □ ▷ 𝐵 → □ 𝐵 Converts guarded recursion to coinduction. Improved version [Atkey and McBride, 2013]: index ▷ 𝜆 in “clocks” 𝜆 , re-cast □ as quantifier ∀𝜆 .
Constant modality Models of guarded recursion often include another modal operator Jonathan Sterling and Robert Harper Guarded Computational Type Tieory 6 □ which neutralizes ▷ : □ 𝐵 → 𝐵 □ 𝐵 → □□ 𝐵 □ ▷ 𝐵 → □ 𝐵 Converts guarded recursion to coinduction. gstream 𝜆 ≅ ℕ × ▷ 𝜆 gstream 𝜆 ∀𝜆. gstream 𝜆 ≅ ℕ × ∀𝜆. gstream 𝜆 Improved version [Atkey and McBride, 2013]: index ▷ 𝜆 in “clocks” 𝜆 , re-cast □ as quantifier ∀𝜆 .
Main task: develop powerful metalanguages for guarded domain-theoretic semantics and programming. Most advances in the area of guarded higher-order logics, but dependent type theory indispensible. Dependent type theory = semantic framework to unify the study of programs with the study of programming languages. Jonathan Sterling and Robert Harper Guarded Computational Type Tieory 7
Main task: develop powerful metalanguages for guarded domain-theoretic semantics and programming. Most advances in the area of guarded higher-order logics, but dependent type theory indispensible. Dependent type theory = semantic framework to unify the study of programs with the study of programming languages. Jonathan Sterling and Robert Harper Guarded Computational Type Tieory 7
Main task: develop powerful metalanguages for guarded domain-theoretic semantics and programming. Most advances in the area of guarded higher-order logics, but dependent type theory indispensible. Dependent type theory = semantic framework to unify the study of programs with the study of programming languages. Jonathan Sterling and Robert Harper Guarded Computational Type Tieory 7
2. universes 𝒱 𝑗 are essential, but not directly supported in GDTT Guarded Dependent Type Tieory Bizjak and Møgelberg [2017] present elegant denotational account of guarded dependent type theory ( Π, Σ, ▷ 𝜆 , ∀𝜆, … ) A couple things gave us pause… 1. what about operational meaning? (status unknown for GDTT) semantics Jonathan Sterling and Robert Harper Guarded Computational Type Tieory 8
2. universes 𝒱 𝑗 are essential, but not directly supported in GDTT Guarded Dependent Type Tieory Bizjak and Møgelberg [2017] present elegant denotational account of guarded dependent type theory ( Π, Σ, ▷ 𝜆 , ∀𝜆, … ) A couple things gave us pause… 1. what about operational meaning? (status unknown for GDTT) semantics Jonathan Sterling and Robert Harper Guarded Computational Type Tieory 8
Guarded Dependent Type Tieory Bizjak and Møgelberg [2017] present elegant denotational account of guarded dependent type theory ( Π, Σ, ▷ 𝜆 , ∀𝜆, … ) A couple things gave us pause… 1. what about operational meaning? (status unknown for GDTT) semantics Jonathan Sterling and Robert Harper Guarded Computational Type Tieory 8 2. universes 𝒱 𝑗 are essential, but not directly supported in GDTT
global orthogonality constraint clock-context-indexed universes 𝒱 ⃗ 𝑗 . What’s the deal with universes? Adequacy of ∀𝜆 to encode coinduction requires that functions of clocks are constant. Called clock irrelevance . Idea: get rid of ordinary universes, replace with weaker 𝜆 Jonathan Sterling and Robert Harper Guarded Computational Type Tieory 9 But what about (𝜇𝜆.𝜇𝐵. ▷ 𝜆 𝐵) ∈ ∀𝜆.( 𝒱 → 𝒱 ) ?
Recommend
More recommend