Philcs-nacap.ppt previous version:20050524-2 current version:20050615

Preview:

Citation preview

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,

and Center for Cognitive Science

rapaport@cse.buffalo.eduhttp://www.cse.buffalo.edu/~rapaport

Outline

• What is the Philosophy of Computer Science?

• What should be taught in a PhilCS course?

• How can it be taught to non-philosophers?

• How can a writing-intensive course be taught in a lecture environment?

What Is “Philosophy of CS”? xy[ 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 ~2005):

• Swedish National Course on PhilCS– Gordana Dodig-Crnkovic @ Mälardalen U.

• Topics in PhilCS– Eli Dresner @ Tel Aviv U.

• Phil of Computing– Bernard W. Kobes @ Arizona State U.

• ∃ lots of “PhilCS” courses that are really PhilAI

So, What Is the Philosophy of CS?(& How Can It Be Taught?)

0. 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/computationto the real world?

• Philosophy of Artificial Intelligence• Computer Ethics• Etc.?

1. 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

• 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)– Woodhouse, Preface to Philosophy (2003)

• < 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

• Study of virtual phenomena– Crowcroft 2005

• NB: No philosophers here!

Is CS Science or Engineering?• Motivation: Local (UB) politics

1. What is science?– Purpose of science:

• To describe the world?• To explain it?

– Are scientific theories…• Instrumental (i.e., “calculational”)? • Realistic?

– Is the scientific method…• Experimental & cumulative? • Driven by paradigms & revolutions?

– Is mathematics a science?– Readings:

• Papineau, “Philosophy of Science” (1996)• Kemeny, A Philosopher Looks at Science (1959)

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)

• 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)

• To provide a foundation for mathematics– Leibniz, Boole, Frege, Hilbert, Gödel, Turing, …

» Davis, Engines of Logic (2000)

What Is Computation / What Is an Algorithm?(Mathematical Perspective)

• Function viewed extensionally:– Set of input-output pairs (s.t. same I/P yields same O/P)

• Function f is computable ≈def

“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:• unambiguous• halts• outputs correct answer to P

• “Slow reading” of Turing 1936– Turing’s & Church’s Theses

• TM ≡ -definability (≡ etc.)

What Is CS? (revisited)

• Possible answer:– CS = study of algorithms

and computers that implement them– Link between these 2 “branches” of CS

(i.e., where the two histories intersect):• Turing’s 2 computers (TM, ACE)

• ACE was an implementation of TM– With implementation-dependent details

– With implementation-dependent limitations

3 Great Insights of CS1. Boole’s & Shannon’s Insight

• Only 2 nouns are needed to represent “anything”: “0”, “1”

2. Turing’s Insight• Only 5 verbs are needed to manipulate them:

• Move-left• Move-right• Print-0• Print-1• Erase

• Boehm & Jacopini’s Insight1. Only 3 rules of grammar are needed to combine these:

i. Sequenceii. Selectioniii. RepetitionAlso useful &/or elegant: Exit

Named proceduresRecursion

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)

What Is an Algorithm? (Philosophical Perspective)

• What is a procedure?• Algorithms ≠ recipes• But recipes ≈ specifications (Preston, unpublished)

– Different implementers (e.g., chefs) fill in details differently– Allow for improvisation (cf. jazz, rock)

• “Mundane”/“quotidian” procedures (Cleland 1993ff):– Effective procedures that generate causal processes

• E.g., recipes

– But not TM-computable• Because effectiveness depends on external world

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

• Bringsjord 1995ff: computationalism is doomed

• 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?

• What is implementation?

• Are some programs (scientific) theories?

• What is software vs. hardware?

• Can software be patented? Copyrighted?

• Can programs be verified?

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)

What Is the Relation of a Program to What It Models or Simulates?

• Can a program be a (scientific) theory?– Pylyshyn, Johnson-Laird, Newell & Simon:

• 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)• or merely simulate

cognitive processes?• 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?

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)

– Colburn, “Software, Abstraction, Ontology” (1999/2000)

Can/Should Software/HardwareBe Patented/Copyrighted?

• Combines legal, social, ontological issues!– Could be unifying theme for course

• 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

Can Programs Be Verified?• Background: formal methods for proving program “correctness”

– Gries, Science of Computing (1981)– Dijkstra, “Guarded Commands…” (1975)

• Smith, “Limits of Correctness” (1985)– Should be required reading!!!– ∃ gap between world & our models of it

• Can’t talk about real world except via a model or theory

– Computers are doubly removed from real world:• Rely on models of models• Yet must act in real world

• Fetzer, “Program Verification: The Very Idea” (1988)– At best, can verify algorithms, not programs– Can’t logically prove that causal systems won’t fail– NB: requires firm grasp of “algorithm/program/implementation”

Philosophy of AI: Could We Build “AI”s?• Deserves course of its own!

– My own AOS; lots of student interest– 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 • Arguably, PhilCS = Turing 1936 + 1950 :-)

– 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 interpretationof the kind needed for computational cognition

Computer Ethics

• Deserves a course of its own!!– Small fraction of the course (~ 1 week)

• Moor, “What Is Computer Ethics?” (1985):– Need metaphysical/ontological theories of computers…– in order to answer ethical/social questions

about their nature & use

Computer Ethics (cont’d)

1. Should we trust decisions made by computers?

• Moor, “Are There Decisions Computers Should Never Make?” (1979)

