types, abstraction, and parametric polymorphism...types, abstraction, and parametric polymorphism...
TRANSCRIPT
![Page 1: Types, Abstraction, and Parametric Polymorphism...Types, Abstraction, and Parametric Polymorphism John C. Reynolds Presented by Dietrich Geisler Abstraction Dietrich Geisler (With](https://reader030.vdocuments.us/reader030/viewer/2022040308/5f0a39c57e708231d42a9ea3/html5/thumbnails/1.jpg)
Types, Abstraction, and Parametric Polymorphism
John C. ReynoldsPresented by Dietrich Geisler
![Page 2: Types, Abstraction, and Parametric Polymorphism...Types, Abstraction, and Parametric Polymorphism John C. Reynolds Presented by Dietrich Geisler Abstraction Dietrich Geisler (With](https://reader030.vdocuments.us/reader030/viewer/2022040308/5f0a39c57e708231d42a9ea3/html5/thumbnails/2.jpg)
AbstractionDietrich Geisler
(With apologies to John C. Reynolds)
![Page 3: Types, Abstraction, and Parametric Polymorphism...Types, Abstraction, and Parametric Polymorphism John C. Reynolds Presented by Dietrich Geisler Abstraction Dietrich Geisler (With](https://reader030.vdocuments.us/reader030/viewer/2022040308/5f0a39c57e708231d42a9ea3/html5/thumbnails/3.jpg)
What is Abstraction?
Professor Descartes Professor Bessel
1. Pairs of real numbers
2. Equality of components
1. Define complex numbers2. When are they equal?
1. Pairs of real numbers; first component is nonnegative
2. Equality of first component AND second component differs by multiple of 2π
![Page 4: Types, Abstraction, and Parametric Polymorphism...Types, Abstraction, and Parametric Polymorphism John C. Reynolds Presented by Dietrich Geisler Abstraction Dietrich Geisler (With](https://reader030.vdocuments.us/reader030/viewer/2022040308/5f0a39c57e708231d42a9ea3/html5/thumbnails/4.jpg)
Some Context
Published in 1983
Previous Papers:
Recursive Functions (1960)Axiomatic Basis (1969)CBN and CBV (1975)
Intel 80286 Processor:
10 MHz clock rateNo memory cache
Higher-level languages:
Scheme 1973ML 1975C++ 1980
![Page 5: Types, Abstraction, and Parametric Polymorphism...Types, Abstraction, and Parametric Polymorphism John C. Reynolds Presented by Dietrich Geisler Abstraction Dietrich Geisler (With](https://reader030.vdocuments.us/reader030/viewer/2022040308/5f0a39c57e708231d42a9ea3/html5/thumbnails/5.jpg)
Sets and Types
If e1 has type ω→ω’ and e2 has type ωThen the result of applying e1 to e2 has type ω’
![Page 6: Types, Abstraction, and Parametric Polymorphism...Types, Abstraction, and Parametric Polymorphism John C. Reynolds Presented by Dietrich Geisler Abstraction Dietrich Geisler (With](https://reader030.vdocuments.us/reader030/viewer/2022040308/5f0a39c57e708231d42a9ea3/html5/thumbnails/6.jpg)
Some Notation
S # *Set Assignment
(e.g. S(𝜏) = {0, 1, 2})
Extension to constants, pairs, and functionse.g. S# (ω x ω’) = S#ω x S#ω’
Extension to a context(Works pointwise over the map)
![Page 7: Types, Abstraction, and Parametric Polymorphism...Types, Abstraction, and Parametric Polymorphism John C. Reynolds Presented by Dietrich Geisler Abstraction Dietrich Geisler (With](https://reader030.vdocuments.us/reader030/viewer/2022040308/5f0a39c57e708231d42a9ea3/html5/thumbnails/7.jpg)
Some Semantics
![Page 8: Types, Abstraction, and Parametric Polymorphism...Types, Abstraction, and Parametric Polymorphism John C. Reynolds Presented by Dietrich Geisler Abstraction Dietrich Geisler (With](https://reader030.vdocuments.us/reader030/viewer/2022040308/5f0a39c57e708231d42a9ea3/html5/thumbnails/8.jpg)
Semantics of Pairs
![Page 9: Types, Abstraction, and Parametric Polymorphism...Types, Abstraction, and Parametric Polymorphism John C. Reynolds Presented by Dietrich Geisler Abstraction Dietrich Geisler (With](https://reader030.vdocuments.us/reader030/viewer/2022040308/5f0a39c57e708231d42a9ea3/html5/thumbnails/9.jpg)
Sets are related using pairs of set elements under Rel(s1, s2)
Functions and pairs are related if each component is related
R is the pointwise relation between two set interpretations of types S1, S2
How to compare set assignments?
![Page 10: Types, Abstraction, and Parametric Polymorphism...Types, Abstraction, and Parametric Polymorphism John C. Reynolds Presented by Dietrich Geisler Abstraction Dietrich Geisler (With](https://reader030.vdocuments.us/reader030/viewer/2022040308/5f0a39c57e708231d42a9ea3/html5/thumbnails/10.jpg)
What is an Abstraction? (Formally)
Evaluating expressions maps related arguments to related results
![Page 11: Types, Abstraction, and Parametric Polymorphism...Types, Abstraction, and Parametric Polymorphism John C. Reynolds Presented by Dietrich Geisler Abstraction Dietrich Geisler (With](https://reader030.vdocuments.us/reader030/viewer/2022040308/5f0a39c57e708231d42a9ea3/html5/thumbnails/11.jpg)
Extending this to a Typing Theorem
![Page 12: Types, Abstraction, and Parametric Polymorphism...Types, Abstraction, and Parametric Polymorphism John C. Reynolds Presented by Dietrich Geisler Abstraction Dietrich Geisler (With](https://reader030.vdocuments.us/reader030/viewer/2022040308/5f0a39c57e708231d42a9ea3/html5/thumbnails/12.jpg)
What Happened to this work?
Some was folded into System F
Rust is starting to use some relational proofs
Ideas behind free theorems (e.g. properties λf : α→α?)