<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>TLA&#43; on Hillel Wayne</title>
    <link>https://www.hillelwayne.com/tags/tla&#43;/</link>
    <description>Recent content in TLA&#43; on Hillel Wayne</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Mon, 17 Jun 2024 00:00:00 +0000</lastBuildDate>
    
	<atom:link href="https://www.hillelwayne.com/tags/tla+/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>Composing TLA&#43; Specifications with State Machines</title>
      <link>https://www.hillelwayne.com/post/composing-tla/</link>
      <pubDate>Mon, 17 Jun 2024 00:00:00 +0000</pubDate>
      
      <guid>https://www.hillelwayne.com/post/composing-tla/</guid>
      <description>Last year a client asked me to solve a problem: they wanted to be able to compose two large TLA+ specs as part of a larger system. Normally you&amp;rsquo;re not supposed to do this and instead write one large spec with both systems hardcoded in, but these specs were enormous and had many internal invariants of their own. They needed a way to develop the two specs independently and then integrate them with minimal overhead.</description>
    </item>
    
    <item>
      <title>Breaking the limits of TLA&#43; model checking</title>
      <link>https://www.hillelwayne.com/post/graphing-tla/</link>
      <pubDate>Mon, 17 Apr 2023 00:00:00 +0000</pubDate>
      
      <guid>https://www.hillelwayne.com/post/graphing-tla/</guid>
      <description>I haven&amp;rsquo;t written much about TLA+ on the blog since the new learntla went up. Any examples or special topics I think of go there instead. But I recently thought of a cool demo that doesn&amp;rsquo;t quite fit the theme of that book: there are some things you can&amp;rsquo;t easily check with the model checker but can check if you work with the state space as a directed graph.</description>
    </item>
    
    <item>
      <title>Announcing: Learn TLA&#43;</title>
      <link>https://www.hillelwayne.com/post/learntla/</link>
      <pubDate>Fri, 01 Jul 2022 00:00:00 +0000</pubDate>
      
      <guid>https://www.hillelwayne.com/post/learntla/</guid>
      <description>tl;dr: online TLA+ manual/advanced techniques/examples here.
TLA+ is a tool for testing abstract software designs. I first stumbled on it in 2016 and found it so useful I wrote a free online guide to help others learn it. Then I decided the guide wasn&amp;rsquo;t good enough and wrote Practical TLA+ in 2018. Then I decided the book wasn&amp;rsquo;t good enough and needed a second edition.
Just kidding! Book&amp;rsquo;s never getting a second edition, because it costs $26 and no matter how good I make it, it&amp;rsquo;s never going to have the reach of a free resource.</description>
    </item>
    
    <item>
      <title>Using Abstract Data Types in TLA&#43;</title>
      <link>https://www.hillelwayne.com/post/tla-adt/</link>
      <pubDate>Mon, 13 Dec 2021 00:00:00 +0000</pubDate>
      
      <guid>https://www.hillelwayne.com/post/tla-adt/</guid>
      <description>In my 2021 TLAConf Talk I introduced a technique for encoding abstract data types (ADTs). For accessibility I&amp;rsquo;m reproducing it here. This post is aimed at intermediate-level TLA+ users who already understand action properties and the general concept of refinement.
Say we want to add a LIFO stack to a specification. You can push to and pop from the end of this stack but you cannot change data in the middle.</description>
    </item>
    
    <item>
      <title>Specification Refinement</title>
      <link>https://www.hillelwayne.com/post/refinement/</link>
      <pubDate>Tue, 13 Jul 2021 00:00:00 +0000</pubDate>
      
      <guid>https://www.hillelwayne.com/post/refinement/</guid>
      <description>When teaching formal methods, I often get asked how we can connect the specifications we write to the code we produce. One way we do this is with refinement. All examples are in TLA+.1
