Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iteration on TLC wrapper script #6513

Merged
merged 37 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
45e6f9d
initial
achamayou Sep 30, 2024
bb36d91
Merge branch 'main' into tlc_cli
achamayou Sep 30, 2024
3723fde
Expand flags, format Python under tlc/ too
achamayou Sep 30, 2024
818ce7d
Just \
achamayou Sep 30, 2024
748094f
more options
achamayou Sep 30, 2024
7970fd0
TV args
achamayou Sep 30, 2024
39f2fcd
sim
achamayou Oct 1, 2024
eaea02f
remove tlc.sh
achamayou Oct 1, 2024
f453c09
Merge branch 'main' into tlc_cli
achamayou Oct 1, 2024
896df7f
MaxTermCount
achamayou Oct 1, 2024
7e6ba36
request count
achamayou Oct 1, 2024
f29a07a
disable-check-quorum
achamayou Oct 1, 2024
601fb04
compact
achamayou Oct 1, 2024
12a8941
compact
achamayou Oct 1, 2024
8cfb13a
slashdot
achamayou Oct 1, 2024
73adfa6
renames
achamayou Oct 1, 2024
e1038fd
comment
achamayou Oct 1, 2024
a36b9bc
.
achamayou Oct 1, 2024
5fc533a
subcommands
achamayou Oct 1, 2024
65aacf7
Update tla/consensus/MCccfraft.tla
achamayou Oct 1, 2024
bdc98a1
Merge branch 'main' into tlc_cli
achamayou Oct 1, 2024
44b41f5
wrong order
achamayou Oct 1, 2024
5dc277a
Update tla/tlc.py
achamayou Oct 1, 2024
d8c2895
Update tla/tlc.py
achamayou Oct 1, 2024
15c23fc
Update tla/tlc.py
achamayou Oct 1, 2024
82a7329
ci
achamayou Oct 1, 2024
0a2535c
-x -n
achamayou Oct 1, 2024
a64ff54
traces
achamayou Oct 1, 2024
cef81be
ccf raft trace
achamayou Oct 2, 2024
d85c1f9
term count
achamayou Oct 2, 2024
0fc1238
request count
achamayou Oct 2, 2024
c1b13ba
max
achamayou Oct 2, 2024
b3e7566
max
achamayou Oct 2, 2024
9e256c2
difftrace, and make -n output directly executable for easy append
achamayou Oct 2, 2024
a6cf05d
difftrace, and make -n output directly executable for easy append
achamayou Oct 2, 2024
8c56c63
description
achamayou Oct 2, 2024
c35cf49
Merge branch 'main' into tlc_cli
achamayou Oct 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 0 additions & 33 deletions .azure-pipelines-templates/simulation.yml

This file was deleted.

37 changes: 0 additions & 37 deletions .azure-pipelines-templates/trace_validation.yml

This file was deleted.

142 changes: 56 additions & 86 deletions .github/workflows/ci-verification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,40 +24,25 @@ jobs:
runs-on: [self-hosted, 1ES.Pool=gha-virtual-ccf-sub]
container:
image: ghcr.io/microsoft/ccf/ci/default:build-25-07-2024
defaults:
run:
working-directory: tla

steps:
- uses: actions/checkout@v4
- run: |
- name: Install TLC dependencies
achamayou marked this conversation as resolved.
Show resolved Hide resolved
run: |
sudo apt update
sudo apt install -y default-jre
python3 ./tla/install_deps.py

- name: consistency/MCSingleNode.cfg
run: |
cd tla/
./tlc.sh -workers auto consistency/MCSingleNode.tla -dumpTrace json MCSingleNode.json

- name: consistency/MCSingleNodeReads.cfg
run: |
cd tla/
./tlc.sh -workers auto consistency/MCSingleNodeReads.tla -dumpTrace json MCSingleNodeReads.json

- name: consistency/MCMultiNode.cfg
run: |
cd tla/
./tlc.sh -workers auto consistency/MCMultiNode.tla -dumpTrace json MCMultiNode.json

- name: consistency/MCMultiNodeReads.cfg
run: |
cd tla/
./tlc.sh -workers auto consistency/MCMultiNodeReads.tla -dumpTrace json MCMultiNodeReads.json
python3 install_deps.py

- name: consistency/MCMultiNodeReadsAlt.cfg
run: |
cd tla/
./tlc.sh -workers auto consistency/MCMultiNodeReadsAlt.tla -dumpTrace json MCMultiNodeReadsAlt.json
- run: ./tlc.py mc consistency/MCSingleNode.tla
- run: ./tlc.py mc consistency/MCSingleNodeReads.tla
- run: ./tlc.py mc consistency/MCMultiNode.tla
- run: ./tlc.py mc consistency/MCMultiNodeReads.tla
- run: ./tlc.py mc consistency/MCMultiNodeReadsAlt.tla

- name: Upload TLC's out file as an artifact. Can be imported into the TLA+ Toolbox.
- name: Upload TLC traces
achamayou marked this conversation as resolved.
Show resolved Hide resolved
uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
Expand All @@ -69,45 +54,41 @@ jobs:
counterexamples-consistency:
name: Counterexamples - Consistency
runs-on: ubuntu-latest
defaults:
run:
working-directory: tla

