CS 536 Homework 4, due Wed Nov 3
Correctness Triples and Simple Correctness Proofs
Mon, Nov 1, 2010: Fixed typo in Question 6, lines 8 and 9.
A. Why
•
Correctness triples are how we write a program with its specifcation.
•
A prooF oF a correctness triple shows that a program meets its specifcation.
B. Outcomes
AFter this homework, you should
•
Be able to do syntactic substitution.
•
Be able to fll in instances oF specifc prooF rules using correctness triples.
•
Be able to write prooFs oF correctness For simple, short programs.
C. Questions
Syntactic substitution
PerForm the indicated syntactic substitutions.
Let
P
be
(y
≥
1
∧
(
∀
x . f(x * y)
≥
x * y))
.
1.
[4 pts] What is
P
[0/y]
?
2.
[4 pts] What is
P
[y+1/y]
?
3.
[4 pts] What is
P
[x+1/x]
?
4.
[4 pts] What is
P
[x+1/y]
?
Simple Formal Proofs
5.
[24 = 6*4 pts] Rewrite the Following Formal prooF, aFter flling in the missing parts.
1.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview.
Sign up
to
access the rest of the document.
 Fall '08
 cs536
 Logic, Substitute good, formal methods, Model theory, Proof theory, formal proof

Click to edit the document details