Philosophy of Computer Science: William J. Rapaport

advertisement
Philosophy of Computer Science:
What I Think It Is, What I Teach, & How I Teach It
William J. Rapaport
Department of Computer Science & Engineering,
Department of Philosophy, Department of Linguistics,
and Center for Cognitive Science
rapaport@cse.buffalo.edu
http://www.cse.buffalo.edu/~rapaport
What Is “Philosophy of CS”?
• xy[ y = philosophy of x
= philosophical investigation of:
–
− the nature of x,
− x’s assumptions,
− x’s methods,
− x’s goals, etc.]
Let x = CS / Philosophy of CS exists!
• Philosophy of CS : CS = Phil of Science : Science
= Phil of Physics : Physics
etc.
• Philosophy of CS ≠ Philosophy of AI
– Philosophy of AI  Philosophy of CS
• Philosophy of CS ≠ Philosophy of Information
– Machlup & Mansfield 1983; Floridi 2002
– Philosophy of CS  Philosophy of Info ≠ 
Is Anyone Doing PhilCS?
•  lots of philosophical essays on the topics
covered by PhilCS
– But few authors call it ‘PhilCS’
•  some courses in PhilCS
– But not many (as of ~2007):
• Swedish National Course on PhilCS
– Gordana Dodig-Crnkovic, Mälardalen U.
• Philosophy of CS
– Matti Tedre, U. of Joensuu, Dept. of Computer Science & Statistics
– Konstantine Arkoudas, Rensselaer Polytech, CogSci/Phil
• ∃ lots of “PhilCS” courses that are really PhilAI
So, What Is the Philosophy of CS?
(& How Can It Be Taught?)
0.
1.
2.
3.
6.
7.
What is philosophy?
What is computer science (or computing science)?
What is a computer?
(the “hardware question”)
What is computation/computing?
What is an algorithm? What is a computer program?
(the “software question”)
What is the relationship between HW & SW?
(the “mind/body question”?)
What is the relation of computers/computation
to the real world?
Philosophy of Artificial Intelligence
Computer Ethics
8.
Etc.?
4.
5.
•
Exercise for the audience: Name some other topics!
What Is Philosophy?
• Necessary topic in a CS course
– Cf. Perry’s Scheme of Intellectual and Ethical Development
• Dualism
– Correct answers to all questions are known only to Authorities
 Multiplism
•  answers / all opinions are equally good
 Contextual Relativism
• Validity of an opinion is relative to its evidential context
• Are CS students “Dualists”?
• See (fear?) philosophy as being “Multiplistic”
• Is philosophy a “Contextually Relativistic” discipline?
 Students must critically evaluate opinions on basis of evidence
What Is Philosophy? (cont’d)
• Philosophy =def
search for truth in any field by rational means
– “rational” =
• (deductive) logic
• empirical, scientific investigation
– inductive, abductive reasoning + belief revision
• Philosophy of X =
study of fundamental assumptions, methods, goals of X
• Socrates/Plato:
– philosopher as gadfly who challenges assumptions
What Is Philosophy? (cont’d)
• Critical thinking & informal argument analysis
– Computing Curricula 2001
• “Social & Professional Issues” knowledge area
– “Methods & tools of analysis”
• Readings on nature of philosophy:
*
–
–
–
Audi, “Brief Guide for Undergrads” (2001)
Plato, Apology
Colburn 2000, Chs. 3–4 (on history)
Supplementary text:
• Woodhouse, Preface to Philosophy (2003)
• Martinich, Philosophical Writing (2005)
• ~ 1 class period!
What Is Computer Science?
• ∃ philosophical & political motivations
– Philosophy: What is the “nature” of CS?
• Probably, CS is not a natural kind
 CS = what computer scientists do!
