Next: February 1995
Up: Information Science II
Previous: Problem 5 - Digital
Consider the Hoare's axioms to prove the correctness of a program.
- 1.
- Give the axiom of the assignment statement.
- 2.
- Give the inference rule of the while statement.
- 3.
- Give the inference rule for the if-then-else statement.
- 4.
- Using the fact that the while statement can be constructed
from the goto statement and the if-then-else statement,
show that the rule of (2) can be derived from the rule of (3) and the
following rule for the goto statement:
- 1.
-
- 2.
-
- 3.
-
- 4.
Reynald AFFELDT
2000-06-08