Questions tagged [tla+]

TLA+ is a language and toolchain for specifications based on TLA, the Temporal Logic of Actions. The TLA Toolbox includes a translator from PlusCal to TLA+, the TLC model checker, and an IDE.

TLA+ is a language and toolchain for specifications based on TLA (Temporal Logic of Actions). The TLA toolbox include

  • SANY, a parser and pretty-printer for TLA+
  • TLC, a model checker and simulator for a subclass of TLA+ specifications
  • TLAPS, a checker for TLA+ proofs
  • a translator from the PlusCal algorithm language
  • an IDE (integrated development environment)

TLA is a temporal logic models systems with mutable state by distinguishing x (the value of x in the current state) from x' (the value of x in the next state). It is usually used to model concurrent and reactive systems. For questions about the logic itself, try our sister site Computer Science.

85 questions
13
votes
1 answer

TLA+ How to visualize the state graph

I a new TLA+ user. I read that the TLA toolbox allows us to visualize the state graph after completion of model-checking. In order to do so dot needs to be installed which I did. But I didn't figure out how to launch the visualization. Can I do it…
Bad Retsuko
  • 133
  • 6
11
votes
1 answer

How can I set CONSTANTS in TLA+ configuration file when using VS Code?

I'm learning TLA+ using VS Code and vscode-tlaplus plugin instead of TLA+ Toolbox. Now I have this TLA file where I define some constants: ---- MODULE test ---- EXTENDS TLC, Integers, Sequences CONSTANTS Capacity, Items, ValueRange,…
Nicholas
  • 471
  • 3
  • 13
8
votes
1 answer

expressing temporal logic of actions in erlang. any natural way?

I would like to translate some actions specified in TLA in Erlang. Can you think of any natural way of doing this directly in Erlang or of any framework available for such? In a nutshell (a very small one), TLA actions are conditions on variables,…
lasaro
  • 504
  • 3
  • 13
8
votes
1 answer

Ideas for a TLA+ project

Please give me some suggestions regarding a project topic in the TLA+ language. I'm taking a course on the language, it's the first year I'm learning about specification and verification and I have no clue what to choose to implement in two weeks…
luvieere
  • 37,065
  • 18
  • 127
  • 179
7
votes
2 answers

LTL, CTL or TLA for modelling for my model (detailed description inside)?

I am currently writing my master thesis and am confronted with specifying and verifying my approach in a temporal logic. Which temporal logic would be the best to use in my circumstances? I would really like some feedback on my approach and how to…
nanoquack
  • 949
  • 2
  • 9
  • 26
4
votes
1 answer

Check that branches are executed

A program can branch from START to either LEFT or RIGHT branch. How can I check that there is an execution path for LEFT branch and the other execution path for RIGHT branch? ------------------------------ MODULE WFBranch…
Jakub M.
  • 32,471
  • 48
  • 110
  • 179
4
votes
2 answers

What is the inductive invariant of the simple concurrent program?

Here is a simple concurrent program from the article Teaching Concurrency by Leslie Lamport. Consider N processes numbered from 0 through N-1 in which each process i executes x[i] := 1 y[i] := x[(i - 1) % N] and stops, where each x[i] initially…
hengxin
  • 1,867
  • 2
  • 21
  • 42
3
votes
1 answer

How to convert number to string in TLA+

Effectively, I want to build a {"1", "2", "3", ..., "N"} set from 1..N set. How do I convert numbers to strings?
houqp
  • 761
  • 1
  • 8
  • 12
3
votes
2 answers

Filtering a tuple while preserving order in TLA+

I'm working on modelling a primary-backup protocol in TLA+, and have the replication configuration in a tuple. Some setup TLA+: NNodes == 3 Nodes == 1..NNodes Then, in a Pluscal algorithm: config = << 1, 2, 3 >>; healthy = [ n \in Nodes |-> TRUE…
Marc Brooker
  • 463
  • 3
  • 7
3
votes
1 answer

\in works, while \subseteq gives a "identifier undefined" error

I have the following spec: ------------------------------ MODULE Group ------------------------------ CONSTANTS People VARIABLES members Init == members \subseteq People Next == members' = members Group == Init /\…
Philip
  • 1,532
  • 12
  • 23
3
votes
1 answer

TLA+ Trouble removing an element

Currently learning TLA+ and have gotten stuck on this simple method to remove a person from a register. Issue seems to be with the permission state from what I can see. My TLA+ function looks like this and removes a person from the register along…
3
votes
2 answers

Set of pairs, with and without repetitions

I have two sets: X = {a, b} Y = {1, 2, 3} I would like to generate the following set of sets of pairs: {<>, <>, <>} {<>, <>, <>} {<>, <>, <>} {<>, <>, <>} ... {<>, <
Jakub M.
  • 32,471
  • 48
  • 110
  • 179
3
votes
1 answer

Check that system passes all the states

A variable state stands for state of a system, for instance state \in {"ready", "prepare", "do", "cleanup", "done"}. How to express condition that state should eventually pass all the five states (in any order)? Working example (accepted…
Jakub M.
  • 32,471
  • 48
  • 110
  • 179
3
votes
3 answers

Difference between => and <=>

I am learning TLA+ from this great "Learn TLA+" page. I cannot get the practical difference between => and <=>. I get it in terms of "truth table", but I cannot really grasp it. Could one provide a practical TLA+ example highlighting the difference…
Jakub M.
  • 32,471
  • 48
  • 110
  • 179
3
votes
2 answers

TLA+: How to delete structure key/value pairings?

I have a specification where I am attempting to define an LRU Cache system and one of the problems I am running into is how I can go about deleting values from a structure key/value pairing (which is basically a dictionary or a hash-map in other…
Q.H.
  • 1,406
  • 2
  • 17
  • 33
1
2 3 4 5 6