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 offile.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 usez3
to evaluate the horn clauses generated byimprove -h
, and will tell you if the program iscorrect
orincorrect
.
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