– 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):– Only humans can be moral agents

• Johnson, “To Err Is Human” (2002)– Case where computer’s correct decision was overridden by human

Computer Ethics (cont’d)

2. Should we build “intelligent” computers?

• Lem, “Non Serviam” (1971)– What might happen if you create ALife

(and then lose your funding)

• LaChat, “AI & Ethics” (1986)– Perhaps we shouldn’t– But considering the possibility allows us to deal with:

What is a person? Should an AI with personhood have rights? Could it be moral?

Summary & Unifying Theme

• 2 overview articles:– Scheutz, “Philosophical Issues about Computation” (2002)– Smith, “Foundations of Computing” (2002)

• Unifying theme:– Relation of abstract computation to real world

• Cleland’s “mundane procedures” causally affect real world• Smith on limits of computation• Fetzer on program verification• Implementation• Software vs. hardware• Copyright vs. patent

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, etc.• Floridi, Philosophy & Computing (1999)

• Colburn, Philosophy & Computer Science (2000)– Both are monographs / Not neutral / Not ideal for intro course (?)

– Small with my topics

• Floridi, Blackwell Guide to Philosophy of Computing and Information (2004)– Anthology of original overviews (not classical papers)

– Small with my topics

• Etc.:– Monist 82(1) (1999) on PhilCS

– Minds & Machines, JETAI, CAP conference proceedings

– Websites: • Taylor, “Computational Philosophy”

• Floridi’s homepage

• Eden & Turner, “Philosophy of Computer Science”

• My course :-)

How to Teach Philosophy of CS• Thinking is best done by:

– Slow & active reading– Discussion– Writing (lots of it!)

• Expected 10-15 students, seminar setting– 30 pre-registered (gut course?)– So, posted news about lots of writing– Enrollment increased to 60!– Settled at ~50!!

• No TA to help grade• No recitation sections• (Not a unique problem in 4-year colleges!)

• A problem, nevertheless!

Solution(inspired by Lewis White Beck)

I. Required:• Attendance + reading journal– Max course grade = C

II. Optional:• 5 short position papers– Max course grade = B

III. Extra-optional assignment• Term paper XOR final exam– Max course grade = A

Solution (I):

Required Attendance & Reading Journal

1. Attend & participate in all class discussions (including “peer editing”)

2. Maintain a “reading journal”: reading assignment:

• copy interesting passages• comment on them

– To enforce (& substantiate) “active reading”• Including writing and thinking

Solution (II): Optional Short Position Papers

• 5 1-page position papers– 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• I graded ~40% of these & recorded the rest

– Each student got 2 papers fully critiqued & graded– Could re-revise for higher grade

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

• Valid?– Missing premises?

• Agree with premises (including missing ones)?– What is science?– What is CS?

• Give reasons for opinions!

Peer-Editing Instructions1. Form small groups; share papers.2. For each paper (10–15 minutes each), do:

a) Imagine peers as members of committee to make recommendation to Provost

i. Goal = to help author clarify beliefs & arguments…ii. …so that recommendation made on purely logical grounds

b) Author states/reads beliefs and reasonsc) Peers ask questions:

i. Why did you say ___ rather than ---?ii. What did you mean when you said ___? [Etc.]

d) Don’t get defensive; peers are critical, but friendly.e) Keep written record of questions/replies/advice

3. At home, revise paper; revision due in 1 week.

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!

Grading Position Papers

• Student observation:– Argument-analysis format easier to grade than “ordinary” essay

• because: fewer degrees of freedom

– Actually: students saw role of evaluation more clearly• Triage Theory of Grading (inspired by Paul Vincent Spade)

– Essays are either:• clearly acceptable A• clearly lousy F • somewhere in between C

Grading Position Papers

• Student observation:– argument-analysis format easier to grade than “ordinary” essay

• because: fewer degrees of freedom

– Actually: students saw role of evaluation more clearly• Triage Theory of Grading (inspired by Paul Vincent Spade)

– Essays are either:• clearly acceptable A• clearly lousy F [ → D]• somewhere in between C• [ not done F ]

Grading Position Papers (cont’d)

The Triage Theory (cont’d)

• Any part of an assignment is either:– clearly acceptable A (full credit)– in between C (partial credit)– clearly lousy D (minimum credit)– not done F (no credit)

• Grade in “quantum units”– Ends requests for “one extra point”

• Applicable to argument-analysis papers:– valid? / why? A..F– missing premises? A..F premise, true?/agree?

• give argument for/against A..F

– Then compute cumulative grade• Weighted sum or average

Solution (III):

Extra Optional Assignments• Term paper

– Topic approved in advance– Default topics:

• encyclopedia article on PhilCS (for “Dualists”)• your own reasoned answers to syllabus questions

(for “Multiplists”)

XOR• Take-home, short-answer, essay-style final exam

– Analytical & evaluative summaryof possible answers to syllabus questions

Statistics

98%: position papers

>80%: TP xor FE

~70%: FE (!)

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. What aspects of the course would you like to see changed?2. 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!

• At midsemester, changed to:

1(or 2) required readings per topic or class

+ 1 strongly recommended

+ 1 recommended

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 issuesor 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/philcs-complete.pdf

– contains lots of material not in published version, from course website

• Course website:

– http://www.cse.buffalo.edu/~rapaport/philcs.html– (or Google “philosophy of computer science” :-)

Recommended