1 CS2110 Spring 2015. Concluding Lecture: History, Correctness Issues, Summary Final review session: Fri, 12 Dec. 1:00–3:00. Room TBA. Final: 2:00–4:30PM,

Slides:



Advertisements
Similar presentations
Computer History.
Advertisements

THE HISTORY OF THE COMPUTER AND THE INTERNET WRITTEN BY: DALTON PERIOD 7.
Introduction to Computers 2010 Class: ________________ Name: ________________.
By : Catherine 7th period. The first computer was made by Germany’s Konrad Zuse in his living room around the first digital computer was made.
11 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall.
There are three ages of computer Dark age Middle age Modern age
ISBN Chapter 3 Describing Syntax and Semantics.
CSCI-235 Micro-Computers in Science Course Information & Introduction.
Chapter Chapter Goals Describe the layers of a computer system Describe the concept of abstraction and its relationship to computing Describe.
Computer History Presented by Frank H. Osborne, Ph. D. © 2005 Bio 2900 Computer Applications in Biology.
Appendix The Continuing Story of the Computer Age.
History of Computers Lecture 1. History of Computers Mechanical Computers –Abacus –Jacquard Loom –Player Piano –Difference Engine –Analytical Engine –Hollerith.
Describing Syntax and Semantics
1 Chapter 1 The Big Picture. 2 2 Computing systems are dynamic entities used to solve problems and interact with their environment. They consist of devices,
Some of these slides are based on material from the ACM Computing Curricula 2005.
The Analytical Engine was so complex that Babbage didn’t have enough money to build it so he asked Parliament for a loan, but they never gave him one.
KEYBOARD – an input device used to type data.
THE HISTORY OF COMPUTERS
Computer history timeline
Chapter 1 The Big Picture Chapter Goals Describe the layers of a computer system Describe the concept of abstraction and its relationship to computing.
Chapter 01 Nell Dale & John Lewis.
R.D.D. HIGH SCHOOL, BONAIGARH
0 Conclusion Please take the time to complete the online course evaluation for all your Courses. For CS1110, completion of the evaluation is required and.
History of Programming Languages
Programming Languages CPS120: Introduction to Computer Science Lecture 5.
© Prentice-Hall, Inc Definition  Computer - An electronic device that has the ability to store, retrieve, and process data and can be programmed with.
CSCI Milestones in Computer Development Fall 2007.
"Who controls the past commands the future. Who commands the future conquers the past." -George Orwell Video to Accompany Slide Show: “Thinking Machines,
History of Computers Abacus – 1100 BC
CS 1 •This is Computer Science 1. •Who is Professor Adams?
The History of Computers. People have almost always looked for tools to aid in calculation. The human hand was probably the first tool used to help people.
-The trade of goods -The expansion of commerce -Evolution of tools for calculations A sumerian clay tablet.
1 COMS 161 Introduction to Computing Title: Computer Organization Date: March 25, 2005 Lecture Number: 27.
© Prentice-Hall, Inc Definition  Computer - An electronic device that has the ability to store, retrieve, and process data and can be programmed with.
ITGS Chapter 1: Computer history and basics. Slide 1.
Chapter 1 The Big Picture.
1 History of Computers (Excerpts from CMPE3). 2 The History of Computers The history of computers is interesting (or should be if you are in this class)
CMSC 120: Visualizing Information 1/29/08 Introduction to Computing.
1 8/29/05CS150 Introduction to Computer Science 1 Professor: Shereen Khoja
CSCI 161 Class 1 Martin van Bommel.
COMP 268 Computer Organization and Assembly Language A Brief History of Computing Architecture.
Basic History of Computing. Al-Khwarizmi written in 830, Hisab al-jabr w’al- muqabalathe al- jabr; in the title we get algebra developed the concept.
National Diploma Unit 4 Introduction to Software Development Introduction to Programming Languages.
Chapter 1 Introduction.
Why build a computer? u Computers were developed to mechanize mathematical computations. u Two definitions:  A computer is “a programmable electronic.
1 CS November 2010 insertion sort, selection sort, quick sort Do exercises on pp to get familiar with concepts and develop skill. Practice.
1 CS2110 Spring Concluding Lecture: History, Correctness Issues, Summary Final review session: Fri, 9 May. 1:00–3:00. Phillips 101. Final: 7:00–9:30PM,
Who invented the computer?
1 CS April 2010 binary search, linear search insertion sort, selection sort, quick sort Do exercises on pp to get familiar with concepts.
CS 251 C Programming for Engineers Spring 2016 Instructor: Dick Lang.
History of Computers. Do you know who this really happy looking guy is???? Charles Babbage- also known as the Father of Computers.
1 CS April 2009 Sorting: insertion sort, selection sort, quick sort Do exercises on pp to get familiar with concepts and develop skill.
1 CS100J Spring Instructor: David Gries CS100M: Matlab No prior programming experience One semester of calculus Math & engineering type problems.
1 CS November 2008 Sorting: insertion sort, selection sort, quick sort Do exercises on pp to get familiar with concepts and develop skill.
CORRECTNESS ISSUES AND LOOP INVARIANTS Lecture 8 CS2110 – Fall 2014.
1 CS April 2010 insertion sort, selection sort, quick sort Do exercises on pp to get familiar with concepts and develop skill. Practice.
History. Development Driven by Function Functions of a Programming Language –To describe computation for use by computers –To describe computation and.
Computing in the Modern World
CSCI 161: Introduction to Programming
Concurrency 3 CS 2110 – Spring 2017.
Chapter 0: Introduction
Chapter 1 The Big Picture
History of Computers Abacus – 1100 BC
Computer Applications
Conclusion CS2110 Spring 2018.
COMS 161 Introduction to Computing
Von Neumann Architecture
Professor: Shereen Khoja
CSCI-100 Introduction to Computing
Presentation transcript:

1 CS2110 Spring Concluding Lecture: History, Correctness Issues, Summary Final review session: Fri, 12 Dec. 1:00–3:00. Room TBA. Final: 2:00–4:30PM, Tuesday, 16 Dec, Barton Hall We hope to get you tentative course grades by Tuesday noon, but it may be later. You then visit the CMS and do the assignment to tell us whether you accept the grade or will take the final. There will be a message on the Piazza and the CMS about this when the tentative course grades are available.

2 About the Final Final review session: Fri, 12 Dec. 1:00–3:00. Room TBA. Final: 2:00–4:30PM, Tuesday, 16 Dec, Barton Hall Walk into final room, you must complete the final. E.g. You may not decide half way through the final that you don’t want to take it. A few students missed one of the two prelims. These students are required to take the final unless other ar- rangements have been made. Taking final may lower/raise your course grade. Past experience: taking final changes letter grade for very few —fewer than 10 in a course of 200, mostly raises.

3 About the Final Final review session: Fri, 12 Dec. 1:00–3:00. Room TBA. Final: 2:00–4:30PM, Tuesday, 16 Dec, Barton Hall Conflict with Final? Conflict: Another final at same time or >2 finals in 24 hour period Megan Gatch, Authorized extra time or quiet room? Megan Gatch,

4 CS2110 Spring Concluding Lecture: History, Correctness Issues, Summary Programming and computers: Momentous changes since the 1940s –or since even the use of punch cards and attempt at automation …

5 Punch cards Mechanical loom invented by Joseph Marie Jacquard in Used the holes punched in pasteboard punch cards to control the weaving of patterns in fabric. Punch card corresponds to one row of the design. Based on earlier invention by French mechanic Falcon in Jacquard loom Loom still used in China

6 Charles Babbage designed a “difference engine” in 1822 Compute mathematical tables for log, sin, cos, other trigonometric functions. The mathematicians doing the calculations were called computers No electricity

7 Oxford English Dictionary, 1971 Computer: one who computes; a calculator, rekoner. spec. a person employed to make calculations in an observatory, in surveying. etc. 1664: Sir T. Browne. The calendars of these computers T. Swift. A very skillful computer Walpole. Told by some nice computers of national glory Brewster Newton. To pay the expenses of a computer for reducing his observations. The mathematicians doing the calculations were called computers

8 Charles Babbage planned to use cards to store programs in his Analytical engine. (First designs of real computers, middle 1800s until his death in 1871.) First programmer was Ada Lovelace, daughter of poet Lord Byron. Privately schooled in math. One tutor was Augustus De Morgan. The Right Honourable Augusta Ada, Countess of Lovelace.

9 Herman Hollerith. His tabulating machines used in compiling the 1890 Census. Hollerith's patents were acquired by the Computing-Tabulating-Recording Co. Later became IBM. The operator places each card in the reader, pulls down a lever, and removes the card after each punched hole is counted. Hollerith 1890 Census Tabulator

10 Computers, calculating the US census

Konrad Zuse - Z1 Computer John Atanasoff and Berry (grad student). Iowa State Howard Aiken & Grace Hopper Harvard Mark I Computer John Presper Eckert & John W. Mauchly ENIAC 1 Computer 20,000 vacuum tubes later The Transistor, at Bell-labs IBM. the IBM 701. History of computers

