Csc 490 senior seminar i
Download
1 / 25

CSC 490 - Senior Seminar I - PowerPoint PPT Presentation


  • 122 Views
  • Uploaded on

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

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' CSC 490 - Senior Seminar I' - cybele


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Csc 490 senior seminar i
CSC 490 - Senior Seminar I

This is your most important class!


Csc 490 senior seminar i1
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 i2
CSC 490 - Senior Seminar I

Sassn0 grading

issues of “professional programming practice”


Csc 490 senior seminar i3
CSC 490 - Senior Seminar I

meaningful identifiers

useful comments

indentation

input prompts

output formatting


Csc 490 senior seminar i4
CSC 490 - Senior Seminar I

NTO text

chapter 10

first read (abstraction)

second read (cognition)

refer to supplemental texts


Csc 490 senior seminar i5
CSC 490 - Senior Seminar I

Program Correctness

two approaches

1. testing

2. proof



Csc 490 senior seminar i7
CSC 490 - Senior Seminar I

1. testing

recall CSC370 discussion

{test data set} input

--> Program -->

output {verify}


Csc 490 senior seminar i8
CSC 490 - Senior Seminar I

to verify …

compare actual program outputs to expected outputs determined beforehand


Csc 490 senior seminar i9
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 i10
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 i11
CSC 490 - Senior Seminar I

testing only shows presence of errors

it can’t prove their absence


Csc 490 senior seminar i12
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 i13
CSC 490 - Senior Seminar I

Program Correctness

two approaches

1. testing

2. proof



Csc 490 senior seminar i15
CSC 490 - Senior Seminar I

initial work of Tony C.A.R. Hoare

young dude

old dude

beards are cool


Csc 490 senior seminar i16
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 i17
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 i19
CSC 490 - Senior Seminar I

mathematical induction

step 1 – base case

step 2 - induction


Csc 490 senior seminar i20
CSC 490 - Senior Seminar I

example:

prove that 3n >= 2n + 1 if n >= 1


Csc 490 senior seminar i21
CSC 490 - Senior Seminar I

importance of proof

some (many) programs are too large and too critical to completely test


Csc 490 senior seminar i22
CSC 490 - Senior Seminar I

NTO p. 63ff

note: debugging is nottesting

if proof is correct …

if proof fails …


Csc 490 senior seminar i23
CSC 490 - Senior Seminar I

NTO p. 64

a sudden “jump”Euclid’s algorithm

follow algorithm p. 65


Csc 490 senior seminar i24
CSC 490 - Senior Seminar I

NTO p. 66

follow proof …


ad