– Extensional characterization
• But: can still give intensional version of this extension:
– What do computer scientists do? (see below)
– Academic politics:
• Which dean should oversee CS?
– (Arts &) science?
– Engineering?
– CS/informatics?
What Is CS? (cont’d)
• Science of computers & surrounding phenomena (including algorithms)
* Newell, Perlis, & Simon 1967
• Study of algorithms & surrounding phenomena (including computers)
* Knuth 1974
• What can be automated / solved by TM / expressed recursively?
– AI = Is cognition recursive?
— Arden 1983
• Artificial science (empirical study, but not a “natural” science)
of phenomena surrounding computers
* [Newell &] Simon 1976, 1969/1996
• Natural science of procedures
* Shapiro 2001
[McCarthy 2006: computational procedures]
• Body of knowledge dealing with info-transforming processes
– Denning et al. 1989
• Study of information
* Hartmanis & Lin 1992
• Engineering (not science)
* Brooks 1996, Loui 1987
• NB: No philosophers here!
Is CS Science or Engineering?
1. Motivation: Local (UB) politics
2. What is science?
3. What is engineering?
Is CS Science or Engineering?
2. What is science?
•
•
•
•
Goals = description vs. explanation
instrumentalism vs. realism
empirical vs. non-empirical sciences (e.g., math)
scientific method:
–
–
–
•
Bacon’s experimental method & Kemeny’s loop:

while  new observation do:
begin
observe it;
induce general hypothesis;
deduce future observation;
verify predictions
end.
Popper: conjectures & refutations

X is scientific iff X is falsifiable
Kuhn: science proceeds by revolutions alternating with “normal” science
Readings:
–
–
–
–
** [Okasha, Philosophy of Science: A Very Short Introduction (2002)] **
Kolak et al., Cognitive Science (2006): § “Philosophy of Science”
Papineau, “Philosophy of Science” (1996)
Kemeny, A Philosopher Looks at Science (1959), Ch. 5 (on scientific method)
Is CS Science or Engineering? (cont’d)
2. What is engineering?
•
Application of science to technology?
– invention of devices vs. discovery of new knowledge?
•
Defined by a professional education?
– Davis, Thinking Like an Engineer (1998), esp. Ch. 1
•
A design activity?
–
•
Petroski, “Early [Engineering] Education” (2003)
Is CS a new kind of engineering?
–
Studies theory, design, analysis, & implementation of
information-processing algorithms
•
Loui, “CS Is an Engineering Discipline” (1987)
If CS Is a Science, then…
• What is it a science of?
– Of computers?
• What is a computer?
• Cf. microscopy
– a discipline that no longer exists!
– Of computation?
• What is computation?
What Is a Computer?
(Historical Perspective)
• Survey of history of computers (& computation)
• 2 parallel goals:
– To make calculation easier/mechanical—to automate it
• Pascal, Leibniz, Babbage, Turing, Atanasoff & Berry,
Eckert & Mauchly, von Neumann, …
– [Asprey, Computing before Computers (1990)] ** {on line!}
– Simon & Newell, “Heuristic Problem Solving” (1958)
» on Babbage
– Ensmenger 2004 review of Who Invented the Computer?
– To provide a foundation for mathematics
• Leibniz, Boole, Frege, Hilbert, Gödel, Church, Turing, …
– [Davis, Engines of Logic (2000)] **
– Henkin, “Are Logic & Math Identical?” (1962)
– Davis, “Math Logic & Origin of Modern Computers” (1987)
What Is Computation / What Is an Algorithm?
(Mathematical Perspective)
•
Function viewed extensionally:
–
•
Function f is computable ≈def
–
–
•
Set of input-output pairs (s.t. same I/P yields same O/P)
 “algorithm” A that computes f
