TikhonJelvis / imp

Some scripts for analyzing IMP programs with the Z3 automatic theorem prover, originally written for my Compose 2016 talk.
http://jelv.is/talks/compose-2016
BSD 3-Clause "New" or "Revised" License
16 stars 1 forks source link

Analyzing IMP Programs

Some code for analyzing IMP programs with Z3, originally written for my Compose 2016 talk.

IMP is a tiny imperative language usually used to teach about formal semantics. Its operational semantics are particularly simple, which also makes it a great candidate to compile to Z3.

The code here is broken up into a few modules:

For now, the code is pretty rough, and a bunch of things (like how far to unroll loops) are just constants. To unroll loops a different amount, you have to change bound in ImpToZ3! Think of them as handy but hacky scripts rather than a full program.

If you have problems building this, please tell me. I've been using Nix for it (hence the .nix file), so I haven't set any bounds in my .cabal file. That'll probably cause problems down the line…