Skip to content

kantp/liquidhaskell-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project contains two examples of using Liquid Haskell:

  • examples/ByteBuffer.hs : This is the ByteBuffer used by the store library. It uses Liquid Haskell to prove that there are no out-of-bounds memory accesses.
  • examples/CircularBuffer.hs : An circular buffer. It does not need to be reset, but wraps around at the end instead. It contains some Liquid Haskell annotations, and completing them is left as an execercise.

To do the exercises, you should first install Liquid Haskell https://github.com/ucsd-progsys/liquidhaskell, as described in https://github.com/ucsd-progsys/liquidhaskell/blob/develop/INSTALL.md. This repository already has Liquid Haskell in its stack.yaml file, so you can just install Z3 and then do

stack install liquidhaskell

After that, you can invoke LiquidHaskell via

stack exec -- liquid --prune-unsorted examples/ByteBuffer.hs

About

Some examples using Liquid Haskell

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published