i.e.,
( i )[ A(i) = f(i) ]
& A specifies how i and f(i) are related
An algorithm A for a problem P ≈def
–
finite procedure (= set of instructions) for solving P that is:
1. unambiguous (“effective”)
•
•
I.e., clear/well-defined & executable by executor
But: vague & relative!
2. halts (but what about ATMs, programs to print all primes…?)
3. outputs correct answer to P (but what about heuristic programs?)
What is computation? (cont’d)
• “Slow reading” of Turing 1936
– Turing’s & Church’s Theses
• TM ≡ -definability (≡ etc.)
• Note:
– This is the first of 2 (or 3) “essential” readings in the philosophy of CS!
3 Great Insights of CS
Boole’s & Shannon’s Insight
1.
•
Only 2 nouns are needed to represent “anything”:
“0”, “1”
Turing’s Insight
2.
•
Only 5 verbs are needed to manipulate them:
i.
ii.
iii.
iv.
v.
Move-left
Move-right
Print-0
Print-1
Erase
Boehm & Jacopini’s Insight
3.
•
Only 3 rules of grammar are needed to combine these:
i. Sequence
ii. Selection
iii. Repetition
Also useful &/or elegant:
Exit
Named procedures
Recursion
What Is a Computer?
(Philosophical Perspective)
• Searle, “Is the Brain a Digital Computer?” (1990)
– Everything is (can be seen as) a digital computer
– What counts is how they are used
• Hayes, “What Is a Computer?” (1997)
– Not everything is a computer
– A computer is (like) “magic paper”:
• Input = patterns describing changes to (other) patterns
• Output = the results of making the changes
• Cf.: a device that changes assignments to variables (Thomason 2003)
• Is the universe a computer?
– Does the solar system compute Kepler’s laws?
– Lloyd & Ng, “Black Hole Computers” (2004)
– Weinberg, “Is the Universe a Computer?” (2002)
• on Wolfram’s New Kind of Science
What Is an Algorithm?
(Philosophical Perspective)
• What is a procedure?
• Algorithms ≠ recipes
• “Mundane”/“quotidian” procedures (Cleland 1993ff):
– Effective procedures that generate causal processes
• E.g., recipes
– But not TM-computable
• Because “effectiveness” depends on external world
• But recipes ≈ specifications (Preston, forthcoming)
– Different implementers (e.g., chefs) fill in details differently
– Allow for improvisation (cf. jazz, rock)
Are There Other Kinds of Computation?
• Computation of functions that are not TM-computable
– Copeland, “Hypercomputation” (2002)
• Turing:
oracle machines
– Add external source of non–TM-computable information
(“6th verb”: non–TM-computable basic operation)
• Boolos & Jeffrey: “Zeus” machines
– Infinitely accelerating
• But: Davis, “Myth of Hypercomputation”
• Wegner:
“interaction” machines
– Non-halting procedures with I/P from external world
– E.g., ATM, airline-reservation systems
• Putnam, Gold:
“trial & error”/inductive-inference machines
– Like TM, but last answer counts, not first
– May be needed for AI to succeed
• Kugel, “Computing Machines Can’t Be Intelligent (& Turing Said So)” (2002)
What Is a Computer Program?
1.
2.
3.
4.
5.
6.
What is implementation?
What is software vs. hardware?
Can software be patented? Copyrighted?
Are some programs (scientific) theories?
What is relation of programs to world?
Can programs be verified?
1. What Is Implementation?
• Ubiquitous notion, rarely defined
– Examples:
•
•
•
•
Programs “implement” algorithms
ML programs “implement” programs in high-level languages
Data structures “implement” ADTs
ADTs “implement” other ADTs
– Related to “realization” (in philosophy of mind)
• Is implementation…
– A relation between…
• An “abstraction” & something “concrete”?
• 2 “abstractions”?
– An isomorphism? A homomorphism?
• Readings:
– Chalmers, “On Implementing a Computation” (1994)
– Rapaport, “Implementation Is Semantic Interpretation” (1999, 2006)
• Syntax, semantics, formal systems (see below)
2. What Is Software?
• Software is a computer program changeable by a person
 Changeable hardwiring is software
* Moor, “3 Myths of CS” (1978)
• Software is syntactic form (see above)
– Suber, “What Is Software?” (1988)
• Software is a “concrete abstraction”:
– Software has both:
• Medium of description:
text (abstraction)
• Medium of execution:
implemented in electronics (concrete)
• cf. Spinoza’s dual-aspect theory of mind-body relation
– Colburn, “Software, Abstraction, Ontology” (1999/2000)
3. Can/Should Software/Hardware
Be Patented/Copyrighted?
• If computer program is text, then copyrightable
– But not patentable!
– Yet exportable.
• “Same” program engraved on CD-ROM ( executable)
is a machine
 Patentable
