CS336f102. - Objective: Lecture 2 CS336 f10 Learning to...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Lecture 2 CS336 f10 Objective: Learning to communicate • Equivalence style proofs • Quantifiers • Writing specifications • Weakening/strengthening • Hoare triples • Weakest preconditions Why should we care? Dijkstra [2000] recently made the following observations: (i) When exhaustive testing is impossible—i.e., almost always—our trust can only be based on proof (be it mechanized or not). (ii) A program for which it is not clear why we should trust it, is of dubious value. (iii) A program should be structured in such a way that the argument for its correctness is feasible and not unnecessarily laborious. (iv) Given the proof, deriving a program justified by it, is much easier than, given the program, constructing a proof justifying it. Why should we care? • This semester we will begin by examining program verification and then goal oriented programming. • We’ll need to document our programs with predicates. • We will need to be able to manipulate logical expressions to reason about programs. Along with the basic equivalences, today’s tools will help us reason. Equivalence style proof of p ( q p ). Proof:
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

CS336f102. - Objective: Lecture 2 CS336 f10 Learning to...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online