First of all, what is TLA+ and why is it (becoming increasingly) useful? See Lamport's official TLA+ website for a good answer.
This repo contains:
- TLA+ video course solutions adapted from Lamport's TLA+ video course
- PlusCal tutorial solutions adapted from Lamport's PlusCal tutorial
- Dr. TLA+ lecture series material directly linked from here
- Dr. TLA+ series specifications cleansed and extended with PlusCal by me (WIP, 🌟)
All PlusCal code in this repo uses the P-syntax (instead of the C-syntax). All sessions are made runnable with the VSCode TLA+ extension (instead of the canonical TLA+ Toolbox IDE).
To generate a TLA+ specification from PlusCal:
- Change directory into a folder containing specs
- Open a chosen module file
*.tla
containing PlusCal code - Run the TLA+: Parse module command on this file
- TLA+ specification code will be generated from the PlusCal comment
- This step is already done for all modules in this repo (and should be done automatically on save by the VSCode extension for any file containing a PlusCal algorithm)
To let TLC check a bounded TLA+ model with parameters:
- Open the corresponding model-checkable module
*_MC.tla
- Tweak model checking configurations, if any put in here, as desired
- Define all the invariants and temporal properties to be checked
- Open the corresponding configuration file
*_MC.cfg
- Tweak model checking configurations as desired
- List the invariants and temporal properties to check against
- Run the TLA+: Check model with TLC command on the
*_MC.tla
file- If everything goes well, a model-checking result panel should appear at side
TLAPS is a new addition to TLA+ using SMT solvers to support general, possibly unbounded-state theorem proving. The VSCode extension currently does not offer TLAPS integration (see progress here). Also, there is no official tutorial about TLAPS that is complete and publicly available right now. New things might be added to this repo as TLAPS becomes increasingly mature.
- Learn TLA+ wiki
- TLA+ examples gallery
- PlusCal P-syntax manual
- PlusCal cheatsheet
- TLA+ language summary
- Beyond the Toolbox doc
- PlusCal tutorial
- TLA+ video course
- Dr. TLA+ series (WIP)
- TLAPS proofs?