Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tchajed/iris-bank-demo

Demo of using Iris to prove a simple property of a concurrent program
https://github.com/tchajed/iris-bank-demo

concurrency coq iris

Last synced: 9 days ago
JSON representation

Demo of using Iris to prove a simple property of a concurrent program

Awesome Lists containing this project

README

        

# Iris demo of a concurrent bank

[![CI](https://github.com/tchajed/iris-bank-demo/workflows/CI/badge.svg)](https://github.com/tchajed/iris-bank-demo/actions)

Demo of using Iris to prove an that the balances of a concurrent bank sum to
zero.

The setup here is to create a "bank", which consists of two balances (which are
mathematical integers). The bank has two operations: a `transfer` operation to
move from one account to the other and a `check_consistency` operation that
locks both balances and checks if the balances add up to zero. What we prove is
that `check_consistency` always returns true, even with concurrent `transfer`s.

The demo is entirely in a single well-commented Coq file [bank.v](src/bank.v).

## Compiling

To compile, just run `make`. You'll need Coq with a development version of Iris installed.