taming effects in a dependent world
play

Taming Effects in a Dependent World Pierre-Marie Pdrot Max Planck - PowerPoint PPT Presentation

. . . . . . . . . . . . . . . Taming Effects in a Dependent World Pierre-Marie Pdrot Max Planck Institute for Software Systems Journes Nationales Gocal-LAC 14th November 2017 P.-M. Pdrot (MPI-SWS) Taming efgects in a


  1. . . . . . . . . . . . . . . . Taming Effects in a Dependent World Pierre-Marie Pédrot Max Planck Institute for Software Systems Journées Nationales Géocal-LAC 14th November 2017 P.-M. Pédrot (MPI-SWS) Taming efgects in a dependent world 14/11/2017 . . . . . . . . . . . . . . . . . . . . . . . . . 1 / 38

  2. CIC, a very fancy intuitionistic logical system . CIC, a very powerful functional programming language . . . . . . . . . . . . CIC: « Constructions dans un monde qui bouge » . . CIC, the Calculus of Inductive Constructions. Not just higher-order logic, not just fjrst-order logic First class notion of computation and crazy inductive types Finest types to describe your programs No clear phase separation between runtime and compile time The Pinnacle of the Curry-Howard correspondence P.-M. Pédrot (MPI-SWS) Taming efgects in a dependent world 14/11/2017 . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 / 38

  3. CIC, a very powerful functional programming language . . . . . . . . . . . . CIC: « Constructions dans un monde qui bouge » . . CIC, the Calculus of Inductive Constructions. Not just higher-order logic, not just fjrst-order logic First class notion of computation and crazy inductive types Finest types to describe your programs No clear phase separation between runtime and compile time The Pinnacle of the Curry-Howard correspondence P.-M. Pédrot (MPI-SWS) Taming efgects in a dependent world 14/11/2017 . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 / 38 CIC, a very fancy intuitionistic logical system .

  4. . . . . . . . . . . . . . . CIC: « Constructions dans un monde qui bouge » CIC, the Calculus of Inductive Constructions. Not just higher-order logic, not just fjrst-order logic First class notion of computation and crazy inductive types Finest types to describe your programs No clear phase separation between runtime and compile time The Pinnacle of the Curry-Howard correspondence P.-M. Pédrot (MPI-SWS) Taming efgects in a dependent world 14/11/2017 . . . . . . . . . . . . . . . . . . . . . . . . . . 2 / 38 CIC, a very fancy intuitionistic logical system . CIC, a very powerful functional programming language .

  5. . . . . . . . . . . . . . . CIC: « Constructions dans un monde qui bouge » CIC, the Calculus of Inductive Constructions. Not just higher-order logic, not just fjrst-order logic First class notion of computation and crazy inductive types Finest types to describe your programs No clear phase separation between runtime and compile time The Pinnacle of the Curry-Howard correspondence P.-M. Pédrot (MPI-SWS) Taming efgects in a dependent world 14/11/2017 . . . . . . . . . . . . . . . . . . . . . . . . . . 2 / 38 CIC, a very fancy intuitionistic logical system . CIC, a very powerful functional programming language .

  6. . . . . . . . . . . . . . . . An Efgective Object One implementation to rule them all... Many big developments using it for computer-checked proofs. Mathematics: Four colour theorem, Feit-Thompson, Unimath... Computer Science: CompCert, VST, RustBelt... P.-M. Pédrot (MPI-SWS) Taming efgects in a dependent world 14/11/2017 . . . . . . . . . . . . . . . . . . . . . . . . . 3 / 38

  7. . . . . . . . . . . . . . . . An Efgective Object One implementation to rule them all... Many big developments using it for computer-checked proofs. Mathematics: Four colour theorem, Feit-Thompson, Unimath... Computer Science: CompCert, VST, RustBelt... P.-M. Pédrot (MPI-SWS) Taming efgects in a dependent world 14/11/2017 . . . . . . . . . . . . . . . . . . . . . . . . . 3 / 38

  8. . . . . . . . . . . . . . . . An Efgective Object One implementation to rule them all... Many big developments using it for computer-checked proofs. Mathematics: Four colour theorem, Feit-Thompson, Unimath... Computer Science: CompCert, VST, RustBelt... P.-M. Pédrot (MPI-SWS) Taming efgects in a dependent world 14/11/2017 . . . . . . . . . . . . . . . . . . . . . . . . . 3 / 38

  9. . . . . . . . . . . . . . . The Most Important Issue of Them All Yet CIC sufgers from a fundamental fmaw. You want to show the wonders of Coq to a fellow programmer You fjre your favourite IDE ... and you’re asked the dreadful question. Could you write a Hello World program please? P.-M. Pédrot (MPI-SWS) Taming efgects in a dependent world 14/11/2017 . . . . . . . . . . . . . . . . . . . . . . . . . . 4 / 38

  10. . . . . . . . . . . . . . . The Most Important Issue of Them All Yet CIC sufgers from a fundamental fmaw. You want to show the wonders of Coq to a fellow programmer You fjre your favourite IDE ... and you’re asked the dreadful question. Could you write a Hello World program please? P.-M. Pédrot (MPI-SWS) Taming efgects in a dependent world 14/11/2017 . . . . . . . . . . . . . . . . . . . . . . . . . . 4 / 38

  11. . . . . . . . . . . . . . . The Most Important Issue of Them All Yet CIC sufgers from a fundamental fmaw. You want to show the wonders of Coq to a fellow programmer You fjre your favourite IDE ... and you’re asked the dreadful question. Could you write a Hello World program please? P.-M. Pédrot (MPI-SWS) Taming efgects in a dependent world 14/11/2017 . . . . . . . . . . . . . . . . . . . . . . . . . . 4 / 38

  12. That means no effects in CIC, amongst which: Dually, for the same reasons, no classical reasoning . . . . . . . . . . . . . . . A Well-known Limitation This is pretty much standard. By the Curry-Howard correspondence no exceptions, state, non-termination, printing... ... and thus no Hello World Curry-Howard principle: efgects extend your logic. P.-M. Pédrot (MPI-SWS) Taming efgects in a dependent world 14/11/2017 . . . . . . . . . . . . . . . . . . . . . . . . . . 5 / 38 Intuitionistic Logic ⇔ Functional Programming

  13. . . . . . . . . . . . . . . . A Well-known Limitation This is pretty much standard. By the Curry-Howard correspondence no exceptions, state, non-termination, printing... ... and thus no Hello World Curry-Howard principle: efgects extend your logic. P.-M. Pédrot (MPI-SWS) Taming efgects in a dependent world 14/11/2017 . . . . . . . . . . . . . . . . . . . . . . . . . 5 / 38 Intuitionistic Logic ⇔ Functional Programming That means no effects in CIC, amongst which: Dually, for the same reasons, no classical reasoning .

  14. 1 The theory ought to be logically consistent 2 It should be implementable (e.g. decidable type-checking) 3 Other nice properties like canonicity ( . . . . . . . . . . . It’s not just randomly coming up with typing rules though. Thesis We want a type theory with efgects! . We want a model of type theory with efgects. n implies n S S O ) P.-M. Pédrot (MPI-SWS) Taming efgects in a dependent world 14/11/2017 . . . . . . . . . . . . . . . . 6 / 38 . . . . . . . . . . . . 1 To program more (exceptions, non-termination...) 2 To prove more (classical logic, univalence...) 3 To write Hello World.

  15. 1 The theory ought to be logically consistent 2 It should be implementable (e.g. decidable type-checking) 3 Other nice properties like canonicity ( . . . . . . . . . . . It’s not just randomly coming up with typing rules though. Thesis We want a type theory with efgects! . We want a model of type theory with efgects. n implies n S S O ) P.-M. Pédrot (MPI-SWS) Taming efgects in a dependent world 14/11/2017 . . . . . . . . . . . . . . . . 6 / 38 . . . . . . . . . . . . 1 To program more (exceptions, non-termination...) 2 To prove more (classical logic, univalence...) 3 To write Hello World.

  16. . . . . . . . . . . . . . . . Thesis We want a type theory with efgects! It’s not just randomly coming up with typing rules though. We want a model of type theory with efgects. P.-M. Pédrot (MPI-SWS) Taming efgects in a dependent world 14/11/2017 . . . . . . . . . . . . . . . . . . . . . . . . . 6 / 38 1 To program more (exceptions, non-termination...) 2 To prove more (classical logic, univalence...) 3 To write Hello World. 1 The theory ought to be logically consistent 2 It should be implementable (e.g. decidable type-checking) 3 Other nice properties like canonicity ( ⊢ n : N implies n ⇝ S . . . S O )

  17. . I won’t lie: it is . But part of this fame is nonetheless due to its models. . . . . . . . . . Aporias Semantics of type theory have a fame of being horribly complex. Set-theoretical models: because Sets are a (crappy) type theory. . Pro: Sets! Con: Sets! Realizability models: construct programs that respect properties. Pro: Computational, computer-science friendly. Con: Not foundational (requires an alien meta-theory), not decidable. Categorical models: abstract description of type theory. Pro: Abstract, subsumes the two former ones. Con: Realizability + very low level, gazillion variants, intrisically typed, static. P.-M. Pédrot (MPI-SWS) Taming efgects in a dependent world 14/11/2017 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 / 38

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