lmanini / kontrol

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kontrol

Fast Installation

  • 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)

Build from source

K Framework

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)

Poetry dependencies

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

Build using the virtual environment

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.

For developers

Use make to run common tasks (see the Makefile for a complete list of available targets).

  • make build: Build wheel
  • make check: Check code style
  • make format: Format code
  • make 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.

Resources

For more information about the K Framework, refer to these sources:

About


Languages

Language:Python 51.2%Language:Solidity 44.7%Language:Nix 2.1%Language:Shell 0.8%Language:Makefile 0.8%Language:Dockerfile 0.5%