Program correctness

Learning Outcomes:

2. Explain why the creation of correct program components is important in the production of high-quality software. [Familiarity]

3. Identify common coding errors that lead to insecure programs (e.g., buffer overflows, memory leaks, malicious code) and apply strategies for avoiding such errors. [Usage]

4. Conduct a personal code review (focused on common coding errors) on a program component using a provided checklist. [Usage]

5. Contribute to a small-team code review focused on component correctness. [Usage]

6. Describe how a contract can be used to specify the behavior of a program component. [Familiarity]

    • Types of errors (syntax, logic, run-time)

    • The concept of a specification

    • Defensive programming (e.g. secure coding, exception handling)

    • Code reviews

    • Testing fundamentals and test-case generation

    • The role and the use of contracts, including pre- and post-conditions

    • Unit testing