steps:
- uses: actions/checkout@v4
- run: python3 ./tla/install_deps.py

- name: consistency/MCSingleNodeCommitReachability.cfg
run: |
cd tla/
./tlc_debug.sh -workers auto -config consistency/MCSingleNodeCommitReachability.cfg consistency/MCSingleNodeReads.tla

- name: consistency/MCMultiNodeCommitReachability.cfg
run: |
cd tla/
./tlc_debug.sh -workers auto -config consistency/MCMultiNodeCommitReachability.cfg consistency/MCMultiNodeReads.tla

- name: consistency/MCMultiNodeInvalidReachability.cfg
- name: Install TLC dependencies
run: |
cd tla/
./tlc_debug.sh -workers auto -config consistency/MCMultiNodeInvalidReachability.cfg consistency/MCMultiNodeReads.tla
sudo apt update
sudo apt install -y default-jre
python3 install_deps.py

- name: consistency/MCMultiNodeReadsNotLinearizable.cfg
run: |
cd tla/
./tlc_debug.sh -workers auto -config consistency/MCMultiNodeReadsNotLinearizable.cfg consistency/MCMultiNodeReads.tla
- run: ./tlc_debug.sh --config consistency/MCSingleNodeCommitReachability.cfg mc consistency/MCSingleNodeReads.tla
- run: ./tlc_debug.sh --config consistency/MCMultiNodeCommitReachability.cfg mc consistency/MCMultiNodeReads.tla
- run: ./tlc_debug.sh --config consistency/MCMultiNodeInvalidReachability.cfg mc consistency/MCMultiNodeReads.tla
- run: ./tlc_debug.sh --config consistency/MCMultiNodeReadsNotLinearizable.cfg mc consistency/MCMultiNodeReads.tla

simulation-consistency:
name: Simulation - Consistency
runs-on: ubuntu-latest
defaults:
run:
working-directory: tla

steps:
- uses: actions/checkout@v4
- run: python3 ./tla/install_deps.py

- name: consistency/MultiNodeReads.cfg
- name: Install TLC dependencies
run: |
cd tla/
./tlc.sh -workers auto -simulate num=500 -depth 50 consistency/MultiNodeReads.tla -dumpTrace json MultiNodeReads.json
sudo apt update
sudo apt install -y default-jre
python3 install_deps.py

- name: Upload traces in TLA and JSON format
- run: ./tlc.py sim --num 500 --depth 50 consistency/MultiNodeReads.tla

- name: Upload TLC traces
uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
Expand All @@ -121,33 +102,23 @@ jobs:
runs-on: [self-hosted, 1ES.Pool=gha-virtual-ccf-sub]
container:
image: ghcr.io/microsoft/ccf/ci/default:build-25-07-2024
defaults:
run:
working-directory: tla

steps:
- uses: actions/checkout@v4
- run: |
- name: Install TLC dependencies
run: |
sudo apt update
sudo apt install -y default-jre
python3 ./tla/install_deps.py

- name: MCabs.cfg
run: |
set -x
cd tla/
./tlc.sh -workers auto consensus/MCabs.tla -dumpTrace tla MCabs.trace.tla -dumpTrace json MCabs.json

- name: MCccfraft - Configurations=1C2N
run: |
set -x
cd tla/
Configurations=1C2N MaxTermLimit=2 RequestLimit=3 ./tlc.sh -workers auto consensus/MCccfraft.tla -dumpTrace tla MCccfraft1C2NT2R3.trace.tla -dumpTrace json MCccfraft1C2NT2R3.json
python3 install_deps.py

- name: MCccfraft - Configurations=1C3N
run: |
set -x
cd tla/
Configurations=1C3N MaxTermLimit=2 RequestLimit=3 ./tlc.sh -workers auto consensus/MCccfraft.tla -dumpTrace tla MCccfraft1C3N2T3R.trace.tla -dumpTrace json MCccfraft1C3N2T3R.json
- run: ./tlc.py mc consensus/MCabs.tla
- run: ./tlc.py --trace-name 1C2N mc --term-count 2 --request-count 2 --raft-configs 1C2N consensus/MCccfraft.tla
- run: ./tlc.py --trace-name 1C3N mc --term-count 2 --request-count 2 --raft-configs 1C3N consensus/MCccfraft.tla

- name: Upload TLC's out file as an artifact. Can be imported into the TLA+ Toolbox.
- name: Upload TLC traces
uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
Expand All @@ -159,29 +130,28 @@ jobs:
simulation-consensus:
name: Simulation - Consensus
runs-on: ubuntu-latest
defaults:
run:
working-directory: tla

steps:
- uses: actions/checkout@v4
- run: |
- name: Install TLC dependencies
run: |
sudo apt update
sudo apt install -y default-jre
python3 ./tla/install_deps.py
python3 install_deps.py