– But not copyrightable or exportable!
• ∃ mismatch; something’s got to give
• Readings:
* Newell, “The Models Are Broken” (1985/86):
• CS needs better ontological theories of computational entities
– Koepsell, Ontology of Cyberspace (2000):
• Lawyers need to devise better methods of legal protection
– Samuelson, “Should Program Algorithms Be Patented?” (1990)
4. Are programs scientific theories?
• Programs are (a language for expressing) theories,
which can then be their own models (Newell, Shaw, & Simon 1958)
– e.g., cognitive theories best expressed as computer programs
• in addition to statistical, mathematical, or natural languages
• programs are simultaneously theory & model (implementation)
• theory can be tested by executing program
– Philosophy of AI question:
• Do such cognitive programs
– actually exhibit (i.e., implement) cognitive processes?
– or merely simulate them?
• (a)
Theory vs. model
– philosophical theories of scientific explanation & scientific models
(b) Simulation vs. real thing
(c) Simulation vs. emulation
• Readings:
– Weizenbaum, Computer Power & Human Reason (Chs.5,6) (1976)
– Simon, Sciences of the Artificial (Ch.1) (1996)
• Local UB color:
– Is a program that can identify handwriting a scientific theory of handwriting?
– Should its programmer be an expert witness on handwriting?
5. Relation of Programs to World
• Recall Cleland’s “mundane procedures”
* Smith, “Limits of Correctness in Computers” (1985)
–  gap between world and our models of it
• can’t talk about real world except via a model or theory (cf. Kant)
– Computers are doubly removed from real world:
• rely on models of the models
• but must act in the real world.
– Third “essential” reading!
6. Can Programs Be Verified?
• Background:
–  formal methods for proving program “correctness”
• Gries, Science of Computing (1981)
• Dijkstra, “Guarded Commands…” (1975)
• Fetzer, “Program Verification: The Very Idea”
(1988)
– Can’t logically prove that causal systems won’t fail
• cf. Cleland again
– At best, can verify algorithms, not programs
• NB: requires firm grasp of
“algorithm/program/implementation”
Computer Ethics (I)
1. Given the shaky relation between program & world,
should we trust decisions made by computers?
* Moor 1979:
“Are There Decisions Computers Should Never Make?
–
–
•
Yes, because only humans can be moral agents
–
•
No, as long as their track record is better than humans’
Up to us humans to accept/reject computer recommendations
Friedman & Kahn, “People Are Responsible; Computers Are Not” (1997)
Suppose computer’s correct decision is overridden by a human!
–
Johnson, “To Err Is Human” (2002)
Philosophy of AI: Could We Build “AI”s?
• Deserves course of its own!
– My own AOS;
what students were awaiting all semester!
– Small fraction of the course (~ 1 week)
• What is AI?
• What is the relation of computation to cognition?
– Turing Test (Turing 1950)
• Computers will be said to be able to think if we can’t distinguish their
linguistic/cognitive ability from a human’s
• “Essential” reading #2
– Arguably, PhilCS = Turing 1936 + 1950 (+ Smith 1985 :-)
– Chinese-Room Argument (Searle 1980)
• Computer could pass a TT without really being able to think
– Local color: “Syntactic Semantics” (Rapaport 1985ff):
• Syntactic symbol manipulation (what computers do well)
suffices for semantic interpretation
of the kind needed for computational cognition
Computer Ethics (II)
Whether or not we could build “intelligent” computers,
should we build them?
•
Perhaps we shouldn’t (even begin!)
–
But considering the possibility allows us to deal with:



–
•
LaChat, “AI & Ethics” (1986)
What might happen if you create ALife
(and then lose your funding)?
–

