COMP4161

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:

  • Mon, 14:00h - 16:00h AEST @ K15 Old Main Building G32 (K-K15-G32)
  • Thu, 14:00h - 16:00h AEST @ E19 Patricia O'Shane G05 (K-E19-G05)
  • Lectures are running weeks 1-5 and 7-10, delivery is hybrid in T3 2025. The Zoom link has been posted on the forum.

Lectures

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

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 calculs demo [thy]

Week 1 (B): typed lambda calculus

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

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: conditional term rewriting, congruence rules, more confluence

slides [pdf], slides with animations [pdf], demo [thy] - Note, there was only one lecture in Week 4 due to the public holiday.

Week 5 (A): sets, type definitions, inductive predicates

slides [pdf], slides with animations [pdf], demo [thy], demo solution [thy] - Note, we started covering this content in Week 4.

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

slides [pdf], slides with animations [pdf], demo [thy], demo solution [thy], regex demo prompts [thy], regex demo solution [thy] - Note, we started covering this content in Week 5's Monday lecture.

Week 7 (A): inductive predicates, rule induction formally

slides [pdf], slides with animations [pdf], demo [thy], exercise template [thy], exercise solution [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 (part 1) [thy] Isar demo (part 2) [thy]

Week 8 (B): Semantics and Hoare logic

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

Assignment 1

  • Assignment pdf and Isabelle template are available from the course Moodle page.
  • LaTeX style for type trees (optional) [sty]

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.
  • Revision 1: Ensure question names agree between theory and PDF.

Assignment submission

submit using give:

give cs4161 a2 a2.thy

You can also use the web interface.

Assignment 3

To be announced

Exam

The exam is a 24h take-home exam.

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.