Program Correctness William Groesbeck, Sam Delaney Program Correctness What is program correctness? Program Correctness What is program correctness? • A program is said to be correct if it produces the correct output for every possible input Program Correctness Two types of correctness: • Total – algorithm always returns at least one correct solution • Partial – if a solution is returned, it will be correct Program Correctness Tony Hoare –