Isabelle-LLVM Logo Isabelle-LLVM

Isabelle-LLVM is a verification framework for Isabelle/HOL that targets LLVM as backend. The main features are:


Getting Started

You can browse the theories or download the files. (The download link won’t work if you are browsing this from inside the downloaded archive!)

Warning: the .thy files in the download are best viewed with the Isabelle/HOL IDE.

Git Repository

The project is hosted on github

Starting Points for Browsing

Here are some default starting points for browsing the theories

Parallel Paper

Some starting points, structured according to the parallel paper:

NE Monad

M Monad Includes the parallel combinator

Memory Model Including access reports

LLVM Values stored in Memory

LLVM Instructions

Code Generator Including the template for translating llc_par

Separation Logic and VCG A bit more general than described in paper, parameterized over memory model. The general rules are proved in Sep_Generic_Wp.thy, e.g. lemma ht_par for the parallel rule. The instantiated parallel rule is ht_llc_par in Sepref_Parallel.thy.

Sepref Tool Including the parallel setup in Sepref_Parallel.thy.

Interval array data structure

With-Split Combinator, With-Idxs Combinator and its implementation on arrays.

Sorting Algorithms Contains the code export to LLVM, and the final correctness theorem. Our parallel quicksort algorithm is in Sorting_Parsort.thy, the sampling pivot finder is in Sorting_Sample_Partition.thy, and the parallel partitioner is in Sorting_Par_Partition.thy.

Verified Algorithms

Parallel Quicksort


PDQ Sort

Knuth Morris Pratt String Search

Binary Search

For the ISA-SAT verified SAT solver, see its own homepage


IICF (Isabelle-LLVM + Refinement Framework + Collection Framework)

Shallow Embedding of LLVM Semantics


Compiling and running benchmarks

To compile and run the benchmarks

cd benchmarks
./ -r
./ -r
cd sorting
make run

This will run the binary search, KMP, and parallel sorting benchmarks. Warning: We have only tested this on a Linux x86_64 platform so far. We do not (yet) know how LLVM will digest our code on other platforms.

Re-Checking the Proofs

To re-check the proofs, run

  cd thys 
  isabelle build -D.

Here, isabelle must refer to /your/path/to/Isabelle2022/bin/isabelle from your Isabelle installation. This will invoke Isabelle to check all proofs and re-generate the exported code.

Regression Test Script

To run a quick regression test script

  cd regression

This will re-check the proofs, export a few example programs, link them with C wrappers, and execute them under Valgrind’s memcheck, to detect ABI problems with header file generation and interfacing exported code from C.

Talks and Publications

ITP’22 Paper Slides

IJCAR’2020 Paper Slides

ITP’2019 Paper Slides

May 2021 Talk in Enschede

Short Presentation of the Isabelle Refinement Framework

Mar 2020 Talk in Enschede

Dec 2019 Talk in Rennes

Old Versions

The download links won’t work if you are browsing this from inside a downloaded archive!

Isabelle-LLVM 1.0 for Isabelle-2020

Isabelle-LLVM 1.1 for Isabelle-2021

Isabelle-LLVM 2.0 for Isabelle-2021