Skip to content

Commit 7666836

Browse files
committed
manual.yml offers a simple way to run TLC on the specs in run.sh.
* Include TLC's ungarbled output * Print command-line parameters * Set TLC's command-line parameters at the spec level * Assert exit/return values Signed-off-by: Markus Alexander Kuppe <[email protected]>
1 parent 77abae3 commit 7666836

File tree

2 files changed

+54
-13
lines changed

2 files changed

+54
-13
lines changed

.github/workflows/manual.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: CI
2+
3+
on: [workflow_dispatch]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v1
10+
- name: Get (nightly) TLC
11+
run: wget https://nightly.tlapl.us/dist/tla2tools.jar
12+
- name: Get (nightly) CommunityModules
13+
run: wget https://github.com/tlaplus/CommunityModules/releases/latest/download/CommunityModules-deps.jar
14+
- name: Get TLAPS modules
15+
run: |
16+
wget https://raw.githubusercontent.com/tlaplus/tlapm/main/library/TLAPS.tla
17+
wget https://raw.githubusercontent.com/tlaplus/tlapm/main/library/FunctionTheorems.tla
18+
wget https://raw.githubusercontent.com/tlaplus/tlapm/main/library/FiniteSetTheorems.tla
19+
wget https://raw.githubusercontent.com/tlaplus/tlapm/main/library/WellFoundedInduction.tla
20+
wget https://raw.githubusercontent.com/tlaplus/tlapm/main/library/NaturalsInduction.tla
21+
wget https://raw.githubusercontent.com/tlaplus/tlapm/main/library/SequenceTheorems.tla
22+
- name: Run
23+
run: /bin/bash .github/workflows/run.sh

.github/workflows/run.sh

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,35 @@
11
#!/bin/bash
22

3-
TLC_COMMAND="java -Dtlc2.TLC.stopAfter=180 -Dtlc2.TLC.ide=Github -Dutil.ExecutionStatisticsCollector.id=abcdef60f238424fa70d124d0c77ffff -cp tla2tools.jar tlc2.TLC -workers auto -lncheck final -tool -deadlock"
3+
set -ex
44

