josehu07 / learn-tla

TLA+/PlusCal Study Material (all runnable with VSCode extension)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TLA+/PlusCal Study Material

languages top-lang code-size license

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:

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).

Checking Finite-State Models

To generate a TLA+ specification from PlusCal:

  1. Change directory into a folder containing specs
  2. Open a chosen module file *.tla containing PlusCal code
  3. 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:

  1. 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
  2. Open the corresponding configuration file *_MC.cfg
    • Tweak model checking configurations as desired
    • List the invariants and temporal properties to check against
  3. 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

General Proofs w/ TLAPS

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.

Other Useful Links

TODO List

  • PlusCal tutorial
  • TLA+ video course
  • Dr. TLA+ series (WIP)
  • TLAPS proofs?

About

TLA+/PlusCal Study Material (all runnable with VSCode extension)

License:MIT License


Languages

Language:TLA 100.0%