- Install CBMC. Directions for installing CBMC can be found at the official CBMC git repository
- Clone this repository with
--recurse-submodulesto pull the exact version ofjsmnwe intend to verify - On windows, we used msys2 for make.
- See the specific version of
jsmnbeing verified withgit submodule status:
> git submodule status
25647e692c7906b96ffd2b05ca54c097948e879c jsmn (v1.0.0-11-g25647e6)-
Run the entire suite of proofs with
make all -
List all available verification proofs with
make list -
Run a specific verification proof with
make $proofwhere$proofis a target found inmake list -
For help, run
make help
We aim to verify safety and liveness properties of jsmn using CBMC, a bounded model checker.
- No buffer overflows or overruns are possible
- No null pointer dereferences are possible
- No signed integer overflow resulting in undefined behavior
- No memory leaks (trivial, the library is 0 allocation)
- For all inputs up to size n (not yet chosen), the the
jsmnparser eventually returns within c*n steps where c is a constant
Each proof lives in its own directory under proofs/ and contains a:
Makefilethat will run the proof by simply runningmakeREADME.mdthat explains what the proof does