Imagine we&amp;rsquo;re designing a multithreaded counter. We don&amp;rsquo;t know how we&amp;rsquo;re going to implement it yet, so we start by specifying the abstract behavior.2
---- MODULE abstract ---- EXTENDS Integers, Sequences VARIABLES pc, counter vars == &amp;lt;&amp;lt;pc, counter&amp;gt;&amp;gt; \* Two threads Threads == 1.</description>
    </item>
    
    <item>
      <title>TLA&#43; Action Properties</title>
      <link>https://www.hillelwayne.com/post/action-properties/</link>
      <pubDate>Thu, 25 Feb 2021 00:00:00 +0000</pubDate>
      
      <guid>https://www.hillelwayne.com/post/action-properties/</guid>
      <description>There&amp;rsquo;s not a whole lot on TLA+ technique out there: all the resources are either introductions or case studies. Good for people starting out, bad for people past that. I think we need to write more intermediate-level stuff, what Ben Kuhn calls Blub studies. Here&amp;rsquo;s an attempt at that.
Most TLA+ properties are invariants, properties that must be true for every state in the behavior. If we have a simple counter:</description>
    </item>
    
    <item>
      <title>Finding Goroutine Bugs with TLA&#43;</title>
      <link>https://www.hillelwayne.com/post/tla-golang/</link>
      <pubDate>Fri, 25 Sep 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.hillelwayne.com/post/tla-golang/</guid>
      <description>My job these days is teaching TLA+ and formal methods: specifying designs to find bugs in them. But just knowing the syntax isn&amp;rsquo;t enough to write specs, and it helps to have examples to draw from. I recently read Chris Siebenmann&amp;rsquo;s Even in Go, concurrency is still not easy and thought it would make a good case study for writing a spec. In it, he gives an example of Go code which deadlocks:</description>
    </item>
    
    <item>
      <title>Weak and Strong Fairness</title>
      <link>https://www.hillelwayne.com/post/fairness/</link>
      <pubDate>Fri, 03 Jul 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.hillelwayne.com/post/fairness/</guid>
      <description>I&amp;rsquo;m in the process of revising some of my workshops. I realized that one particular important aspect of TLA+, fairness, is something that I&amp;rsquo;ve struggled to explain well. Then again, everybody struggles to explain it well! It&amp;rsquo;s also a great example of how messy concurrent systems can get, so I figured it would make a good post for the blog.
Stuttering Take the following spec of a clock. I used TLA+ but it should mostly be clear from context:</description>
    </item>
    
    <item>
      <title>Feature Interaction Bugs</title>
      <link>https://www.hillelwayne.com/post/feature-interaction/</link>
      <pubDate>Wed, 05 Feb 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.hillelwayne.com/post/feature-interaction/</guid>
      <description>In most testing frameworks, you&amp;rsquo;re expected to write a lot of low-level tests and few high-level tests. The reasoning is that end-to-end tests are slow and expensive and only cover a tiny amount of the program&amp;rsquo;s state space. It&amp;rsquo;s better to focus on testing all the parts in isolation versus testing that they all work together.
In practice, global correctness does not follow from local correctness. It&amp;rsquo;s possible for every part to be individually rock-solid but the system to be broken as a whole.</description>
    </item>
    
    <item>
      <title>The Business Case for Formal Methods</title>
      <link>https://www.hillelwayne.com/post/business-case-formal-methods/</link>
      <pubDate>Wed, 22 Jan 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.hillelwayne.com/post/business-case-formal-methods/</guid>
      <description>This is an &amp;ldquo;intro packet&amp;rdquo; you can use to argue for the benefits of formal methods (FM) to your boss. It&amp;rsquo;s a short explanation, a list of benefits and case studies, and a demo. Everything&amp;rsquo;s in TLA+, but the arguments apply equally well to Alloy, B, statecharts, etc. Adapt the material to your specific needs.