What is a person?
Would an AI with personhood have rights?
Could it be moral?
Lem, “Non Serviam” (1971)
Computer ethics deserves own course!
Where & Why Teach PhilCS?
• Philosophy department?
• Or: Computer Science department?
• Yes!
– Good intro to CS issues for philosophy students
• Useful way to bring wide variety of topics together…
• & can shed new light on classical philosophical problems in:
– Metaphysics & ontology
– Epistemology
– Ethics
• ∃ topics that are unique to (Phil)CS
– Good intro to philosophy for CS students
• Capstone course for senior-level CS students
• Overview course for entry-level CS students
Texts
• There are a few (Colburn, Floridi), but…
– none do what I do
• Need anthology of “classic” readings
– publishers: too expensive
– solution? Web anthology?
How to Teach Philosophy of CS
• Thinking is best done by:
– Slow & active reading
– Discussion
– Writing (lots of it!)
• How to do this in:
– large lecture course
– with no teaching assistants?
Solution (I)
• Required attendance & participation
• Reading journal
– copy & comment on interesting passages
– enforces “active” (& slow) reading
Solution (II)
• 5 short position papers:
–
–
–
–
1 page each
every 2-3 weeks
1 week to write first draft
due-date = “peer editing” day
• Students bring 5 copies of paper
• Small-group discussions
– 1 week later:
revision due
• Without TA help, only grade ~40% of papers
– but each student gets at least 2 papers graded
– with TA help, can grade all papers
Position Paper #1: What Is CS?
•
Dean of Engineering says:
–
CS department should be moved
from Science to Engineering because:
1. Science = systematic observation, description,
experimental investigation, & theoretical
explanation of natural phenomena.
2. CS is the study of computers & related phenomena.
3.  CS is not a science
•
How would you respond to the Dean of
Engineering’s argument?
How to Evaluate an Argument
(and how to grade an essay)
• Valid?
– Missing premises?
• Agree with premises (including missing ones)?
– What is science?
– What is CS?
• Give reasons for opinions!
• Well-adapted to “triage” “quantum” grading:
– Each of above is:
•
•
•
•
clearly acceptable (A)
clearly unacceptable (D)
somewhere in between (C)
missing (F)
Advantages of Peer Editing
• Lots of opportunity for discussion among students
• Opportunity for me to interact with students 1-1
– I roamed & facilitated
• Multiple feedback on papers
– From peers as well as “Authority”
• Opportunity for critical thinking
– Paper topics = evaluation of an argument
• I only saw second draft!
Solution (III)
• (optional) Term paper
– Topic approved in advance
– Default topics:
• encyclopedia article on PhilCS (for “Dualists”)
• your own reasoned answers to syllabus questions
(for “Multiplists”)
XOR
• (optional) Essay-style final exam
– Do 3 of 5 questions:
•
•
•
•
•
one “old” argument
one “new” argument
What is CS?
Can computer programs be verified?
What is the most important question in PhilCS?
Why? What is your answer to it?
Midsemester Course Evaluation
(inspired by Stuart C. Shapiro)
•
Midsemester more useful than end of semester
–
•
•
Should be followed by course correction
2 questions
(or 4 questions):
1.
2.
What aspects of the course would you like to see changed?
What aspects of the course do you especially like?
3.
& 4. Ditto for recitation section
Summarized & discussed/posted responses
Likes & Dislikes
• Chief complaint:
– Not enough time to do all the very interesting
reading!
Likes & Dislikes
• Likes:
– position papers:
• writing
• peer editing
• revising
– discussions
– skill & practice in
critical analysis/informal-argument evaluation
– some students continued use of reading-journals
afterwards
– website
I’d like to thank you for putting together such a great
course this semester….I never had much respect for
philosophy in the past—but this course has provided
me with an entirely new perspective….I learned as
much in your course as any other I’ve taken in my
graduate career at UB (not to mention the fact that
the skills I learned in [it] are far more transferable
than the skills of the more esoteric CS courses)….
I urge [you] to offer this course again….It offers
exactly the kind of breadth of education that the
department needs to stress, and with its CS flavor,
it can tap the interest of students….Please consider
making Philosophy of CS a regular offering :)
Conclusion
• PhilCS is a legitimate branch of philosophy
• Worth teaching to both CS & philosophy students
– CS students get to:
• think about new issues
& issues not discussed elsewhere in CS curriculum
• think critically
• find out what philosophy is like
– Philosophy students get opportunity:
• to learn about computers, computing, and CS
• to apply philosophical skills & knowledge to a relatively new domain.
Reference & Website
• Rapaport, William J. (2005), “Philosophy of
Computer Science: An Introductory Course”,
Teaching Philosophy 28(4): 319–341.
– http://www.cse.buffalo.edu/~rapaport/Papers/rapaport_phics.pdf
• Course website:
– http://www.cse.buffalo.edu/~rapaport/philcs.html
– (or Google “philosophy of computer science” :-)
Download