This preview shows pages 1–2. Sign up to view the full content.
1
UVa CS205 Engineering Software 081117
Program Verification
“There are two ways of
constructing a software design.
One way is to make it so simple
that there are
obviously
no
deficiencies.
And the other way is
to make it so complicated that
there are
no obvious
deficiencies.”
Sir Tony Hoare,
1980 Turing award lecture
UVa CS205 Engineering Software 081117
Axiomatic Semantics
±
Reason about programs using axioms
(mathematical rules about program text fragments)
±
Depends on informal (almost formal) understanding
of logic
±
Allows reasoning about all possible executions
±
Can prove interesting properties about
some
programs
²
Not possible to prove any interesting properties about an
arbitrary
program (Halting problem)
UVa CS205 Engineering Software 081117
FloydHoare Rules
P { code fragment } Q
Partial correctness:
For all execution states which satisfy
P
,
if
the
code
fragment
terminates, the resulting execution state
satisfies
Q
.
Total correctness:
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.
 Spring '08
 Humphreys,G

Click to edit the document details