250 likes | 426 Views
CSC 490 - Senior Seminar I. This is your most important class!. CSC 490 - Senior Seminar I. Written Homework Assignment #1 due. Systems Assignment 1 topic due next time Systems Assignment 0 returned. CSC 490 - Senior Seminar I. Sassn0 grading. issues of “professional programming practice”.
E N D
CSC 490 - Senior Seminar I This is your most important class!
CSC 490 - Senior Seminar I Written Homework Assignment #1 due Systems Assignment 1 topic due next time Systems Assignment 0 returned
CSC 490 - Senior Seminar I Sassn0 grading issues of “professional programming practice”
CSC 490 - Senior Seminar I meaningful identifiers useful comments indentation input prompts output formatting …
CSC 490 - Senior Seminar I NTO text chapter 10 first read (abstraction) second read (cognition) refer to supplemental texts
CSC 490 - Senior Seminar I Program Correctness two approaches 1. testing 2. proof
CSC 490 - Senior Seminar I 1. testing recall CSC370 discussion {test data set} input --> Program --> output {verify}
CSC 490 - Senior Seminar I to verify … compare actual program outputs to expected outputs determined beforehand
CSC 490 - Senior Seminar I testing is hard: - must determine expected outputs beforehand (manually perhaps) - must choose good test data sets
CSC 490 - Senior Seminar I can’t fully test most programs are too large to fully test - all paths - all inputs
CSC 490 - Senior Seminar I testing only shows presence of errors it can’t prove their absence
CSC 490 - Senior Seminar I purpose of testing is to show errors testing can not show that a program is correct
CSC 490 - Senior Seminar I Program Correctness two approaches 1. testing 2. proof
CSC 490 - Senior Seminar I 2. proof
CSC 490 - Senior Seminar I initial work of Tony C.A.R. Hoare young dude old dude beards are cool
CSC 490 - Senior Seminar I “An axiomatic basis for computer programming” program proofs are inductive after assertions are made on the structure
CSC 490 - Senior Seminar I model: {P} C {Q} make assertions{P} = pre; {Q} = postC = command /instruction prove structure is correct
CSC 490 - Senior Seminar I use valid logic
CSC 490 - Senior Seminar I mathematical induction step 1 – base case step 2 - induction
CSC 490 - Senior Seminar I example: prove that 3n >= 2n + 1 if n >= 1
CSC 490 - Senior Seminar I importance of proof some (many) programs are too large and too critical to completely test
CSC 490 - Senior Seminar I NTO p. 63ff note: debugging is nottesting if proof is correct … if proof fails …
CSC 490 - Senior Seminar I NTO p. 64 a sudden “jump”Euclid’s algorithm follow algorithm p. 65
CSC 490 - Senior Seminar I NTO p. 66 follow proof …