3 ms·
TLA+ specs are often short which aids in verifying and validating them, especially in comparison to typical development projects. TLA+ also permits ignoring non
by Jtsummers 6y ago
TLA+ specs are often short which aids in verifying and validating them, especially in comparison to typical development projects. TLA+ also permits ignoring non-essential details and focusing on the core aspects of the problem.
As an example of the latter, I used TLA+ once (only) for work to great success. But the spec I wrote ignored nearly every detail about the larger system, and focused on a few hardware details and modeled the shared memory system as a simple sequence of, rather arbitrarily, 5-11 elements (fixed in the models, in the spec it was a variable). What was stored in the memory? It didn't matter at all, it could literally be anything as far as the model and spec were concerned.
My point being, the spec was so simple that visual inspection and a bit of analysis could tell us that it was correct, it fit in a couple pages if printed out. Model checking let us verify that it had the desired behaviors (with respect to the invariants that I put in based on the official specs for the hardware). Later, weakening the invariants allowed me to "recreate" the race condition that existed in the hardware implementation and was causing all our problems.