tie story begins almost 50 years ago with the invention
play

Tie story begins almost 50 years ago with the invention of domain - PowerPoint PPT Presentation

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


  1. 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

  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

  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 Jonathan Sterling and Robert Harper Guarded Computational Type Tieory 3

  4. 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 (𝑓) ∣ 𝑓 ∈ � 𝐵 � (𝜍, 𝛽 ↦ � 𝜈𝛽.𝐵 � 𝜍)} � 𝐵 → 𝐶 � 𝜍 ≜ {𝜇𝑦.𝑓 ∣ ∀𝑤 ∈ � 𝐵 � 𝜍. 𝑓[𝑤/𝑦] ∈ � 𝐶 � 𝜍}

  5. 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 ∣ 𝜈𝛽.𝐵 � 𝜍)} � 𝑗 ∣ 𝐵 → 𝐶 � 𝜍 ≜ {𝜇𝑦.𝑓 ∣ ∀𝑘 ≤ 𝑗. ∀𝑤 ∈ � 𝑘 ∣ 𝐵 � 𝜍. 𝑓[𝑤/𝑦] ∈ � 𝑘 ∣ 𝐶 � 𝜍}

  6. 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 ∣ 𝜈𝛽.𝐵 � 𝜍)} � 𝑗 ∣ 𝐵 → 𝐶 � 𝜍 ≜ {𝜇𝑦.𝑓 ∣ ∀𝑘 ≤ 𝑗. ∀𝑤 ∈ � 𝑘 ∣ 𝐵 � 𝜍. 𝑓[𝑤/𝑦] ∈ � 𝑘 ∣ 𝐶 � 𝜍}

  7. 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 (𝑓) ∣ ▷(𝑓 ∈ � 𝐵 � (𝜍, 𝛽 ↦ ℛ ))} � 𝐵 → 𝐶 � 𝜍 ≜ {𝜇𝑦.𝑓 ∣ ∀𝑤 ∈ � 𝐵 � 𝜍. 𝑓[𝑤/𝑦] ∈ � 𝐶 � 𝜍}

  8. 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 (𝑓) ∣ ▷(𝑓 ∈ � 𝐵 � (𝜍, 𝛽 ↦ ℛ ))} � 𝐵 → 𝐶 � 𝜍 ≜ {𝜇𝑦.𝑓 ∣ ∀𝑤 ∈ � 𝐵 � 𝜍. 𝑓[𝑤/𝑦] ∈ � 𝐶 � 𝜍}

  9. 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

  10. 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.

  11. 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

  12. 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.

  13. 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 ∀𝜆 .

  14. 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 ∀𝜆 .

  15. 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

  16. 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

  17. 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

  18. 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

  19. 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

  20. 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

  21. 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 (𝜇𝜆.𝜇𝐵. ▷ 𝜆 𝐵) ∈ ∀𝜆.( 𝒱 → 𝒱 ) ?

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend