bash <(curl https://kframework.org/install)
: install kup package manager.kup install kontrol
: install Kontrol.kup list kontrol
: list available Kontrol versions.
NOTE: The first run will take longer to fetch all the libraries and compile sources. (30m to 1h)
You need to install the K Framework on your system, see the instructions there. The fastest way is via the kup package manager, with which you can do to get the correct version of K:
kup install k.openssl.procps --version v$(cat deps/k_release)
First you need to set up all the dependencies of the virtual environment using Poetry with the prerequisites python 3.8.*
, pip >= 20.0.2
, poetry >= 1.3.2
:
poetry install
In order to build kontrol
, you need to build these specific targets:
poetry run kevm-dist --verbose build -j3 evm-semantics.plugin evm-semantics.haskell kontrol.foundry
To change the default compiler:
CXX=clang++-14 poetry run kevm-dist --verbose build -j3 evm-semantics.plugin evm-semantics.haskell kontrol.foundry
On Apple Silicon:
APPLE_SILICON=true poetry run kevm-dist --verbose build -j3 evm-semantics.plugin evm-semantics.haskell kontrol.foundry
Targets can be cleaned with:
poetry run kevm-dist clean
For more information, refer to kevm-dist --help
.
Use make
to run common tasks (see the Makefile for a complete list of available targets).
make build
: Build wheelmake check
: Check code stylemake format
: Format codemake test-unit
: Run unit tests
To update the expected output of the tests, use the --update-expected-output
flag:
make cov-integration TEST_ARGS="--numprocesses=8 --update-expected-output"
For interactive use, spawn a shell with poetry shell
(after poetry install
), then run an interpreter.
- KEVM: Formal model of EVM in K Framework.
- EVM Yellowpaper: Original specification of EVM.
For more information about the K Framework, refer to these sources:
- The K Tutorial
- Semantics-Based Program Verifiers for All Languages
- Reachability Logic Resources
- Matching Logic Resources
- Logical Frameworks: Discussion of logical frameworks.