Sui Prover is a formal verification tool for Move smart contracts on the Sui blockchain. This guide will help you set up your development environment and contribute to the project.
The following dependencies are required:
- Rust (latest stable)
- Z3 Theorem Prover
- .NET 8 SDK (required for Boogie)
- Boogie verification framework
# Install .NET 8 and Z3
brew install dotnet@8 z3
# Set environment variables
export DOTNET_ROOT="$(brew --prefix dotnet@8)/libexec"
export PATH="$DOTNET_ROOT/bin:$PATH"
# Install Boogie
git clone --branch master https://github.com/boogie-org/boogie.git boogie-src
cd boogie-src
dotnet build Source/Boogie.sln -c Release
export BOOGIE_EXE=$(which boogie)
export Z3_EXE=$(which z3)
# Install Sui Prover
cargo install --locked --path ./crates/sui-prover# Basic usage
sui-prover [OPTIONS]# Run tests
cd crates/sui-prover
cargo testUse this VSCode launch configuration for debugging:
{
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in executable 'sui-prover'",
"cargo": {
"args": [
"install",
"--debug",
"--path",
"./crates/sui-prover"
],
},
"env": {
"BOOGIE_EXE": "/usr/local/bin/boogie",
"DOTNET_ROOT": "/opt/homebrew/opt/dotnet@8/libexec",
"Z3_EXE": "/opt/homebrew/opt/z3/bin/z3",
},
"args": [],
"stopOnEntry": false,
"cwd": "${workspaceFolder}"
},
]
}crates/sui-prover/- Main crate for the Sui Prover toolcrates/move-model/- Move language model for formal verificationcrates/move-stackless-bytecode/- Stackless bytecode for verificationcrates/move-prover-boogie-backend/- Backend for Boogie verification
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests to ensure your changes work
- Submit a pull request