ACE Take-Away: Lect No.1 Correctness
Ch'i YU Lv3

Take-Away Notes for Module COMP2048.

Termination, Partial Correctness and Total Correctness.

  • Proofread
  • Reviewed

Definition

Termination

For every legal input , the algorithm halts / terminates when it runs on .

Partial Correctness

For every legal input , if the algorithm terminates when it runs on , then the specified relationship holds between and the resulting output set.

aka.

If the algorithm terminates(but not guaranteed to terminate), it produces the desired output.

Total Correctness

For every legal input , the algorithm indeed terminates and the specified relationship holds between and the resulting output set.

aka.

The algorithm is guaranteed to terminate and it produces the desired output for all legal inputs.


Formula

Prerequisites

: the set of all the legal input;

: the algorithm terminates when it runs on ;

: the specified relationship holds between and the output;

Termination

Partial Correctness

Total Correctness


Correctness VS Test

TBC. Please refer to the slides (Page 18-22) for more information.