Learn TLA+
learntla.com
learntla.com
- Moving some of the examples from Practical TLA+ over to the site
- Adding more exercises to the core
- Adding the new modules and TLC options showcased at this years TLAConf
- Way, way more examples and advanced topics. I have half a dozen pure TLA+ specifications on my computer I need to write up.
TLA+ is much easier to get into than, say, Coq or Isabelle or something, but a lot of the "pre-learntla" content out there is still really mathey and scary for engineers to jump into. I think you did a really good job making TLA+ and PlusCal a useful tool for non-scientists. Thank you.
Yes, you could basically do anything that TLA+ does inside of Isabelle (more familiar with that one than Coq), but it's harder. I think what makes TLA+ interesting is that an engineer with basically no understanding of anything more complex than "I basically know what a set is" can be useful within an afternoon or two.
I love Isabelle but it's got a substantially steeper learning curve than TLA+. I'm not saying it's unnecessarily steep, because Isabelle is a lot more versatile than TLA+, but as a result it's a fairly difficult sell for employers, at least in my experience.
I didn't attend your workshop at Strange Loop but I talked to a few people that did and all of them had good things to say about it.
- 1. Watch https://www.youtube.com/watch?v=-4Yp3j_jk8Q
- 2. Watch all of https://www.youtube.com/watch?v=p54W-XOIEF8&list=PLWAv2Etpa7...
- 3. Work through examples on https://learntla.com
I'm normally not a huge fan of YouTube over books / web sites, but in this case the best content comes from Lamport himself, and he's presented it as a YouTube Course. Also, the costume changes are hilarious.
I also found a (very minor, inconsequential) bug in the materials and emailed him, and he wrote me back and said thanks, so that felt like a career highlight to me ;)
Here is the good:
* A high level of confidence in the design - useful for systems you need to be reliable, or where a bug could create hard-to-diagnose problems.
* The satisfaction of having done a really good job for once, like the great programmers of yore who couldn't patch after release and had to get it right the first time.
* Interesting in an academic sense.
Here is the bad:
* You can still make a mistake when translating the design into code.
* The tools are sometimes baffling, both in their design decisions and their performance. Be prepared for some frustrations.
* With the tools complex and the design proven, your colleagues might not take over the TLA portion of your work and carry it forward.
> but this extra non-debuggable step actually seems like it would be worse. Not really. Some types of bugs are just too hard to be spotted by mere mortal, or too expensive to catch in production. Case in point, do you know there's a subtle bug or at least ambiguity in the description of Paxos Made Simple? I don't know how many hundreds of people have read the paper, but I doubt if more than 100 of them spotted the bug. Similarly, Amazon hired about 20 experts in formal verification to help them catch elusive flaws in specifications. After, if S3 corrupts customer data, the consequence to the S3 team can be devastating, no?
While this does sound useful, it also sounds like now the problem is just shifted to coming up with proper invariants, isn't it?
For example, some sorting algorithms are very complex in the details of their implementation - but they all have the quality that given an input, the output should be the same set of elements, in order.
My phrasing is rough, but it is an invariant that can be expressed by TLA+
It would be fairly cool to be able to design a system using tools like this and have a way to translate it without the possibility of introducing errors during translation to code.
Perhaps what I'm thinking is more automatic generation of test cases? But I'm not quite sure what my brain is trying to watch onto here.
(Another interesting approach in this space is P, which is lower-level than TLA+ but also can compile to C#: https://github.com/p-org/P)
If the traces don't match, you've got a problem.
People are putting work into solving classes of bugs that cost us billions and billions in GDP per year.
This is one solution, and sure, like TDD, has tradeoffs and problems. The details, circumstances, and implementation all play a role.
But it's a potential way to go. Snark is not.
What's your solution?
[1]: To the point where it can easily describe systems that can't be implemented in reality.
On the tooling side, Informal Systems has been doing some good work on static-typechecking TLA+ specifications: https://apalache.informal.systems/docs/tutorials/snowcat-tut...
(Disclosure, I've done consulting work for IS.)
Using Dafny (for example) gives you the advantages of TLA+ combined with proven correct running code.
Learn TLA+ - https://news.ycombinator.com/item?id=31952643 - July 2022 (74 comments)
Learn TLA+ (2018) - https://news.ycombinator.com/item?id=22393653 - Feb 2020 (58 comments)
Learn TLA+ (2018) - https://news.ycombinator.com/item?id=19661329 - April 2019 (92 comments)
Also related:
Ask HN: Do you use TLA+? - https://news.ycombinator.com/item?id=30193431 - Feb 2022 (24 comments)
TLA+ is hard to learn (2018) - https://news.ycombinator.com/item?id=28256643 - Aug 2021 (44 comments)
TLA+ Action Properties - https://news.ycombinator.com/item?id=26649273 - March 2021 (36 comments)
TLA+ - https://news.ycombinator.com/item?id=26385075 - March 2021 (69 comments)
Applying TLA+ in cloud systems [video] - https://news.ycombinator.com/item?id=25426030 - Dec 2020 (14 comments)
Using TLA+ in the Real World to Understand a Glibc Bug - https://news.ycombinator.com/item?id=24958504 - Nov 2020 (76 comments)
Finding Goroutine Bugs with TLA+ - https://news.ycombinator.com/item?id=24591131 - Sept 2020 (40 comments)
A walkthrough tutorial of TLA+ and its tools: analyzing a blocking queue - https://news.ycombinator.com/item?id=22496287 - March 2020 (6 comments)
TLA+ model checking made symbolic - https://news.ycombinator.com/item?id=21662484 - Nov 2019 (51 comments)
Using TLA+ for fun and profit in the development of ElasticSearch [video] - https://news.ycombinator.com/item?id=21003470 - Sept 2019 (15 comments)
Modeling Adversaries with TLA+ - https://news.ycombinator.com/item?id=19839388 - May 2019 (13 comments)
TLA+: design, model, document, and verify concurrent systems - https://news.ycombinator.com/item?id=19821272 - May 2019 (32 comments)
Using TLA+ to Model Cascading Failures - https://news.ycombinator.com/item?id=19623634 - April 2019 (24 comments)
Using TLA+ to Understand Xen Vchan - https://news.ycombinator.com/item?id=18814350 - Jan 2019 (12 comments)
Modeling Message Queues in TLA+ - https://news.ycombinator.com/item?id=18357550 - Nov 2018 (46 comments)
Practical TLA+ - https://news.ycombinator.com/item?id=18249841 - Oct 2018 (6 comments)
The TLA+ Video Course by Leslie Lamport - https://news.ycombinator.com/item?id=16956778 - April 2018 (17 comments)
Modeling Redux with TLA+ - https://news.ycombinator.com/item?id=16569653 - March 2018 (33 comments)
TLA+ in Practice and Theory, Part 3: The Temporal Logic of Actions - https://news.ycombinator.com/item?id=14528072 - June 2017 (7 comments)
TLA+ in Practice and Theory, Part 2: The + in TLA+ - https://news.ycombinator.com/item?id=14475791 - June 2017 (8 comments)
Principles of TLA+ - https://news.ycombinator.com/item?id=14432754 - May 2017 (23 comments)
Formal Methods in Practice: Using TLA+ at ESpark - https://news.ycombinator.com/item?id=14221848 - April 2017 (19 comments)
Leslie Lamport: Video course on TLA+ - https://news.ycombinator.com/item?id=13918648 - March 2017 (74 comments)
My experience with using TLA+ in distributed systems class - https://news.ycombinator.com/item?id=10220264 - Sept 2015 (12 comments)
TLA+ - https://news.ycombinator.com/item?id=9601770 - May 2015 (21 comments)
(BTW count the different shirts).
There's also Dr. TLA+ series by Microsoft Research at https://www.youtube.com/watch?v=ao58xine3jM&list=PLD7HFcN7LX...