on understanding data abstraction revisitedweb.cecs.pdx.edu/~black/oop/slides/cook on...
TRANSCRIPT
![Page 1: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/1.jpg)
1
On UnderstandingData Abstraction
...Revisited
1
![Page 2: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/2.jpg)
2
William R. CookThe University
of Texas at Austin
Dedicated to P. Wegner
2
![Page 3: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/3.jpg)
3
Objects
????
Abstract Data Types
3
![Page 4: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/4.jpg)
4
Warnings!
4
![Page 5: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/5.jpg)
5
No “Objects Model the Real World”
5
![Page 6: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/6.jpg)
6
No Inheritance
6
![Page 7: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/7.jpg)
7
No Mutable State
7
![Page 8: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/8.jpg)
8
No Subtyping!
8
![Page 9: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/9.jpg)
9
Interfacesas types
9
![Page 10: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/10.jpg)
10
NotEssential
(very nice but not essential)
10
![Page 11: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/11.jpg)
[ ]11
discussinheritance
later
11
![Page 12: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/12.jpg)
12
Abstraction
12
![Page 13: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/13.jpg)
13
13
![Page 14: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/14.jpg)
Hidden
Visible
14
14
![Page 15: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/15.jpg)
15
ProceduralAbstraction
bool f(int x) { … }
15
![Page 16: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/16.jpg)
16
ProceduralAbstraction
int → bool
16
![Page 17: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/17.jpg)
17
(one kind of)Type
Abstraction
∀T.Set[T]
17
![Page 18: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/18.jpg)
18
Abstract Data Type
signature Set empty! ! : Set insert! ! : Set, Int → Set isEmpty! ! : Set → Bool contains!! : Set, Int → Bool
18
![Page 19: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/19.jpg)
Abstract
19
Abstract Data Type
signature Set empty! ! : Set insert! ! : Set, Int → Set isEmpty! ! : Set → Bool contains!! : Set, Int → Bool
19
![Page 20: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/20.jpg)
20
Type+
Operations
20
![Page 21: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/21.jpg)
21
ADT Implementation
abstype Set = List of Int empty! ! ! = [] insert(s, n) ! = (n : s) isEmpty(s)! ! = (s == []) contains(s, n) ! = (n ∈ s)
21
![Page 22: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/22.jpg)
22
Using ADT valuesdef x:Set = emptydef y:Set = insert(x, 3)def z:Set = insert(y, 5)print( contains(z, 2) )==> false
22
![Page 23: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/23.jpg)
23
23
![Page 24: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/24.jpg)
Hiddenrepresentation:
List of Int
Visible name: Set
24
24
![Page 25: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/25.jpg)
25
ISetModule = ∃Set.{ empty! ! : Set insert! ! : Set, Int → Set isEmpty! : Set → Bool contains! : Set, Int → Bool}
25
![Page 26: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/26.jpg)
26
Natural!
26
![Page 27: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/27.jpg)
27
just likebuilt-in types
27
![Page 28: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/28.jpg)
28
MathematicalAbstract Algebra
28
![Page 29: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/29.jpg)
29
Type Theory
∃x.P(existential types)
29
![Page 30: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/30.jpg)
30
Abstract Data Type
=Data Abstraction
30
![Page 31: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/31.jpg)
31
Right?
31
![Page 32: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/32.jpg)
32
S = { 1, 3, 5, 7, 9 }
32
![Page 33: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/33.jpg)
33
Another way
33
![Page 34: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/34.jpg)
34
P(n) = even(n) & 1≤n≤9
34
![Page 35: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/35.jpg)
35
S = { 1, 3, 5, 7, 9 }
P(n) = even(n) & 1≤n≤9
35
![Page 36: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/36.jpg)
36
Sets ascharacteristic
functions
36
![Page 37: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/37.jpg)
37
type Set = Int → Bool
37
![Page 38: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/38.jpg)
38
Empty =
λn. false
38
![Page 39: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/39.jpg)
39
Insert(s, m) =
λn. (n=m) ∨ s(n)
39
![Page 40: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/40.jpg)
40
Using them is easydef x:Set = Emptydef y:Set = Insert(x, 3)def z:Set = Insert(y, 5)print( z(2) ) ==> false
40
![Page 41: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/41.jpg)
41
So What?
41
![Page 42: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/42.jpg)
42
Flexibility
42
![Page 43: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/43.jpg)
43
set of alleven numbers
43
![Page 44: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/44.jpg)
44
Set ADT:Not Allowed!
44
![Page 45: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/45.jpg)
45
or… break open ADT
& change representation
45
![Page 46: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/46.jpg)
46
set of even numbers
as afunction?
46
![Page 47: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/47.jpg)
47
Even =
λn. (n mod 2 = 0)
47
![Page 48: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/48.jpg)
48
Even interoperatesdef x:Set = Evendef y:Set = Insert(x, 3)def x:Set = Insert(y, 5)print( z(2) )==> true
48
![Page 49: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/49.jpg)
49
Sets-as-functionsare
objects!
49
![Page 50: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/50.jpg)
50
No type abstraction required!
type Set = Int → Bool
50
![Page 51: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/51.jpg)
51
multiplemethods?
sure...
51
![Page 52: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/52.jpg)
52
interface Set { contains: Int → Bool isEmpty: Bool}
52
![Page 53: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/53.jpg)
53
What about Empty and Insert?
(they are classes)
53
![Page 54: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/54.jpg)
54
class Empty { contains(n) { return false;} isEmpty() { return true;}}
54
![Page 55: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/55.jpg)
55
class Insert(s, m) { contains(n) { return (n=m) ∨ s.contains(n) } isEmpty() { return false }}
55
![Page 56: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/56.jpg)
56
Using Classesdef x:Set = Empty()def y:Set = Insert(x, 3)def z:Set = Insert(y, 5)print( z.contains(2) ) ==> false
56
![Page 57: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/57.jpg)
57
An object is
the set of observations that
can be made upon it
57
![Page 58: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/58.jpg)
58
Including more methods
58
![Page 59: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/59.jpg)
59
interface Set { contains! : Int → Bool isEmpty! : Bool insert ! : Int → Set}
59
![Page 60: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/60.jpg)
TypeRecursion
60
interface Set { contains! : Int → Bool isEmpty! : Bool insert ! : Int → Set}
60
![Page 61: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/61.jpg)
61
class Empty { contains(n) !{ return false;} isEmpty() ! { return true;} insert(n) ! { return ! ! Insert(this, n);}}
61
![Page 62: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/62.jpg)
ValueRecursion
62
class Empty { contains(n) !{ return false;} isEmpty() ! { return true;} insert(n) ! { return ! ! Insert(this, n);}}
62
![Page 63: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/63.jpg)
63
Using objectsdef x:Set = Emptydef y:Set = x.insert(3)def z:Set = y.insert(5)print( z.contains(2) )==> false
63
![Page 64: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/64.jpg)
64
Autognosis
64
![Page 65: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/65.jpg)
65
Autognosis
(Self-knowledge)
65
![Page 66: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/66.jpg)
66
Autognosis
An object can access other objects only through public
interfaces
66
![Page 67: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/67.jpg)
67
operationson
multiple objects?
67
![Page 68: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/68.jpg)
68
unionof
two sets
68
![Page 69: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/69.jpg)
69
class Union(a, b) { contains(n) { a.contains(n) ∨ b.contains(n); } isEmpty() { a.isEmpty(n) ∧ b.isEmpty(n); } ...}
69
![Page 70: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/70.jpg)
Complex Operation(binary) 70
interface Set { contains: Int → Bool isEmpty: Bool insert! ! : Int → Set union! ! : Set → Set}
70
![Page 71: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/71.jpg)
71
intersectionof
two sets??
71
![Page 72: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/72.jpg)
72
class Intersection(a, b) { contains(n) { a.contains(n) ∧ b.contains(n); }
isEmpty() { ? no way! ? } ...}
72
![Page 73: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/73.jpg)
73
Autognosis:Prevents some operations
(complex ops)
73
![Page 74: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/74.jpg)
74
Autognosis:Prevents some optimizations(complex ops)
74
![Page 75: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/75.jpg)
75
Inspecting two representations &
optimizing operations on them are easy
with ADTs
75
![Page 76: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/76.jpg)
76
Objects are fundamentally different
from ADTs
76
![Page 77: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/77.jpg)
ADT(existential types)
SetImpl = ∃ Set . { empty : Set
isEmpty : Set → Bool contains : Set, Int → Bool
insert : Set, Int → Set union : Set, Set → Set
}
77
Object Interface(recursive types)
Set = { isEmpty! : Bool contains! : Int → Bool insert! : Int → Set union! : Set → Set}Empty : SetInsert : Set x Int → SetUnion : Set x Set → Set
77
![Page 78: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/78.jpg)
ss
Empty Insert(s', m)
isEmpty(s) true false
contains(s, n) falsen=m ∨
contains(s', n)
insert(s, n) false Insert(s, n)
union(s, s'') isEmpty(s'') Union(s, s'')
Operations/Observations
78
78
![Page 79: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/79.jpg)
s
Empty Insert(s', m)
isEmpty(s) true false
contains(s, n) falsen=m ∨
contains(s', n)
insert(s, n) false Insert(s, n)
union(s, s'') isEmpty(s'') Union(s, s'')
79
ADT Organization
79
![Page 80: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/80.jpg)
s
Empty Insert(s', m)
isEmpty(s) true false
contains(s, n) falsen=m ∨
contains(s', n)
insert(s, n) false Insert(s, n)
union(s, s'') isEmpty(s'') Union(s, s'')
OO Organization
80
80
![Page 81: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/81.jpg)
81
Objects are fundamental
(too)
81
![Page 82: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/82.jpg)
82
Mathematicalfunctional
representation of data
82
![Page 83: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/83.jpg)
83
Type Theoryµx.P
(recursive types)
83
![Page 84: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/84.jpg)
84
ADTs require a
static type system
84
![Page 85: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/85.jpg)
85
Objects work wellwith or without static typing
85
![Page 86: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/86.jpg)
86
“Binary” Operations?
Stack, Socket, Window, Service, DOM, Enterprise
Data, ...
86
![Page 87: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/87.jpg)
87
Objects arevery
higher-order(functions passed as data and
returned as results)
87
![Page 88: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/88.jpg)
88
Verification
88
![Page 89: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/89.jpg)
89
ADTs: construction
Objects: observation
89
![Page 90: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/90.jpg)
90
ADTs: induction
Objects: coinductioncomplicated by: callbacks,
state
90
![Page 91: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/91.jpg)
91
Objects are designed to be as difficult as possible to verify
91
![Page 92: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/92.jpg)
92
Simulation
One object can simulate another!(identity is bad)
92
![Page 93: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/93.jpg)
93
Java
93
![Page 94: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/94.jpg)
94
What is a type?
94
![Page 95: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/95.jpg)
95
Declare variables
Classify values
95
![Page 96: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/96.jpg)
96
Class as type
=> representation
96
![Page 97: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/97.jpg)
97
Class as type
=> ADT
97
![Page 98: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/98.jpg)
98
Interfaces as type
=> behavior pure objects
98
![Page 99: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/99.jpg)
99
Harmful!
instanceof Class(Class) expClass x;
99
![Page 100: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/100.jpg)
100
Object-Oriented subset of Java:class name used only after “new”
100
![Page 101: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/101.jpg)
101
It’s not an accident that “int” is an ADT
in Java
101
![Page 102: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/102.jpg)
102
Smalltalk
102
![Page 103: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/103.jpg)
103
class True ifTrue: a ifFalse: b ^a
class False ifTrue: a ifFalse: b ^b
103
![Page 104: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/104.jpg)
104
True = λ a . λ b . a
False = λ a . λ b . b
104
![Page 105: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/105.jpg)
105
Inheritance(in one slide)
105
![Page 106: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/106.jpg)
106
AObject
Y(G)
G
Self-reference
Δ(A)AΔ
Modification
Δ(Y(G))GΔ
Y(ΔoG)
GΔInheritance Δ(Y(G))
GΔ
106
Inheritance
106
![Page 107: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/107.jpg)
107
107
History
107
![Page 108: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/108.jpg)
108
108
User-defined types and
procedural data structures
as complementary approaches to
data abstraction
by J. C. Reynolds
New Advances in Algorithmic
Languages INRIA, 108
![Page 109: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/109.jpg)
objects
Abstract data types User-defined types and
procedural data structures
as complementary approaches to
data abstraction
by J. C. Reynolds
New Advances in Algorithmic Languages
INRIA, 1975109
109
![Page 110: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/110.jpg)
110
110
“[an object with two methods] is more a tour de force than a specimen of clear programming.”
- J. Reynolds
110
![Page 111: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/111.jpg)
111
Extensibility Problem(aka Expression Problem)
111
1975 Discovered by J. Reynolds1990 Elaborated by W. Cook1998 Renamed by P. Wadler2005 Solved by M. Odersky (?)2025 Widely understood (?)
111
![Page 112: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/112.jpg)
112
Summary
112
![Page 113: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/113.jpg)
113
It is possible to do Object-Oriented
programming in Java
113
![Page 114: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/114.jpg)
114
Lambda-calculuswas the first object-oriented language (1941)
114
![Page 115: On Understanding Data Abstraction Revisitedweb.cecs.pdx.edu/~black/OOP/slides/Cook on DataAbstraction.pdf · built-in types 27. 28 Mathematical Abstract Algebra 28. 29 Type Theory](https://reader035.vdocuments.site/reader035/viewer/2022070714/5ed679318d813e6cd5423e9b/html5/thumbnails/115.jpg)
115
Data Abstraction
/ \ ADT Objects
115