COMP4161   Logo

Advanced Topics in Software Verification

This UNSW course is about mechanical proof assistants, how they work, and what they can be used for. It is taught by members of the Trustworthy Systems group. The course presents specification and proof techniques used in industrial grade interactive theorem provers, teaches the theoretical background to the techniques involved, and shows how to use a theorem prover to conduct formal proofs in practice.

Topics include higher order logic, natural deduction, lambda calculus, term rewriting, data types and recursive functions, induction principles, and proofs about programs. See the course outline for a full content overview and prerequisites.

The course will provide hands-on experience with the proof assistant Isabelle/HOL.

Session times for 2026 T3:

  • Tue, 14:00h - 16:00h AEST @ E8 Science and Engineering Building G05 (K-E8-G05)
  • Thu, 16:00h - 18:00h AEST @ E8 Science and Engineering Building G05 (K-E8-G05)
  • Lectures are running weeks 1-5 and 7-10, delivery is hybrid in T3 2026. The Zoom link will be posted on the forum.
  • Lecture recordings can be found on Echo360 via the course moodle page.

Lectures

Slides and Isabelle files will be made available online as the lectures progress.

Lecture recordings can be found on Echo360 via the course moodle page.

Isabelle hints

Setting up Isabelle, basic rules and cheat sheet.

Textbook

Textbook, further reading, and links the tools used in the lecture.

Slides

Will become available here as course progresses.

Week 1 (A): intro

slides [pdf], slides with animations [pdf], intro demo [thy], lambda calculus demo [thy], more demo to come

Second lecture: typed lambda calculus

slides [pdf], slides with animations [pdf], demo [thy]. Lecture will continue into week 2.

Seven Bridges Exercise

slides [pdf], demo [thy], (look for FIXME sites).

Week 2 (A): HOL, natural deduction for propositional logic

slides [pdf], slides with animations [pdf], demo [thy]

Week 2 (B): HOL, quantifiers, automation

slides [pdf], slides with animations [pdf], demo [thy]

Week 3 (A): more automation, defining HOL from scratch

slides [pdf], slides with animations [pdf], HOL demo [thy] automation demo [thy] exercise template [thy]

Week 3 (B): term rewriting, confluence, termination

slides [pdf], slides with animations [pdf], introductory demo [thy] simp demo [thy]

Week 4 (A): conditional term rewriting, congruence rules, more confluence

slides [pdf], slides with animations [pdf], demo [thy]

Week 4 (B): sets, type definitions, inductive predicates

slides [pdf], slides with animations [pdf], demo [thy],

Week 5 (A): datatypes, datatype induction, primitive recursion

slides [pdf], slides with animations [pdf], demo [thy],

Week 5 (B): formal foundations of inductive predicates

slides [pdf], slides with animations [pdf], demo [thy], exercise template [thy],

Week 7(A): primrec and rule induction tutorial (regular expressions)

demo prompts [thy], demo completed [thy].

Week 7 (B): general recursive functions

slides [pdf], slides with animations [pdf], demo [thy]

Week 8 (A): automatic proof and disproof, Isar

slides [pdf], slides with animations [pdf], auto demo [thy], Isar demo [thy]

Week 8 (B): Semantics and Hoare logic

slides [pdf], slides with animations [pdf], demo [thy]

Week 9 (A): Weakest precondition, verification conditions

slides [pdf], slides with animations [pdf], demo [thy], demo solutions[thy]

Week 9 (B): Shallow Embedding, State Monads

  • slides [pdf]
  • slides with animations [pdf]
  • records demo [thy]
  • monad demo (Monads) [thy]
  • monad demo (Monads solution) [thy]
  • monad demo (GCD) [thy]
  • monad demo (GCD solution) [thy]
  • monad demo (While) [thy]

Week 10 (A): C verification, AutoCorres

slides [pdf], slides with animations [pdf], demo [thy], C file [c]

Week 10 (B): revision

slides [pdf], slides with animations [pdf],
2014 exam papers: exam [pdf], C file [c], Isabelle template [thy].
2014 exam solution: [pdf, thy].
invariant practice demo [thy] and solutions [thy].

Assignments

There will be three marked assignments in the course. The schedule and marking formula are described in the lecture slides and in the informal course outline.

Assignment 1

Assignment submission

submit using give:

give cs4161 a1 a1.thy

You can also use the web interface.

You may collect your marked assignment. Run (on a CSE machine):

~cs4161/bin/classrun -collect a1

or use the web interface.

Assignment 2

  • Assignment spec PDF and provided Isabelle material are available from the course Moodle page.
  • Spec document revision 3 has been released, fixing three minor issues.

Assignment submission

submit using give:

give cs4161 a2 a2.thy

You can also use the web interface.

Assignment 3

  • Assignment spec PDF and provided Isabelle material are available from the course Moodle page.
  • Due date: Monday 23rd November 2026

Assignment submission

submit using give:

give cs4161 a3 a3_pt1.thy a3_pt2.thy

You can also use the web interface.

Contact

Forum

We are using this Discourse forum for class discussions. Please post questions about lecture material, the assignments and so forth on the forum.

Lecturers

Consults by appointment.