Tutorial¶
This is the human-first on-ramp to Vow. By the end you will be able to write a Vow program, attach contracts to it, run the verifier, read a counterexample, and fix the program until it is proven correct — the core loop Vow is built around.
What you'll learn¶
- Install & first program — get the
build/vowccompiler and compile a "hello, world". - Your first contract — add a
requiresprecondition and see blame semantics in action. - The CEGIS loop — let the verifier find a bug, read the structured counterexample, and fix it.
- Loop invariants — prove properties of code that loops.
- Using the standard library — pull a verified module into your own project.
Prerequisites¶
- A Unix-like environment (Linux or macOS).
- A Rust toolchain (to build the bootstrap compiler the first time).
- ESBMC on your
PATHfor the verification steps.
Always cap memory
Every command below is prefixed with ulimit -v 2000000. The compiler and the
binaries it produces can otherwise consume all system memory. Make it a habit.
Once you're comfortable, the Language reference has the full grammar, contract semantics, and CLI details, and the Standard library documents the reusable modules.