polymorphism dynamic typing
play

Polymorphism Dynamic Typing Favonia | Nick Benton | Bob Harper 1 - PowerPoint PPT Presentation

Polymorphism Dynamic Typing Favonia | Nick Benton | Bob Harper 1 Polymorphism T C E R R O C Dynamic Typing Favonia | Nick Benton | Bob Harper 1 Is this the shortest PLunch? Bob and I wanted to make homework 2 Is this the shortest


  1. Polymorphism Dynamic Typing Favonia | Nick Benton | Bob Harper 1

  2. Polymorphism T C E R R O C Dynamic Typing Favonia | Nick Benton | Bob Harper 1

  3. Is this the shortest PLunch? Bob and I wanted to make homework 2

  4. Is this the shortest PLunch? Bob and I wanted to make homework and so we had a JFP Theoretical Pearl. 2

  5. System F to PCF source type var. “top” type TARGET 3

  6. System F to PCF source type var. “top” type TARGET 3

  7. System F to PCF source type var. But keep other types! “top” type TARGET 3

  8. System F to PCF System F source 4

  9. System F to PCF System F source PCF with dyn TARGET 4

  10. System F to PCF System F source PCF with dyn TARGET 4

  11. System F to PCF Keep everything except variables 5

  12. System F to PCF Keep everything except variables 5

  13. Type Application type app 6

  14. Type Application type app 6

  15. Type Application type app ? 6

  16. Type Application type app ? 6

  17. Type Application type app ? 7

  18. Type Application type app ? 7

  19. Embed and Project 8

  20. Type Application type app 9

  21. Type Application type app Idea: lift the projection to handle arbitrary type operators. 9

  22. Type Application type app Idea: lift the projection to handle arbitrary type operators. 9

  23. Type Application type app Idea: lift the projection to handle arbitrary type operators. 9 *Mayer-Wand style

  24. Embed and Project 2.0 Find all the t! 10

  25. Embed and Project 2.0 11

  26. Problem Statement 12

  27. Problem Statement (Intended) homework assignment: no run-time errors 12

  28. Problem Statement (Intended) homework assignment: no run-time errors Igarashi, Pierce and Wadler [2001] showed correctness in a minimal core calculus for Java with generics, relying on the class table. 12

  29. Problem Statement (Intended) homework assignment: no run-time errors Igarashi, Pierce and Wadler [2001] showed correctness in a minimal core calculus for Java with generics, relying on the class table. Our di ffi culty: composition of types 12

  30. System F relations for type variables types that respect obs. equiv. System F PCF terms terms 13

  31. System F relations for type variables types that respect obs. equiv. System F PCF terms terms no J here! 13

  32. Logical Relation Recipe weakening and exchange STEP 1 the relation itself respects obs. equiv. STEP 2 (and the properties you care) composition of types/relations STEP 3 fundamental lemma! STEP 4 14

  33. Logical Relation Recipe weakening and exchange STEP 1 the relation itself respects obs. equiv. STEP 2 (and the properties you care) ? composition of types/relations STEP 3 fundamental lemma! STEP 4 14

  34. Compositionality 15

  35. Compositionality 15

  36. Compositionality not so clear if it's “i ff .” 15

  37. FAILED ATTEMPT Compositionality implies(?) 16

  38. FAILED ATTEMPT Compositionality implies(?) Assume We want 16

  39. FAILED ATTEMPT Compositionality implies(?) Assume We want We have 16

  40. FAILED ATTEMPT Compositionality implies(?) Assume We want We have 16

  41. FAILED ATTEMPT Compositionality implies(?) Assume We want We have 16

  42. Logical Relation Recipe weakening and exchange STEP 1 the relation itself respects obs. equiv. STEP 2 (and the properties you care) quasi-composition of types/relations STEP 3 fundamental lemma! STEP 4 Thus, compiled programs give the same numbers! (no run-time errors) 17

  43. Concluding Notes 18

  44. Concluding Notes A nice trick to deal with embedding/projection! 18

  45. Concluding Notes A nice trick to deal with embedding/projection! We used re fi nements to make but rejected by POPL. :-( 18

  46. Concluding Notes A nice trick to deal with embedding/projection! We used re fi nements to make but rejected by POPL. :-( We have 3 di ff erent proofs with di ff erent setups. 18

  47. Concluding Notes A nice trick to deal with embedding/projection! We used re fi nements to make but rejected by POPL. :-( We have 3 di ff erent proofs with di ff erent setups. Thunks to preserve values: 18

  48. Concluding Notes A nice trick to deal with embedding/projection! We used re fi nements to make but rejected by POPL. :-( We have 3 di ff erent proofs with di ff erent setups. Thunks to preserve values: You can fi nd open problems by TAing! 18

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