5-
echo Check EWD840
6-
$TLC_COMMAND specifications/ewd840/EWD840
5+
TLC_COMMAND="java -ea -XX:+UseParallelGC -Dtlc2.TLC.stopAfter=180 -Dtlc2.TLC.ide=Github -Dutil.ExecutionStatisticsCollector.id=abcdef60f238424fa70d124d0c77ffff -cp tla2tools.jar tlc2.TLC -workers auto -lncheck final -tool -deadlock"
6+
7+
echo Check specifications/aba-asyn-byz/aba_asyn_byz
8+
$TLC_COMMAND specifications/aba-asyn-byz/aba_asyn_byz
9+
echo Check Constrain_CRDT
10+
$TLC_COMMAND specifications/FiniteMonotonic/Constrain_CRDT
11+
echo Check Finitize_CRDT
12+
$TLC_COMMAND specifications/FiniteMonotonic/Finitize_CRDT
13+
echo Check Finitize_ReplicatedLog
14+
$TLC_COMMAND specifications/FiniteMonotonic/Finitize_ReplicatedLog
15+
echo Check specifications/KeyValueStore/MCKVsnap
16+
$TLC_COMMAND specifications/KeyValueStore/MCKVsnap
17+
echo Check specifications/LoopInvariance/MCBinarySearch
18+
$TLC_COMMAND specifications/LoopInvariance/MCBinarySearch
19+
echo Check specifications/LoopInvariance/MCQuicksort
20+
$TLC_COMMAND specifications/LoopInvariance/MCQuicksort
21+
echo Check specifications/MisraReachability/MCParReach
22+
$TLC_COMMAND specifications/MisraReachability/MCParReach
23+
echo Check specifications/MisraReachability/MCReachable
24+
$TLC_COMMAND specifications/MisraReachability/MCReachable
25+
echo Check specifications/SDP_Verification/SDP_Attack_New_Solution_Spec/MC
26+
$TLC_COMMAND specifications/SDP_Verification/SDP_Attack_New_Solution_Spec/MC
27+
echo Check specifications/SingleLaneBridge/MC
28+
$TLC_COMMAND specifications/SingleLaneBridge/MC
29+
echo Check specifications/SpanningTree/SpanTree
30+
$TLC_COMMAND specifications/SpanningTree/SpanTree
31+
echo Check specifications/acp/ACP_NB_TLC
32+
$TLC_COMMAND specifications/acp/ACP_NB_TLC
733
echo Check CarTalkPuzzle Model_1
834
$TLC_COMMAND specifications/CarTalkPuzzle/CarTalkPuzzle.toolbox/Model_1/MC
935
echo Check CarTalkPuzzle Model_2
@@ -16,8 +42,6 @@ echo Check DiningPhilosophers
1642
$TLC_COMMAND specifications/DiningPhilosophers/DiningPhilosophers
1743
echo Check TransitiveClosure
1844
$TLC_COMMAND specifications/TransitiveClosure/TransitiveClosure
19-
echo Check Hanoi
20-
java -Dtlc2.TLC.stopAfter=600 -Dtlc2.TLC.ide=Github -Dutil.ExecutionStatisticsCollector.id=abcdef60f238424fa70d124d0c77ffff -cp tla2tools.jar:specifications/tower_of_hanoi/Hanoi.toolbox/Model_1/MC tlc2.TLC -workers auto -lncheck final -tool -deadlock specifications/tower_of_hanoi/Hanoi.toolbox/Model_1/MC
2145
echo Check MCEcho
2246
$TLC_COMMAND specifications/echo/MCEcho
2347
echo Check Prisoners
@@ -26,10 +50,6 @@ echo Check LSpec-model
2650
$TLC_COMMAND specifications/dijkstra-mutex/DijkstraMutex.toolbox/LSpec-model/MC
2751
echo Check Safety-4-processors
2852
$TLC_COMMAND specifications/dijkstra-mutex/DijkstraMutex.toolbox/Safety-4-processors/MC
29-
## This spec used to be accepted by Apalache, but since Apalache has started to require type annotations for all variables.
30-
## https://github.com/tlaplus/Examples/pull/31#issuecomment-796354291
31-
#echo Check EinsteinRiddle
32-
#$TLC_COMMAND specifications/EinsteinRiddle/Einstein
3353
echo Check MCInnerSequential
3454
$TLC_COMMAND specifications/SpecifyingSystems/AdvancedExamples/MCInnerSequential
3555
#echo Check MCInnerSerial
@@ -68,8 +88,6 @@ echo Check EWD840_anim
6888
$TLC_COMMAND -simulate num=1 specifications/ewd840/EWD840_anim || (($? == 12)) ## Expect a safety violation
6989
echo Check SyncTerminationDetection
7090
$TLC_COMMAND specifications/ewd840/SyncTerminationDetection
71-
echo Check EWD840
72-
$TLC_COMMAND specifications/ewd840/EWD840
7391
echo Check EWD840_json
7492
sed -i '/^SendMsg/{n;d;}' specifications/ewd840/EWD840.tla ## Cause RealInv to be violated (see EWD840_json.tla)
7593
$TLC_COMMAND specifications/ewd840/EWD840_json
@@ -96,9 +114,9 @@ $TLC_COMMAND specifications/allocator/SimpleAllocator
96114
echo Check AllocatorImplementation
97115
$TLC_COMMAND specifications/allocator/AllocatorImplementation
98116
echo Check FourQueens
99-
$TLC_COMMAND specifications/N-Queens/Queens.toolbox/FourQueens/MC
117+
$TLC_COMMAND specifications/N-Queens/Queens.toolbox/FourQueens/MC || (($? == 12)) ## Expect a safety violation
100118
echo Check FourQueens PlusCal
101-
$TLC_COMMAND specifications/N-Queens/QueensPluscal.toolbox/FourQueens/MC
119+
$TLC_COMMAND specifications/N-Queens/QueensPluscal.toolbox/FourQueens/MC || (($? == 12)) ## Expect a safety violation
102120
echo Check ReadersWriters
103121
$TLC_COMMAND specifications/ReadersWriters/MC
104122
echo Check EWD687a

0 commit comments

Comments
 (0)