7.2 Correctness Flashcards

1
Q

What is the difference between partial and full correctness

A

Partial: All executions that terminate are correct
Full: All executions terminate and are correct

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How to prove partial correctness

A
  • Assume derive state exists
  • Determine post-condition to prove
  • Prove post-condition using loop in-variant
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Why is this invariant not strong enough (to prove post-condition for euclid)

A

Does not reference initial values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly