A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of...
Transcript of A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of...
![Page 1: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/1.jpg)
A conceptual history ofprogramming languages
Simone Martini
seminaire Collegium – November 19, 2018
1 / 79
![Page 2: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/2.jpg)
Informatics
What is it?
2 / 79
![Page 3: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/3.jpg)
In limine
Informatics
A collection of artefacts (applications)
A technology making possible those artefacts
A science founding that technology
3 / 79
![Page 4: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/4.jpg)
In limine
Unique
It concerns an immaterial good: informationUsed to affect — and to which degree! — the material world
Young
First electronic computer: 1947
First computer science department in USA: 1962, Purdue
First computer science degree in France: 1968Maitrises d’informatique, Orsay
First computer science degree in Italy: 1969, Pisa
4 / 79
![Page 5: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/5.jpg)
Resistances, 1962
Most scientists thought that using a computer was simplyprogramming — that it didn’t involve any deep scientific thoughtand that anyone could learn to program. So why have a degree?They thought computers were vocational vs. scientific in nature.
[Conte, Computerworld magazines, 1999]
5 / 79
![Page 6: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/6.jpg)
An epistemology?
1 What are the entitieswith which the science of computation deals?
2 What kinds of factsabout these entities would we like to derive?
3 What are the basic assumptions from which we should start?
[John McCarthy, 1962]
Still in 1967:A. Newell, A. Perlis, H. Simon: letter to Science on“Computer Science”
6 / 79
![Page 7: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/7.jpg)
An epistemology?
1 What are the entitieswith which the science of computation deals?
2 What kinds of factsabout these entities would we like to derive?
3 What are the basic assumptions from which we should start?
[John McCarthy, 1962]
Still in 1967:A. Newell, A. Perlis, H. Simon: letter to Science on“Computer Science”
7 / 79
![Page 8: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/8.jpg)
What kind of computer scientist am I?
8 / 79
![Page 9: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/9.jpg)
CS subject areas, excerpt
1 Hardware
2 Systems and networks
3 Software and languages
4 Theory of computation
5 Information systems
6 Methodologies (including AI, simulations, graphics, etc.)
7 Security, privacy
8 Human-centered and applied computing(including interfaces, ubiquitous. mobile, etc.)
9 / 79
![Page 10: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/10.jpg)
CS subject areas, excerpt
1 Hardware
2 Systems and networks
3 Software and languages
4 Theory of computation
5 Information systems
6 Methodologies (including AI, simulations, graphics, etc.)
7 Security, privacy
8 Human-centered and applied computing(including interfaces, ubiquitous. mobile, etc.)
10 / 79
![Page 11: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/11.jpg)
The linguistic methaphor
From the end of the 50s
Programming: in artificial, formal languages
Tool of the trade
Object of study
Meta-language
No scientific discipline exists without first inventing a visual andwritten language which allows it to break with its confusing past.
[B. Latour, Visualisation and cognition, 1986]
11 / 79
![Page 12: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/12.jpg)
The linguistic methaphor
From the end of the 50s
Programming: in artificial, formal languages
Tool of the trade
Object of study
Meta-language
No scientific discipline exists without first inventing a visual andwritten language which allows it to break with its confusing past.
[B. Latour, Visualisation and cognition, 1986]
12 / 79
![Page 13: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/13.jpg)
Programming the first computer, ENIAC
13 / 79
![Page 14: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/14.jpg)
Program correctness
From the middle of 60s
How to prove a program correct?
How to give semantics to a program
How to specify its intended behaviour
How to prove that the two match
It is reasonable to hope that the relationship between computationand mathematical logic will be as fruitful in the next century asthat between analysis and physics in the last. [J. McCarthy, 1963]
14 / 79
![Page 15: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/15.jpg)
Program correctness
From the middle of 60s
How to prove a program correct?
How to give semantics to a program
How to specify its intended behaviour
How to prove that the two match
It is reasonable to hope that the relationship between computationand mathematical logic will be as fruitful in the next century asthat between analysis and physics in the last. [J. McCarthy, 1963]
15 / 79
![Page 16: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/16.jpg)
The model seems to be. . .
Structural engineering
mathematical physics laws
empirical knowledge
to understand, predict, and calculate the stability, strength andrigidity of structures for buildings.
McCarthy:
the relationship between computation and mathematical logic willbe as fruitful as that between analysis and physics.
16 / 79
![Page 17: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/17.jpg)
The larger context
The quest for a “Mathematical Theory of Computation”
How does mathematical logic fit into this theory?
And for what purposes?
A mathematical theory is the entrance ticket to science
17 / 79
![Page 18: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/18.jpg)
The larger context
The quest for a “Mathematical Theory of Computation”
How does mathematical logic fit into this theory?
And for what purposes?
A mathematical theory is the entrance ticket to science
18 / 79
![Page 19: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/19.jpg)
The larger context
The quest for a “Mathematical Theory of Computation”
How does mathematical logic fit into this theory?
And for what purposes?
A mathematical theory is the entrance ticket to science
19 / 79
![Page 20: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/20.jpg)
Computer Scientist
Education
PhD, 1988: Pisa
Post-doc, 1989-1990: Stanford
Junior faculty, 1988-1994: Pisa
Professor, 1994-2002: Udine
Professor and Head of CSE, 2002- : Bologna
Research
Foundations of programming languages
Theory and complexity of computation
20 / 79
![Page 21: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/21.jpg)
Foundations
Use (and develop) theories, in:I mathematical logicI theory of categoriesI very weak topological spacesI formal systems
To help design better languages
To help prove a program correct
To help obtaining general properties, e.g. complexity
21 / 79
![Page 22: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/22.jpg)
Publications
Some journals:
Theoretical Computer Science
Journal of Logic Programming
Mathematical Structures in CS
Archive for Mathematical Logic
Journal of Symbolic Logic
Information and Computation
ACM Transactions on Computational Logic
. . .
22 / 79
![Page 23: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/23.jpg)
Publications
Some journals:
Theoretical Computer Science
Journal of Logic Programming
Mathematical Structures in CS
Archive for Mathematical Logic
Journal of Symbolic Logic
Information and Computation
ACM Transactions on Computational Logic
. . .
23 / 79
![Page 24: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/24.jpg)
CS and Logic
24 / 79
![Page 25: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/25.jpg)
The big project
Reflect and trace the interaction of mathematical logicand programming (languages),
identifying some of the driving forces of this process.
First episode: Types
25 / 79
![Page 26: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/26.jpg)
Why types?
Modern programming languages:
control flow specification: small fraction
abstraction mechanisms to model application domains.
• Types are a crucial building block of these abstractions
• And they are a mathematical logic concept, aren’t they?
26 / 79
![Page 27: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/27.jpg)
Why types?
Modern programming languages:
control flow specification: small fraction
abstraction mechanisms to model application domains.
• Types are a crucial building block of these abstractions
• And they are a mathematical logic concept, aren’t they?
27 / 79
![Page 28: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/28.jpg)
Modelling tool
In the simulation of complex situations in the real world, it isnecessary to construct in the computer analogues of the objects ofthe real world, so that procedures representing types of [data] mayoperate upon them in a realistic fashion.
[Tony Hoare, 1964] (page 46, and, more generally, all Section 4)
28 / 79
![Page 29: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/29.jpg)
Types in programming languages
A (data) type is a collection of (effectively presented) values,together with (effective) operations on those values.
29 / 79
![Page 30: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/30.jpg)
Types in programming languages
A (data) type is a collection of (effectively presented) values,together with (effective) operations on those values.
integer numberswith +, -, ×, div, mod
strings of characterswith concatenation, selection of an element, . . .
rational numberswith +, -, ×, /,
√,. . .
Reals: no effective presentation is possible.
30 / 79
![Page 31: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/31.jpg)
Types in programming languages
A (data) type is a collection of (effectively presented) values,together with (effective) operations on those values.
“Collections of other values” (arrays, records, . . . )With their operations.
Functions between two typesWith their operations.
31 / 79
![Page 32: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/32.jpg)
Types for. . .
At the level of:
Project: conceptual organisation of data
Programming: support for correction
Translation: support for implementation
32 / 79
![Page 33: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/33.jpg)
Types for implementation
Not much interested here
An integer is coded with 32 bits, in two’s complementA rational is coded in IEEE 754 floating point, . . .
Crucial information for the translator/interpreter
The type of the FORTRAN language (1956 and ff)
33 / 79
![Page 34: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/34.jpg)
Types for correctness
Correctness
“minimal”: we don’t add integers and strings
“sufficient”: for a certain class of errors
“conservative”: “correct” phrases may be type-incorrect
34 / 79
![Page 35: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/35.jpg)
Minimal correctness
In physics: dimensional control
an acceleration must be m/sec2
of course “wrong” formulas may have the right dimension
35 / 79
![Page 36: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/36.jpg)
Sufficient correctness
For a certain class of errors:
“well typed expressions do not go wrong”
guarantee that some errors will not happen
e.g., an integer will never be used as a memory address
36 / 79
![Page 37: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/37.jpg)
Conservative correctness
Evaluation “does not go wrong”But the program is ill-typed
37 / 79
![Page 38: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/38.jpg)
In the great tradition:
[Types] forbid certain inferences which would otherwise be valid,but [do] not permit any which would otherwise be invalid.
[Whitehead and Russell, Principia Mathematica, 1910]
We shall now introduce a type system which, in effect, singles outa decidable subset of those wfes that are safe; i.e., cannot givenrise to ERRORs. This will disqualify certain wfes which do not, infact, cause ERRORS and thus reduce the expressive power of thelanguage.
[Morris, PhD thesis, 1968]
38 / 79
![Page 39: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/39.jpg)
In the great tradition:
[Types] forbid certain inferences which would otherwise be valid,but [do] not permit any which would otherwise be invalid.
[Whitehead and Russell, Principia Mathematica, 1910]
We shall now introduce a type system which, in effect, singles outa decidable subset of those wfes that are safe; i.e., cannot givenrise to ERRORs. This will disqualify certain wfes which do not, infact, cause ERRORS and thus reduce the expressive power of thelanguage.
[Morris, PhD thesis, 1968]
39 / 79
![Page 40: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/40.jpg)
Principia Mathematica
Types
Stratify the universe to avoid paradoxes
No set can be a member of itself
“The barber who shaves those and only thosewho do not shave by themselves”
40 / 79
![Page 41: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/41.jpg)
However
Not all the circular definitions are dangerous, and it is a task forthe logician to isolate the good ones.
[Dmitry Mirimanoff, 1917]
There are perfectly fine sets which belong to themselves
Non well-founded set-theories
41 / 79
![Page 42: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/42.jpg)
In foundations of mathematics, types:
never supposed to be used by the working mathematician
in principle could be used, to avoid paradoxes
In programming languages, types:
are used everyday, by everyone
should be made more “expressive”, “flexible”
42 / 79
![Page 43: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/43.jpg)
In foundations of mathematics, types:
are perceived as constraints(they “forbid” something, as in Russell’s quote).
In programming languages, types:
are experienced as an enabling feature (Voevodsky),allowing simpler writing of programs,
and better verification of their correctess.
43 / 79
![Page 44: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/44.jpg)
Types for. . .
At the level of:
Project : conceptual organisation of data
Programming : support for correction
Translation : support for implementation
44 / 79
![Page 45: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/45.jpg)
Conceptual organisation
In the simulation of complex situations in the real world, it isnecessary to construct in the computer analogues of the objects ofthe real world, so that procedures representing types of [data] mayoperate upon them in a realistic fashion.
[Tony Hoare, 1964] (page 46, and, more generally, all Section 4)
Type structure is a syntactic disciplinefor enforcing levels of abstraction [John Reynolds, 1983]
45 / 79
![Page 46: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/46.jpg)
Conceptual organisation
In the simulation of complex situations in the real world, it isnecessary to construct in the computer analogues of the objects ofthe real world, so that procedures representing types of [data] mayoperate upon them in a realistic fashion.
[Tony Hoare, 1964] (page 46, and, more generally, all Section 4)
Type structure is a syntactic disciplinefor enforcing levels of abstraction [John Reynolds, 1983]
46 / 79
![Page 47: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/47.jpg)
“Programming” languages
What we insist in calling programming languages
Are powerful tools to organize, make coherent, and modelreality
I data modelsI procedural modelsI interaction modelsI synchronization modelsI organization modelsI . . .
47 / 79
![Page 48: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/48.jpg)
We today conflate:
Types as an implementation (representation) issue
Types as an abstraction mechanism
Types as a classification mechanism (from mathematical logic)
One of the goals:separate them and identify when they arrive in the PL literature
48 / 79
![Page 49: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/49.jpg)
We today conflate:
Types as an implementation (representation) issue
Types as an abstraction mechanism
Types as a classification mechanism (from mathematical logic)
One of the goals:separate them and identify when they arrive in the PL literature
49 / 79
![Page 50: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/50.jpg)
The word: “type”
50 / 79
![Page 51: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/51.jpg)
Types in early Fortran?
Two types of constants are permissible: fixed points (restricted tointegers) and floating points
32 types of statement[The FORTRAN automatic coding system, 1956]
Any fixed point (floating point) constant, variable, or subscriptedvariable is an expression of the same mode.
[ibidem]
51 / 79
![Page 52: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/52.jpg)
Algol 58:types
Type declarations serve to declare certain variables, or functions, torepresent quantities of a given class, such as the class of integersor class of Boolean values.[Perlis and Samelson. Preliminary report: International algebraic language. Commun. ACM 1(12), December 1958.]
52 / 79
![Page 53: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/53.jpg)
No typesin the preparatory papers!
A data symbol falls in one of the following classes:a) Integer b) Boolean c) General
The symbol classification statements are:INTEGER (s1, . . . , sn)BOOLEAN (s1, . . . , sn)
[Backus et al. Proposal for a programming language. ACM Ad Hoc Committee on Languages, 1958.]
53 / 79
![Page 54: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/54.jpg)
Algol 60:maturity
Integers are of type integer. All other numbers are of type real.
The various “types” (integer, real, Boolean) basically denoteproperties of values.
[Backus et al. Report on the algorithmic language ALGOL 60. Commun. ACM 3(5), May 1960.]
54 / 79
![Page 55: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/55.jpg)
1950s and 1960s
Type based distinctions for compilation: always present
“Type” as a technical term: Algol 58
(Almost) stable since Algol 60
Mode- in Algol 68, d’apres early Fortran usage- “types (or modes)”, still in Reynolds 1975
55 / 79
![Page 56: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/56.jpg)
1950s and 1960s
Type based distinctions for compilation: always present
“Type” as a technical term: Algol 58
(Almost) stable since Algol 60
Mode- in Algol 68, d’apres early Fortran usage- “types (or modes)”, still in Reynolds 1975
56 / 79
![Page 57: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/57.jpg)
The word: “type”
The technical term “type”:
appears to be a semantical shift from the generic term
no role of the “type” from mathematical logic
The use of ‘type,’ as in ‘x is of type real,’ was analogous to thatemployed in logic.
Both programming language design and logic dipped into theEnglish language and came up with the same word forroughly the same purpose.
[A. Perlis, The American side of the development of Algol, 1981]
57 / 79
![Page 58: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/58.jpg)
Types from mathematical logic
58 / 79
![Page 59: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/59.jpg)
certainly people knew “some logic”:McCarthy, Hoare, Landin, Scott (!), Morris, etc.
but
Morris (1968) cites Curry (1958), but not Church (1940)
Reynolds (1974) rediscovers Girard’s System F (1971)
Milner (1977-78) rediscoverssimple type inference (Hindley, 1969)
Programming languages and proof-theory are talking the samelanguage, but the conflation is anonymous.
59 / 79
![Page 60: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/60.jpg)
certainly people knew “some logic”:McCarthy, Hoare, Landin, Scott (!), Morris, etc.
but
Morris (1968) cites Curry (1958), but not Church (1940)
Reynolds (1974) rediscovers Girard’s System F (1971)
Milner (1977-78) rediscoverssimple type inference (Hindley, 1969)
Programming languages and proof-theory are talking the samelanguage, but the conflation is anonymous.
60 / 79
![Page 61: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/61.jpg)
certainly people knew “some logic”:McCarthy, Hoare, Landin, Scott (!), Morris, etc.
but
Morris (1968) cites Curry (1958), but not Church (1940)
Reynolds (1974) rediscovers Girard’s System F (1971)
Milner (1977-78) rediscoverssimple type inference (Hindley, 1969)
Programming languages and proof-theory are talking the samelanguage, but the conflation is anonymous.
61 / 79
![Page 62: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/62.jpg)
The formidable middleman:
λ-calculus
The catalist:
Curry-Howard isomorphism, (1969); 1980
62 / 79
![Page 63: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/63.jpg)
The formidable middleman:
λ-calculus
The catalist:
Curry-Howard isomorphism, (1969); 1980
63 / 79
![Page 64: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/64.jpg)
The explicit recognition:
Per Martin-Lof.Constructive mathematics and computer programming.
(1979); 1982.
1 62 P. MARTIN-LOF
but also, and this is the reading which is most natural when the language is thought of as a programming language,
A is a problem (task).
Correlatively, the third form of judgment may be read not only
u is an object of type (element of the set) A ,
a is a proof of the proposition A ,
but also u is a program for the problem (task) A .
The equivalence of the first two readings is the by now well-known cor- respondence between propositions and types discovered by CURRY (1 958, pp. 312-315) and HOWARD (1969), whereas the transition from the second to the third is the KOLMOGOROV (1932) interpretation of propositions as problems or tasks (Ger. Aufgube).
The four forms of judgment used in the theory of types should be com- pared with the three forms of judgment used (although usually not so called) in standard presentations of first order predicate calculus, whether classical or intuitionistic, namely
A is a formula , A is true , a is an individual term,
The first of these corresponds to the form A is a type (proposition), the second is obtained from the form u is an object of type (a proof of the proposition) A by suppressing a, and the third is again obtained from the form a is an object of type A, this time by choosing for A the type of individuals.
In explaining what a judgment of one of the above four forms means, I shall first limit myself to assumption free judgments. Once it has been explained what meanings they carry, the explanations can readily be extended so as to cover hypothetical judgments as well.
A canonical type A is defined by prescribing how a canonical object of type A is formed as well as how two equal canonical objects of type A are formed. There is no limitation on this prescription except that the relation of equality which it defines between canonical objects of type A must be reflexive, symmetric and transitive. If the rules for forming canonical objects
64 / 79
![Page 65: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/65.jpg)
Why this is interesting
Our programming languages are also(a huge part of) the metalanguagein which we express the discipline.
65 / 79
![Page 66: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/66.jpg)
“Programming” languages
No scientific discipline exists without first inventing a visual andwritten language which allows it to break with its confusing past.
[B. Latour, Visualisation and Cognition: Thinking with Eyes and Hands; 1986]
Referring to Dagognet, F.: Tableaux et Langages de la Chimie. Paris : Le Seuil 1969;and to: Ecriture et Iconographie. Paris : Vrin 1973.
What we call programming languages are both such a foundinglanguage and one of the very objects of the discipline.
66 / 79
![Page 67: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/67.jpg)
“Programming” languages
No scientific discipline exists without first inventing a visual andwritten language which allows it to break with its confusing past.
[B. Latour, Visualisation and Cognition: Thinking with Eyes and Hands; 1986]
Referring to Dagognet, F.: Tableaux et Langages de la Chimie. Paris : Le Seuil 1969;and to: Ecriture et Iconographie. Paris : Vrin 1973.
What we call programming languages are both such a foundinglanguage and one of the very objects of the discipline.
67 / 79
![Page 68: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/68.jpg)
The study of programming languages, and of their “conceptual”history, could become a blueprint for a more generalepistemological investigation.
68 / 79
![Page 69: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/69.jpg)
An example
The unstoppable march of object-oriented programming
ADT: simple concept with clear mathematical semantics,1975ff
Object: complex concept with opaque (mathematical?)semantics
Objects rule the world, not ADTs !Contrary to what one would expect.
69 / 79
![Page 70: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/70.jpg)
An example
The unstoppable march of object-oriented programming
ADT: simple concept with clear mathematical semantics,1975ff
Object: complex concept with opaque (mathematical?)semantics
Objects rule the world, not ADTs !Contrary to what one would expect.
70 / 79
![Page 71: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/71.jpg)
Conclusion
The history of computer science is innervated by the continuoustension between formal beauty and technological effectiveness.
Types in programming languages are an evident example of thisdialectics.
We always exploited what we found useful for the design of moreelegant, economical, usable artefacts.
71 / 79
![Page 72: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/72.jpg)
The project for the Collegium de Lyon
Lyon 3: IRPHILENS: LIP/PLUME
72 / 79
![Page 73: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/73.jpg)
At the Collegium. . .
Next steps?
Continuation passing transformation (van Wijngaarden, 1964)
Exceptions handlers (PL/I: resume-based; etc.)
Pinpoint the impact of the Curry-Howard isomorphism
. . .
73 / 79
![Page 74: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/74.jpg)
Methodology
History and Philosophy of Computing: HAPOC
Across disciplines:for adding to the maturity of computing in general.
Bring together:computer scientists, historians, and philosophy scholars.
Narrow the gap between a technology and its professional history.
Perspective:useful for the technician of today, for a better science.
74 / 79
![Page 75: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/75.jpg)
Side paths
Computational thinking: not just coding
Programming as interaction (Smalltalk, Logo,. . . , Scratch, etc.)
Program as inscriptions (Latour)
Is the “traditional” Mathematical theory of computation stilluseful?
75 / 79
![Page 76: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/76.jpg)
Thank you
Universite de Lyon and the Collegium
for the support and the opportunity
76 / 79
![Page 77: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/77.jpg)
Let us follow Latour. . .
“Programs” are:
mobile
immutable when they move
flat
“their scale may be changed at will”:phenomena can be dominated with the eyes and held by hands
reproduced and communicated at little cost
may be reshuffled and recombined
may be made part of a written text
they merge with geometry (they are a faithful model of reality)
They are inscriptions, like geographical maps, or diagrams.
More: programming languages are a formal, general language of(and for) inscriptions.
77 / 79
![Page 78: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/78.jpg)
Let us follow Latour. . .
“Programs” are:
mobile
immutable when they move
flat
“their scale may be changed at will”:phenomena can be dominated with the eyes and held by hands
reproduced and communicated at little cost
may be reshuffled and recombined
may be made part of a written text
they merge with geometry (they are a faithful model of reality)
They are inscriptions, like geographical maps, or diagrams.
More: programming languages are a formal, general language of(and for) inscriptions.
78 / 79
![Page 79: A conceptual history of programming languagesmartini/TALKS/martini-COLLEGIUM.pdfFoundations of programming languages Theory and complexity of computation 20/79 Foundations Use (and](https://reader034.fdocuments.in/reader034/viewer/2022042206/5ea7fb07baad4a66c23887eb/html5/thumbnails/79.jpg)
Let us follow Latour. . .
“Programs” are:
mobile
immutable when they move
flat
“their scale may be changed at will”:phenomena can be dominated with the eyes and held by hands
reproduced and communicated at little cost
may be reshuffled and recombined
may be made part of a written text
they merge with geometry (they are a faithful model of reality)
They are inscriptions, like geographical maps, or diagrams.
More: programming languages are a formal, general language of(and for) inscriptions.
79 / 79