Description
The current README does not order examples that make it easy to pick beginner-friendly examples.
TLA+ concepts by which to cluster (tag?) specs:
- Constant-level expressions
- Set of all functions [ S -> T ]
- recursive function definitions such as sum of all elements in a range of a function
- recursive operators
- Second order
- Standard modules
- "+" in TLA+
- sets (filter/mapping), functions, records, sequences, ..., TLC!@@, TLC!:>
- CHOOSE vs. \E (existential quantification)
- non-determinism|concurrency|distributed systems
- Safety|Liveness (Fairness)
- Refinement
- PlusCal
- Auxiliary variables (history|prophecy)
- Composition of specs
- Inductive invariants (TLAPS)
Categories
Math:
https://github.com/tlaplus/Examples/tree/master/specifications/SpecifyingSystems/SimpleMath
https://github.com/tlaplus/Examples/tree/master/specifications/SpecifyingSystems/MoreMath
https://github.com/tlaplus/Examples/tree/master/specifications/TransitiveClosure
https://github.com/tlaplus/CommunityModules/blob/master/modules/Graphs.tla
#23
Logic Puzzles:
https://github.com/tlaplus/Examples/blob/master/specifications/Stones/
https://github.com/tlaplus/Examples/tree/master/specifications/DieHard (there are also PlusCal versions somewhere)
https://github.com/tlaplus/Examples/tree/master/specifications/CarTalkPuzzle
https://github.com/tlaplus/Examples/tree/master/specifications/MissionariesAndCannibals
https://github.com/tlaplus/Examples/tree/master/specifications/N-Queens
https://github.com/tlaplus/Examples/tree/master/specifications/Prisoners
Beginner specs based on popular problems in CS:
https://github.com/tlaplus/Examples/tree/master/specifications/tower_of_hanoi
https://github.com/tlaplus/Examples/tree/master/specifications/GameOfLife
https://github.com/tlaplus/Examples/tree/master/specifications/CigaretteSmokers
https://github.com/tlaplus/Examples/tree/master/specifications/SlidingPuzzles
Non-common concepts in TLA+:
https://github.com/tlaplus/Examples/tree/master/specifications/SpecifyingSystems/Syntax (BNF grammar)
Specs of basic concurrent/distributed systems:
https://github.com/tlaplus/Examples/tree/master/specifications/Chameneos
https://github.com/tlaplus/Examples/tree/master/specifications/echo (PlusCal)
https://github.com/tlaplus/Examples/tree/master/specifications/Tla-tortoise-hare (PlusCal)
https://github.com/lemmy/BlockingQueue/ (tutorial)
https://github.com/tlaplus/Examples/tree/master/specifications/dijkstra-mutex
https://github.com/tlaplus/Examples/tree/master/specifications/ewd840
https://github.com/tlaplus/Examples/tree/master/specifications/ewd998
TLAPS:
https://github.com/tlaplus/Examples/tree/master/specifications/sums_even
https://github.com/tlaplus/Examples/tree/master/specifications/LoopInvariance
https://github.com/tlaplus/Examples/tree/master/specifications/TeachingConcurrency
Technical
- git submodules instead of html links where possible
- Standalone examples that rely e.g. on git commits to structuring their content?
- Zero install/browser-based, i.e. open in gitpod or codespaces (would benefit from submodules)
- What about submodules that bring their own gitpod/codespace config (e.g. BlockingQueue)?
- Classify specifications by TLA+ / PlusCal #8