Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- master
pull_request:
branches:
- master
- '*'
repository_dispatch:
types: [tlaplus-dispatch]
concurrency:
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ Here is a list of specs included in this repository, with links to the relevant
| [Condition-Based Consensus](specifications/cbc_max) | Thanh Hai Tran, Igor Konnov, Josef Widder | | | | | |
| [Buffered Random Access File](specifications/braf) | Calvin Loncaric | | | | ✔ | |
| [Disruptor](specifications/Disruptor) | Nicholas Schultz-Møller | | | | ✔ | |
| [Barrier Synchronization](specifications/barriers) | Jarod Differdange | | ✔ | ✔ | ✔ | |
| [Lock refinement using auxiliary variables](specifications/locks_auxiliary_vars) | Jarod Differdange | | ✔ | ✔ | ✔ | |


## Examples Elsewhere
Expand Down
207 changes: 145 additions & 62 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -588,14 +588,14 @@
"models": []
},
{
"path": "specifications/FiniteMonotonic/Functions.tla",
"path": "specifications/FiniteMonotonic/Folds.tla",
"communityDependencies": [],
"tlaLanguageVersion": 2,
"features": [],
"models": []
},
{
"path": "specifications/FiniteMonotonic/Folds.tla",
"path": "specifications/FiniteMonotonic/Functions.tla",
"communityDependencies": [],
"tlaLanguageVersion": 2,
"features": [],
Expand Down Expand Up @@ -1361,34 +1361,7 @@
"communityDependencies": [],
"tlaLanguageVersion": 2,
"features": [],
"models": [
{
"path": "specifications/Moving_Cat_Puzzle/OddBoxes.cfg",
"runtime": "00:00:01",
"size": "small",
"mode": "exhaustive search",
"features": [
"liveness"
],
"result": "success",
"distinctStates": 30,
"totalStates": 78,
"stateDepth": 1
},
{
"path": "specifications/Moving_Cat_Puzzle/EvenBoxes.cfg",
"runtime": "00:00:01",
"size": "small",
"mode": "exhaustive search",
"features": [
"liveness"
],
"result": "success",
"distinctStates": 48,
"totalStates": 128,
"stateDepth": 1
}
]
"models": []
}
]
},
Expand Down Expand Up @@ -1960,32 +1933,6 @@
"distinctStates": 62,
"totalStates": 188,
"stateDepth": 11
},
{
"path": "specifications/Prisoners_Single_Switch/SoloPrisoner.cfg",
"runtime": "00:00:01",
"size": "small",
"mode": "exhaustive search",
"features": [
"liveness"
],
"result": "success",
"distinctStates": 2,
"totalStates": 3,
"stateDepth": 2
},
{
"path": "specifications/Prisoners_Single_Switch/SoloPrisonerLightUnknown.cfg",
"runtime": "00:00:01",
"size": "small",
"mode": "exhaustive search",
"features": [
"liveness"
],
"result": "success",
"distinctStates": 4,
"totalStates": 6,
"stateDepth": 2
}
]
}
Expand Down Expand Up @@ -3642,6 +3589,59 @@
}
]
},
{
"path": "specifications/barriers",
"title": "Barrier Synchronization Method",
"description": "A barrier makes all threads stop until all threads have reached the barrier",
"sources": [
"https://matheo.uliege.be/bitstream/2268.2/23374/5/tfe_s202356.pdf"
],
"authors": [
"Jarod Differdange"
],
"tags": [],
"modules": [
{
"path": "specifications/barriers/Barrier.tla",
"communityDependencies": [],
"tlaLanguageVersion": 2,
"features": [],
"models": [
{
"path": "specifications/barriers/Barrier.cfg",
"runtime": "00:00:01",
"size": "small",
"mode": "exhaustive search",
"features": [
"liveness"
],
"result": "success"
}
]
},
{
"path": "specifications/barriers/Barriers.tla",
"communityDependencies": [],
"tlaLanguageVersion": 2,
"features": [
"pluscal",
"proof"
],
"models": [
{
"path": "specifications/barriers/Barriers.cfg",
"runtime": "00:00:01",
"size": "small",
"mode": "exhaustive search",
"features": [
"liveness"
],
"result": "success"
}
]
}
]
},
{
"path": "specifications/bcastByz",
"title": "Asynchronous Reliable Broadcast",
Expand Down Expand Up @@ -4623,7 +4623,9 @@
"path": "specifications/ewd840/SyncTerminationDetection_proof.tla",
"communityDependencies": [],
"tlaLanguageVersion": 2,
"features": ["proof"],
"features": [
"proof"
],
"models": []
}
]
Expand Down Expand Up @@ -4687,8 +4689,8 @@
"mode": "exhaustive search",
"features": [
"ignore deadlock",
"state constraint",
"liveness"
"liveness",
"state constraint"
],
"result": "success"
},
Expand Down Expand Up @@ -4884,14 +4886,14 @@
"models": []
},
{
"path": "specifications/ewd998/Functions.tla",
"path": "specifications/ewd998/Folds.tla",
"communityDependencies": [],
"tlaLanguageVersion": 2,
"features": [],
"models": []
},
{
"path": "specifications/ewd998/Folds.tla",
"path": "specifications/ewd998/Functions.tla",
"communityDependencies": [],
"tlaLanguageVersion": 2,
"features": [],
Expand Down Expand Up @@ -5080,6 +5082,87 @@
}
]
},
{
"path": "specifications/locks_auxiliary_vars",
"title": "Peterson's Algorithm Refining a Lock with Auxiliary Variables",
"description": "A two-way refinement relation between Peterson's Algorithm and an abstract lock, using auxiliary variables as in *Prophecy Made Simple* by Lamport & Merz",
"sources": [
"https://matheo.uliege.be/bitstream/2268.2/23374/5/tfe_s202356.pdf"
],
"authors": [
"Jarod Differdange"
],
"tags": [],
"modules": [
{
"path": "specifications/locks_auxiliary_vars/Lock.tla",
"communityDependencies": [],
"tlaLanguageVersion": 2,
"features": [
"pluscal",
"proof"
],
"models": [
{
"path": "specifications/locks_auxiliary_vars/Lock.cfg",
"runtime": "00:00:01",
"size": "small",
"mode": "exhaustive search",
"features": [],
"result": "success"
}
]
},
{
"path": "specifications/locks_auxiliary_vars/LockHS.tla",
"communityDependencies": [],
"tlaLanguageVersion": 2,
"features": [
"proof"
],
"models": [
{
"path": "specifications/locks_auxiliary_vars/LockHS.cfg",
"runtime": "00:00:01",
"size": "small",
"mode": "exhaustive search",
"features": [
"liveness"
],
"result": "success"
}
]
},
{
"path": "specifications/locks_auxiliary_vars/Peterson.tla",
"communityDependencies": [],
"tlaLanguageVersion": 2,
"features": [
"pluscal",
"proof"
],
"models": [
{
"path": "specifications/locks_auxiliary_vars/Peterson.cfg",
"runtime": "00:00:01",
"size": "small",
"mode": "exhaustive search",
"features": [
"liveness"
],
"result": "success"
}
]
},
{
"path": "specifications/locks_auxiliary_vars/Stuttering.tla",
"communityDependencies": [],
"tlaLanguageVersion": 2,
"features": [],
"models": []
}
]
},
{
"path": "specifications/nbacc_ray97",
"title": "Asynchronous Non-Blocking Atomic Commit",
Expand Down Expand Up @@ -5434,4 +5517,4 @@
]
}
]
}
}
4 changes: 4 additions & 0 deletions specifications/barriers/Barrier.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CONSTANT N = 6
SPECIFICATION Spec
INVARIANT TypeOK
PROPERTY BarrierProperty
40 changes: 40 additions & 0 deletions specifications/barriers/Barrier.tla
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
------------------------------- MODULE Barrier --------------------------------
EXTENDS Integers

CONSTANTS
N

VARIABLES pc

vars == << pc >>

ProcSet == (1..N)

Init ==
/\ pc = [p \in ProcSet |-> "b0"]

b0(self) ==
/\ pc[self] = "b0"
/\ pc' = [pc EXCEPT ![self] = "b1"]

b1 ==
/\ \A p \in ProcSet : pc[p] = "b1"
/\ pc' = [p \in ProcSet |-> "b0"]

Next ==
\/ \E p \in ProcSet : b0(p)
\/ b1

Spec == Init /\ [][Next]_vars

-------------------------------------------------------------------------------

TypeOK ==
/\ pc \in [ProcSet -> {"b0", "b1"}]

\* A process cannot leave the barrier if there are still other processes
\* that need to enter it
BarrierProperty ==
/\ [][\A p,q \in ProcSet : pc[p] = "b0" /\ pc[q] = "b1" => pc'[q] = "b1"]_vars

===============================================================================
4 changes: 4 additions & 0 deletions specifications/barriers/Barriers.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CONSTANT N = 6
SPECIFICATION Spec
INVARIANTS TypeOK LockInv Inv FlushInv
PROPERTY BSpec
Loading
Loading