60 likes | 255 Views
Reading Assignment 1 Program verification: Attack and Defense. Program Verification. Fact: mechanical verification of software would improve software productivity, reliability, efficiency Fact: such systems are still in experimental stage After 40 years !
E N D
Reading Assignment 1Program verification: Attack and Defense
Program Verification • Fact: mechanical verification of software would improve software productivity, reliability, efficiency • Fact: such systems are still in experimental stage • After 40 years ! • Research has revealed formidable obstacles • Many believe that program verification is dead
Program Verification • Myth: • “Think of the peace of mind you will have when the verifier finally says “Verified”, and you can relax in the mathematical certainty that no more errors exist” • Answer: • Use instead to find bugs (like more powerful type checkers) • We should change “verified” to “Sorry, I can’t find more bugs”
Program Verification • Fact: • Many logical theories are undecidable or decidable by super-exponential algorithms • There are theorems with super-exponential proofs • Answer: • Such limits apply to human proof discovery as well • If the smallest correctness argument of program P is huge then how did the programmer find it? • Theorems arising in PV are usually shallow but tedious
Program Verification • Opinion: • Mathematicians do not use formal methods to develop proofs • Why then should we try to verify programs formally? • Answer: • In programming, we are often lacking an effective formal framework for describing and checking results • Comsider the statements • The area bounded by y=0, x=1 and y=x2 is 1/3 • By splicing two circular lists we obtain another circular list with the union of the elements
Program Verification • Fact: • Verification is done with respect to a specification • Is the specification simpler than the program ? • What if the specification is not right ? • Answer: • Developing specifications is hard • Still redundancy exposes many bugs as inconsistencies • We are interested in partial specifications • An index is within bounds, a lock is released