Correctness by Construction for Probabilistic Programs

Professor Carroll Morgan

Picture of Liang Zheng

Written by: Liang Zheng
6 Sep 2023


Professor Carroll Morgan
Professor Carroll Morgan

Time: 2-3pm, Wednesday 6 September 2023

Location: Innovation Space, Level 2, Birch Building 35


The “correct by construction” paradigm is an important component of modern Formal Methods. This talk illustrates its purpose and benefits by example, constructing a far-from-obvious probabilistic program whose correctness is evident “every step of the way”. That is made possible by a correctness-preserving refinement relation (between program fragments) that, starting from a compact, abstract specification, is used to construct gradually more concrete, executable code by applying mathematical insights in a systematic and layered style — a style that moreover suggests to the programmer “en route” what each construction step should be. The simple programming language chosen is pGCL, a probabilistic extension of Dijkstra’s language of guarded commands; and the target program implements probabilistic choice from any given discrete distribution, using only a series of fair-coin flips. (A final transileration from pGCL into Python is given, and a test run shown.)


Carroll Morgan is currently Professor at UNSW’s School of Computer Science and Engineering, and Trustworthy Systems; he is also an Honorary Professor at Macquarie University. His research interests include formal specification and program development by refinement, probabilistic semantics, concurrency and quantitative information flow (cyber security). He studied at UNSW (BSc) and Sydney University (PhD); and he joined Oxford University’s Computer Laboratory in 1982. He returned to Australia in 2000.

He is also involved with developing international standards in programming and informatics as an active member International Federation for Information Processing (IFIP) Working Groups 2.1, 2.3, 1.3 and 1.7. As well as its main theme of Algorithmic Languages and Calculi, WG 2.1 in particular specified, maintains, and supports the programming languages ALGOL 60 and ALGOL 68.

You are on Aboriginal land.

The Australian National University acknowledges, celebrates and pays our respects to the Ngunnawal and Ngambri people of the Canberra region and to all First Nations Australians on whose traditional lands we meet and work, and whose cultures are among the oldest continuing cultures in human history.

arrow-left bars search times arrow-up