There are multiple specification languages that implement Temporal Logic of Actions. Each language has unique features and use cases:
TLA+ TLA+ is the default and most widely used specification language for TLA. It is a mathematical language designed to describe the behavior of concurrent and distributed systems. The specification is written in functional style. ----------------------------- MODULE HourClock ----------------------------- EXTENDS Naturals VARIABLES hour Init == hour = 1 Next == hour' = IF hour = 12 THEN 1 ELSE hour + 1 Spec == Init /\ [][Next]_hour =============================================================================
PlusCal PlusCal is a high-level algorithm language that translates to TLA+. It allows users to write algorithms in a familiar pseudocode-like syntax, which are then automatically converted into TLA+ specifications. This makes PlusCal ideal for those who prefer to think in terms of algorithms rather than state machines. ----------------------------- MODULE HourClock ---------------------- EXTENDS Naturals (*--algorithm HourClock { variable hour = 1; { while (TRUE) { hour := (hour % 12) + 1; } } } --*)
Quint Quint is another specification language that translates to TLA+. Quint combines the robust theoretical basis of the Temporal Logic of Actions (TLA) with state-of-the-art type checking and development tooling. Unlike PlusCal, the Quint operators and keywords have one-to-one translation to TLA+. Quint provides a REPL, random simulator and integration with the TLA+ model checkers. module hour_clock { var hour: int action init = hour' = 1 action step = hour' = if (hour == 12) 1 else hour + 1 }
FizzBee FizzBee is an alternative to TLA+ with higher level specification language using a Python-like syntax (
Starlark) designed to bring formal methods for mainstream software engineers working on distributed systems. While based on Temporal Logic of Actions, it does not translate to or use TLA+ under the hood unlike PlusCal or Quint. action Init: hour = 1 atomic action Tick: # The body of the actions is Starlark (a Python dialect) hour = (hour % 12) + 1 ==See also==