Quick notational note: I&amp;rsquo;m leaving out the code verification side of formal methods, mostly because design verification is a much easier sell.</description>
    </item>
    
    <item>
      <title>Hypermodeling Hyperproperties</title>
      <link>https://www.hillelwayne.com/post/hyperproperties/</link>
      <pubDate>Mon, 13 Jan 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.hillelwayne.com/post/hyperproperties/</guid>
      <description>When we design programs, we usually look for two kinds of properties: that &amp;ldquo;bad things&amp;rdquo; never happen and that &amp;ldquo;good things&amp;rdquo; are guaranteed to happen. These are called safety and liveness properties, respectively. These are properties that we want to hold true for every possible program behavior. &amp;ldquo;We always complete every request&amp;rdquo; is a liveness property. If our system has it, every program trace will complete every request. If it doesn&amp;rsquo;t hold, I can give you a example behavior where the server never responds.</description>
    </item>
    
    <item>
      <title>Modeling Adversaries with TLA&#43;</title>
      <link>https://www.hillelwayne.com/post/adversaries/</link>
      <pubDate>Sun, 05 May 2019 00:00:00 +0000</pubDate>
      
      <guid>https://www.hillelwayne.com/post/adversaries/</guid>
      <description>A common question I get about specs is how to model bad actors. Usually this is one of two contexts:
 The spec involves several interacting agents sharing a protocol, but some of the nodes are faulty or malicious: they will intentionally try to subvert the system. The spec involves an agent subject to outside forces, like someone can throw a rock at your sensor.  These &amp;ldquo;open world&amp;rdquo; situations are a great place to use formal methods.</description>
    </item>
    
    <item>
      <title>Modeling Message Queues in TLA&#43;</title>
      <link>https://www.hillelwayne.com/post/tla-messages/</link>
      <pubDate>Wed, 31 Oct 2018 00:00:00 +0000</pubDate>
      
      <guid>https://www.hillelwayne.com/post/tla-messages/</guid>
      <description>I recently did a corporate TLA+ workshop and some people asked what TLA+ specs look like in practice. If you looked at the most common public examples, you&amp;rsquo;d probably come away thinking that people only used it for critical consensus algorithms. This is a problem for two reasons: first, it makes it harder to learn TLA+, as there aren&amp;rsquo;t simpler examples to experiment with. Second, it makes it hard for people to see how TLA+ is useful for them.</description>
    </item>
    
    <item>
      <title>Practical TLA&#43; Now Available</title>
      <link>https://www.hillelwayne.com/post/practical-tla/</link>
      <pubDate>Thu, 18 Oct 2018 00:00:00 +0000</pubDate>
      
      <guid>https://www.hillelwayne.com/post/practical-tla/</guid>
      <description>I am delighted to announce that my book, Practical TLA+, is now available! When I stumbled into TLA+ in 2016 I had no idea it would so define my passions, my values, and my career. I definitely didn&amp;rsquo;t think I&amp;rsquo;d be writing a book. But 11 months and 220 pages later, here we are! This is the largest project I&amp;rsquo;ve ever done and I&amp;rsquo;m incredibly excited to share it with you all.</description>
    </item>
    
    <item>
      <title>Augmenting Agile with Formal Methods</title>
      <link>https://www.hillelwayne.com/post/augmenting-agile/</link>
      <pubDate>Mon, 30 Jul 2018 00:00:00 +0000</pubDate>
      
      <guid>https://www.hillelwayne.com/post/augmenting-agile/</guid>
      <description>I really like the c2 wiki as a historical artifact: a lot of big names in Agile and Extreme Programming argued with each other there.1 One thing they did was the Extreme Programming Challenge, where people tried to test the limits of these approaches. They&amp;rsquo;d find edge problems (designing databases, remote teams, etc) and see if Agile/XP still worked in that context. In almost every case they quickly decided that yes, it works just fine.</description>
    </item>
    
    <item>
      <title>List of TLA&#43; Examples</title>
      <link>https://www.hillelwayne.com/post/list-of-tla-examples/</link>
      <pubDate>Thu, 08 Mar 2018 00:00:00 +0000</pubDate>
      
      <guid>https://www.hillelwayne.com/post/list-of-tla-examples/</guid>
      <description>People always tell me that the hardest part of learning TLA+ is finding good examples. This makes sense to me: most of the main ones out there are either toy problems or immensely complex algorithms. It&amp;rsquo;s sort of the nature of TLA+: if you&amp;rsquo;re using it, you&amp;rsquo;re trying to design something complicated, and that&amp;rsquo;s usually because you&amp;rsquo;re trying to sell something complicated.