12 How did Gries get into Computer Science? Took his only computer course. Senior, Queens College Mathematician-programmer at the US Naval Weapons Lab in Dahlgren, Virginia.

Mathematician-programmer at the US Naval Weapons Lab in Dahlgren, Virginia. CLI SEX,'M' Male? BNO IS_FEM If not, branch around L 7,MALES Load MALES into register 7; LA 7,1(,7) add 1; ST 7,MALES and store the result B GO_ON Finished with this portion IS_FEM L 7,FEMALES If not male, load FEMALES into register 7; LA 7,1(,7) add 1; ST 7,FEMALES and store GO_ON EQU * if (SEX == ‘M’) MALES= MALES + 1; else FEMALES= FEMALES + 1; Programmed in Fortran and IBM 7090 assembly language

: Big Year for Programming Languages LISP (List Processor): McCarthy, MIT (moved to Stanford). First functional programming language. No assignment statement. Write everything as recursive functions. COBOL (Common Business-Oriented Language). Became most widely used language for business, data processing. ALGOL (Algorithmic Language). Developed by an international team over a 3-year period. McCarthy was on it, John Backus was on it (developed Fortran in mid 1950’s). Gries’s soon-to-be PhD supervisor, Fritz Bauer of Munich, led the team.

Took his only computer course. Senior, Queens College Mathematician-programmer at the US Naval Weapons Lab in Dahlgren, Virginia Back to grad school, in Math, at University of Illinois Graduate Assistantship: Help two Germans write the ALCOR- Illinois 7090 Compiler. John Backus, FORTRAN, mid 1950’s: 30 people years This compiler: 6 ~people-years Today, CS compiler writing course: 2 students, one semester Dr. rer. nat. in Math in Munich Institute of Technology Asst. Professor, Stanford CS Cornell!

16 Late 1960s IBM 360 Mainframes Write programs on IBM “punch cards. Deck of cards making up a program trucked to Langmuir labs by the airport 2-3 times a day; get them back, with output, 3-4 hours later

17 About BIG STEP FORWARD 1. Write program on punch cards. 2. Wait in line (20 min) to put cards in card reader in Upson basement 3. Output comes back in 5 minutes November 1981, Terak with 56K RAM, one floppy drive: $8,935. Want 10MB hard drive? $8,000 more About Teraks Prof. Tim Teitelbaum sees opportunity. He and grad student Tom Reps develop “Cornell Program Synthesizer”. Year later, Cornell uses Teraks in its prog course. 40 lbs About BIG STEP FORWARD Switched to using the programming language Pascal, developed by Niklaus Wirth at Stanford.

Switched to Macintosh in labs 1980s CS began getting computers on their desks. Late 1980s Put fifth floor addition on Upson. We made the case that our labs were in our office and therefore we need bigger offices. Nowadays Everybody has a computer in their office Moved into Gates Hall!

19 Programming languages. Dates approximate YearMajor languagesTeach at Cornell 1956’s Fortran 1960 Algol, LISP, COBOL 1965 PL/I PL/C (1969) 1970 C 1972 Pascal 1980’s Smalltalk (object-oriented) Pascal (1980’s) 1980’s (late) C JavaC and C Java / Matlab 2011 Python / Matlab / Java

The NATO Software Engineering Conferences homepages.cs.ncl.ac.uk/brian.randell/NATO/ 7-11 Oct 1968, Garmisch, Germany Oct 1969, Rome, Italy Download Proceedings, which have transcripts of discussions. See photographs. Software crisis: Academic and industrial people. Admitted for first time that they did not know how to develop software efficiently and effectively.

21 Next years: intense period of research on software engineering, language design, proving programs correct, etc. Software Engineering, 1968

22 Software Engineering, 1968

During 1970s, 1980s, intense research on How to prove programs correct, How to make it practical, Methodology for developing algorithms 23 The way we understand recursive methods is based on that methodology. Our understanding of and development of loops is based on that methodology. Throughout, we try to give you thought habits and strategies to help you solve programming problems for effectively, e.g. Write good method specs. Keep methods short. Use method calls to eliminate nested loops. Put local variable declarations near first use. Mark Twain: Nothing needs changing so much as the habits of others.

24 The way we understand recursive methods is based on that methodology. Our understanding of and development of loops is based on that methodology. Throughout, we try to give you thought habits to help you solve programming problems for effectively Simplicity is key: Learn not only to simplify, learn not to complify. Separate concerns, and focus on one at a time. Don’t solve a problem until you know what the problem is (give precise and thorough specs). Develop and test incrementally. Learn to read a program at different levels of abstraction. Use methods and method calls so that you don’t have nested loops

