1 / 13

Polymorphism

Polymorphism. CSED 321 CSE 정진웅. Polymorphism. Predicative polymorphic λ -calculus Let-polymorphism Implicit polymorphism. Predicative polymorphic λ -calculus. Untyped. Typed. Untypable. e’. Typable. e ’ ’. e. Predicative polymorphic λ -calculus. Untyped λ x . x Typed

yamal
Télécharger la présentation

Polymorphism

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Polymorphism CSED 321 CSE 정진웅

  2. Polymorphism • Predicative polymorphic λ-calculus • Let-polymorphism • Implicit polymorphism

  3. Predicative polymorphic λ-calculus Untyped Typed Untypable e’ Typable e ’ ’ e

  4. Predicative polymorphic λ-calculus • Untyped • λ x . x • Typed • λ x : int . x • λ x : bool . x

  5. Predicative polymorphic λ-calculus • Monotype • A ::= A →A | α • Polytype • U ::= A | ∀ α.U

  6. Predicative polymorphic λ-calculus • Polymorphism을 완벽하게 구현하지 못함 • Just polymorphism을 적용!

  7. Let-polymorphism • polytype을 typing하는 방법

  8. Let-polymorphism

  9. Let-polymorphism U Untyped Typable(with system F) Typable(with let-poly) Typable(with predictive-poly)

  10. Implicit polymorphism • untyped -> typed

  11. Implicit polymorphism

  12. References • Course note • 김봉준 선배’s PPT

  13. Thank you

More Related