- name: Simulation
run: |
set -x
cd tla/
./tlc.sh -workers auto -simulate -depth 500 consensus/SIMccfraft.tla -dumpTrace tla SIMccfraft.trace.tla -dumpTrace json SIMccfraft.json
env:
SIM_TIMEOUT: 1200
- run: ./tlc.py sim consensus/SIMccfraft.tla

- name: Upload artifacts.
- name: Upload TLC traces
uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: tlc-simulation-consensus
path: |
tla/*
tla/consensus/*_TTrace_*.tla
tla/*.json

trace-validation-consensus:
name: Trace Validation - Consensus
Expand All @@ -193,11 +163,11 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: |
- name: Install TLC dependencies
run: |
sudo apt update
sudo apt install -y default-jre parallel
python3 ./tla/install_deps.py
shell: bash

- name: "Build"
run: |
Expand All @@ -223,7 +193,7 @@ jobs:
cd tla/
mkdir -p traces/consensus
mv ../build/consensus traces/
parallel 'JVM_OPTIONS=-Dtlc2.tool.queue.IStateQueue=StateDeque JSON={} ./tlc.sh -dump dot,constrained,colorize,actionlabels {}.dot -dumpTrace tla {}.trace.tla -dumpTrace json {}.trace.json consensus/Traceccfraft.tla' ::: $(ls traces/consensus/*.ndjson)
parallel './tlc.py --workers 1 --dot --trace-name {} tv --ccf-raft-trace {} consensus/Traceccfraft.tla' ::: $(ls traces/consensus/*.ndjson)
shell: bash

- name: Upload artifacts.
Expand Down
44 changes: 20 additions & 24 deletions .github/workflows/long-verification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,20 @@ jobs:
runs-on: [self-hosted, 1ES.Pool=gha-virtual-ccf-sub]
container:
image: ghcr.io/microsoft/ccf/ci/default:build-25-07-2024
defaults:
run:
working-directory: tla

steps:
- uses: actions/checkout@v4
- run: |
sudo apt update
sudo apt install -y default-jre
python3 ./tla/install_deps.py
python3 install_deps.py

- name: MCccfraft - Configurations=2C2N (atomic reconf) MaxTermLimit=4 RequestLimit=3 NoCheckQuorum
run: |
set -x
cd tla/
Configurations=2C2N MaxTermLimit=4 RequestLimit=1 NoCheckQuorum= ./tlc.sh -workers auto consensus/MCccfraft.tla -dumpTrace tla MCccfraft2C2N4T1R.trace.tla -dumpTrace json MCccfraft2C2N4T1R.json
- run: ./tlc.py --trace-name 2C2N mc --term-count 2 --request-count 0 --raft-configs 2C2N --disable-check-quorum consensus/MCccfraft.tla

- name: Upload TLC's out file as an artifact. Can be imported into the TLA+ Toolbox.
- name: Upload TLC traces
uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
Expand All @@ -52,21 +51,20 @@ jobs:
runs-on: [self-hosted, 1ES.Pool=gha-virtual-ccf-sub]
container:
image: ghcr.io/microsoft/ccf/ci/default:build-25-07-2024
defaults:
run:
working-directory: tla

steps:
- uses: actions/checkout@v4
- run: |
sudo apt update
sudo apt install -y default-jre
python3 ./tla/install_deps.py
python3 install_deps.py

- name: MCccfraft - Configurations=3C2N MaxTermLimit=4 RequestLimit=1 NoCheckQuorum
run: |
set -x
cd tla/
Configurations=3C2N MaxTermLimit=4 RequestLimit=1 NoCheckQuorum= ./tlc.sh -workers auto consensus/MCccfraft.tla -dumpTrace tla MCccfraft3C2N4T1R.trace.tla -dumpTrace json MCccfraft3C2N4T1R.json
- run: ./tlc.py --trace-name 3C2N mc --term-count 2 --request-count 0 --raft-configs 3C2N --disable-check-quorum consensus/MCccfraft.tla

- name: Upload TLC's out file as an artifact. Can be imported into the TLA+ Toolbox.
- name: Upload TLC traces
uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
Expand All @@ -79,26 +77,24 @@ jobs:
name: Simulation - Consensus
if: ${{ contains(github.event.pull_request.labels.*.name, 'run-long-verification') }}
runs-on: ubuntu-latest
defaults:
run:
working-directory: tla

steps:
- uses: actions/checkout@v4
- run: |
sudo apt update
sudo apt install -y default-jre
python3 ./tla/install_deps.py
python3 install_deps.py

- name: Simulation
run: |
set -x
cd tla/
./tlc.sh -workers auto -simulate -depth 500 consensus/SIMccfraft.tla -dumpTrace tla SIMccfraft.trace.tla -dumpTrace json SIMccfraft.json
env:
SIM_TIMEOUT: 3000
- run: ./tlc.py sim --max-seconds 3000 --depth 500 consensus/SIMccfraft.tla

- name: Upload artifacts.
- name: Upload TLC traces
uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: tlc-simulation-consensus
path: |
tla/*
tla/consensus/*_TTrace_*.tla
tla/*.json
Loading
Loading