Also, the community is tiny. You could probably fit all of the TLA+ experts in the world in a small coffee shop.</description>
    </item>
    
    <item>
      <title>Modeling Redux with TLA&#43;</title>
      <link>https://www.hillelwayne.com/post/tla-redux/</link>
      <pubDate>Mon, 12 Feb 2018 00:00:00 +0000</pubDate>
      
      <guid>https://www.hillelwayne.com/post/tla-redux/</guid>
      <description>Update 01/07/19 Greetings from 2019! The good news is that Chicago isn&amp;rsquo;t yet a radioactive crater. The bad news is almost everything I said about refinement in this article is wrong. I&amp;rsquo;m working on writing a more in-depth, rigorous treatment of refinement as its own article. But this one is currently explaining something that definitely isn&amp;rsquo;t refinement. mkay thanks!
Update 2020-10-05: I&amp;rsquo;m probably not going to write that article on refinement in the near future and also Chicago is a radioactive crater.</description>
    </item>
    
    <item>
      <title>Teaching Leaky Abstractions</title>
      <link>https://www.hillelwayne.com/post/teaching-leaky-abstractions/</link>
      <pubDate>Tue, 30 Jan 2018 00:00:00 +0000</pubDate>
      
      <guid>https://www.hillelwayne.com/post/teaching-leaky-abstractions/</guid>
      <description>I&amp;rsquo;m writing a book on TLA+! It&amp;rsquo;s going to be aimed at the same audience as Learn TLA+, but dive much deeper and go much further. I&amp;rsquo;ll be showing not just how to use TLA+, but how to think about systems, write good specifications, and fix models. I&amp;rsquo;m really excited and I&amp;rsquo;m sure you&amp;rsquo;ll be, too!
I&amp;rsquo;m also trying to make it much better than Learn TLA+, because
 People are going to be paying money for this, so I can&amp;rsquo;t just phone it in I asked my technical reviewer to be &amp;ldquo;almost-comically brutal&amp;rdquo; and he&amp;rsquo;s risen to the challenge.</description>
    </item>
    
    <item>
      <title>Modeling Zero-Downtime Deployments with TLA&#43;</title>
      <link>https://www.hillelwayne.com/post/modeling-deployments/</link>
      <pubDate>Tue, 30 May 2017 11:48:17 -0500</pubDate>
      
      <guid>https://www.hillelwayne.com/post/modeling-deployments/</guid>
      <description>I&amp;rsquo;m working on some examples for my TLA+ guide and realized this one would be a good introduction to specification in general, so I simplified it a little to make it more accessible. Enjoy!
The problem Deploying code to a set of servers is tricky. You can turn them off, migrate the code, and turn them back on, but that&amp;rsquo;ll piss off the customers. You could also update them live, but different servers update are different rates and customers could get inconsistent results.</description>
    </item>
    
    <item>
      <title>Hate Your Tools</title>
      <link>https://www.hillelwayne.com/hate-your-tools/</link>
      <pubDate>Tue, 27 Dec 2016 19:48:18 -0600</pubDate>
      
      <guid>https://www.hillelwayne.com/hate-your-tools/</guid>
      <description></description>
    </item>
    
  </channel>
</rss>