Presented by

  • Miki Tanaka

    Miki Tanaka

    Miki is a senior proof engineer at Trustworthy Systems Group, UNSW Sydney and has been working on various formal verification projects on microkernels, operating systems and programming languages, using theorem provers Isabelle/HOL and HOL4. Miki worked on the verification of microkernel seL4, on various architecture ports, etc., for a few years, before working on the programming language Pancake. Miki has also been involved in teaching formal verification courses for almost a decade and supervising various undergraduate and postgraduate students.

Abstract

I will present Pancake, a formal programming language for verified systems programming, which I have been developing as part of Trustworthy Systems group at UNSW Sydney, in collaboration with other partners. Pancake will allow you to write system components such as device drivers with clear semantics and you can verify their correctness.

I say "formal language" because Pancake is developed entirely in a theorem prover: the abstract syntax and semantics of Pancake and its many intermediate languages, as well as each of the compiler passes, are defined using higher-order logic (HOL), which is essentially a functional programming language. The correctness of the Pancake compiler is formally proved as a theorem stating that the composition of all the passes preserves the semantics. The binary is bootstrapped from the HOL compiler, providing the guarantee that the binary has the same behaviours as the source. Pancake is a "sibling" language of CakeML, which is an open-source implementation of Standard ML with a verified compiler.

Pancake also has a verification tool - Pancake-to-Viper transpiler - a framework for verifying programs written in Pancake using the automated SMT-based deductive verifier Viper. We first annotate a Pancake program with the specifications, i.e., expected pre-conditions and post-conditions, which we then apply the transpiler whose output will be fed to the Viper backend for verification.

We have written device drivers for LionsOS in Pancake and verified its correctness using Pancake's verification tool. This driver has performance comparable to C and will soon be avaialble as a LionsOS component.