harlanhaskins / improve

A program verifier for IMP (Fall 2017 Programming Language Theory assignment)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

improve

improve is a verifier for a small language called imp. An example imp file is available in this repo, under example.imp.

Usage

improve [-c|-h] file.imp

The theorem prover has 3 modes:

  • improve -c file.imp will generate a .png of the control flow graph of file.imp.
  • improve -h file.imp will print the horn clauses generated by doing a DFS of the control flow graph, taking assignments into account.
  • improve file.imp will use z3 to evaluate the horn clauses generated by improve -h, and will tell you if the program is correct or incorrect.

Building

improve is written in Swift and builds with the Swift package manager. To build it, simply invoke

swift build

in the root directory. This will give you a binary at .build/debug/improve.

Author

Harlan Haskins

About

A program verifier for IMP (Fall 2017 Programming Language Theory assignment)


Languages

Language:Swift 100.0%