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.git
make package
-
Define an environment variable
APALACHE_HOME
and set it to the directory where you cloned the repository (resp. unpacked the prebuilt release).$APALACHE_HOME/bin/apalache-mc
should point to the run script. -
Execute
./runApalache.sh CMD N CM DD
where:CMD
is the command. Either "check" or "typecheck". Default: "typecheck"N
is the number of steps ifCMD=check
. Ignored ifCMD=typecheck
. Default: 10MC
is a Boolean flag that controls whether the model checked has a 2/3+ majority of correct processes. Default: true- if
MC
istrue
, theMC_PBT_3C_1F.tla
is used as input - if
MC
isfalse
, theMC_PBT_2C_2F.tla
is used as input
- if
DD
is a Boolean flag that controls Apalache's--discard-disabled
flag (See here). Ignored ifCMD=typecheck
. Default: false
The results will be written to _apalache-out
(see the Apalache documentation).
Example:
./runApalache.sh check 2
Checks 2 steps of MC_PBT_3C_1F.tla
and
./runApalache.sh check 10 false
Checks 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.