25 Simplicity and beauty: keys to success CS professor's non-dilemma I do so want students to see beauty and simplicity. A language used just has to be one only with that property. Therefore, and most reasonably, I will not and do not teach C. David Gries CS has its field of computational complexity. Mine is computational simplicity, David Gries Inside every large program is a little program just trying to come out. Tony Hoare Beauty is our Business. Edsger Dijkstra Admonition a little Grook In correctness concerns one must be immersed. To use only testing is simply accursed.

We try to instil good programming habits/ thoughts 26 Write method specs before writing the body Write new methods and calls on them to keep structure simple and to shorten methods for… if … for … while … if … else for … And yet, we see 100 line methods that look like this, with no comments: Keep case analysis to a minimum if (d == Direction.E) … if (d == Direction.NE) … if (d == Direction.N) … …

Correctness of programs, the teaching of programming 27 simplicity elegance perfection intellectual honesty Dijkstra: The competent programmer is fully aware of the limited size of his own skull, so he approaches the programming task in full humility, and among other things, he avoids clever tricks like the plague. Hoare: Two ways to write a program: (1) Make it so simple that there are obviously no errors. (2) Make it so complicated that there are no obvious errors. Edsger W. Dijkstra Sir Tony Hoare

Axiomatic Basis for Computer Programming. Tony Hoare, Provide a definition of programming language statements not in terms of how they are executed but in terms of proving them correct. {precondition P} Statement S {Postcondition Q) Meaning: If P is true, then execution of S is guaranteed to terminate and with Q true

Assignment statement x= e; 29 {true} x= 5; {x = 5} {x+1 >= 0} x= x + 1; {x >= 0} {2*x = 82} x= 2*x; {x = 82} Definition of notation: P[x:= e] (read P with x replaced by e) stands for a copy of expression P in which each occurrence of x is replaced by e Example: (x >= 0)[x:= x+1] = x+1 >= 0 Definition of the assignment statement: {P[x:= e]} x= e; {P}

Assignment statement x= e; 30 {x+1 >= 0} x= x + 1; {x >= 0} {2*x = 82} x= 2*x; {x = 82} Definition of the assignment statement: {P[x:= e]} x= e; {P} { } x= 2.0*x*y + z; {x = x/6} x = x/6 2.0xy + z = (2.0xy + z)/6

If statement defined as an “inference rule”: 31 Definition of if statement: If Then {P} if (B) ST else SF {Q} {P && B} ST {Q} and {P && !B} SF {Q} The then-part, ST, must end with Q true The else-part, SF, must end with Q true

Hoare’s contribution 1969: Axiomatic basis: Definition of a language in terms of how to prove a program correct. But it is difficult to prove a program correct after the fact. How do we develop a program and its proof hand-in-hand? 32 Dijkstra showed us how to do that in His definition, called “weakest preconditions” is defined in such a way that it allows us to “calculate” a program and its proof of correctness hand-in-hand, with the proof idea leading the way. Dijkstra: A Discipline of Programming. Prentice Hall, A research monograph Gries: The Science of Programming. Springer Verlag, Undergraduate text.

How to prove concurrent programs correct. Use the principle of non-interference 33 Thread T1 {P0} S1; {P1} S2; {P2} … Sn; {Pn} Thread T2 {Q0} Z1; {Q1} Z2; {Q2} … Zm; {Qm} We have a proof that T1 works in isolation and a proof that T2 works in isolation. But what happens when T1 and T2 execute simultaneously, operating on the same variables?

How to prove concurrent programs correct. 34 Thread T1 {P0} S1; {P1} S2; {P2} … Sn; {Pn} Thread T2 {Q0} Z1; {Q1} Z2; {Q2} … Zm; {Qm} Prove that execution of T1 does not interfere with the proof of T2, and vice versa. Basic notion: Execution of Si does not falsify an assertion in T2: e.g. {Pi && Q1} S2 {Q1} Turn what previously seemed to be an exponential problem, looking at all executions, into a problem of size n*m.

Interference freedom. Susan Owicki’s Cornell thesis, under Gries, in Thread T1 {P0} S1; {P1} S2; {P2} … Sn; {Pn} Thread T2 {Q0} Z1; {Q1} Z2; {Q2} … Zm; {Qm} Prove that execution of T1 does not interfere with the proof of T2, and vice versa. Basic notion: Execution of Si does not falsify an assertion in T2: e.g. {Pi && Q1} S2 {Z2} A lot of progress since then! But still, there are a lot of hard issues to solve in proving concurrent programs correct in a practical manner.