The TLA+ specification TendermintPBT.tla models Tendermint consensus algorithm with added clocks and proposer-based timestamps.
The script runApalache.sh runs Apalache against one of the model files in this repository. This document describes how to use it.
-
Get Apalache, by following these instructions. Summarized:
git clone https://github.com/informalsystems/apalache.gitmake package
-
Define an environment variable
APALACHE_HOMEand set it to the directory where you cloned the repository (resp. unpacked the prebuilt release).$APALACHE_HOME/bin/apalache-mcshould point to the run script. -
Execute
./runApalache.sh CMD N CM DDwhere:CMDis the command. Either "check" or "typecheck". Default: "typecheck"Nis the number of steps ifCMD=check. Ignored ifCMD=typecheck. Default: 10MCis a Boolean flag that controls whether the model checked has a 2/3+ majority of correct processes. Default: true- if
MCistrue, theMC_PBT_3C_1F.tlais used as input - if
MCisfalse, theMC_PBT_2C_2F.tlais used as input
- if
DDis a Boolean flag that controls Apalache's--discard-disabledflag (See here). Ignored ifCMD=typecheck. Default: false
The results will be written to _apalache-out (see the Apalache documentation).
Example:
./runApalache.sh check 2Checks 2 steps of MC_PBT_3C_1F.tla and
./runApalache.sh check 10 falseChecks 10 steps of MC_PBT_2C_2F.tla
A summary of experiments performed is kept in experiment_log.md.
After running a particularly significant test, copy the raw outputs from
_apalache-out to experiment_data and update experiment_log.md accordingly.
See experiment_data/May2022/ for a suggested directory layout.
Make sure to copy at least the detailed.log and run.txt files, as well as any counterexample files, if present.