Tutorials
These tutorials walk you through real verified algorithms step by step. Each one teaches specific ImandraX concepts and techniques while producing a complete, correct proof.
Prerequisites
Before starting these tutorials, you should be comfortable with:
- Installing ImandraX and creating
.imlfiles - Basic IML syntax: functions, types, pattern matching
- The concept of verification commands:
verify,theorem,lemma
Tutorial progression
The tutorials are ordered from introductory to advanced:
-
Sorting Algorithms: verify that insertion sort produces sorted output with the right elements. Covers induction, rewrite rules and automatic proofs.
-
Merge Sort: verify merge sort with both automatic and manual tactic proofs. Covers custom termination measures, forward-chaining rules and manual tactics.
-
Compiler Verification: verify a compiler from expressions to a stack machine. Covers custom induction schemes and compiler correctness.
-
Ripple-Carry Adder: prove a hardware adder circuit correct. Covers hardware verification, bit vectors and automatic proofs of non-trivial properties.
-
Majority Vote: prove the Boyer-Moore MJRTY voting algorithm correct. Covers using lemmas, algorithm verification and uniqueness proofs.
-
Interactive Proofs: use the VS Code goal state viewer to develop proofs step by step. Covers tactic composition and incremental proof development.