13. 13
TLA+
Node1
Node2
Node3
• combines temporal logic and set theory
• specification defines initial state and next-state relation
• states represented by assigning values to variables
14. 14
Next-state relation
Node n
firstUncommittedSlot: s
currentTerm: t
...
PublishResponse{ ... }
Node n
firstUncommittedSlot: s
currentTerm: t
lastAcceptedTerm: t
lastAcceptedValue: v
...
PublishRequest
- dest: n
- slot: s
- term: t
- value: v
PublishResponse
- slot: s
- term: t
16. TLC
• model checker
• integrated into IDE
• exhaustive state exploration
• breadth-first
• bounded state space
• bugs even for small models
• good at finding edge cases
18. Experiences
TLA+ Isabelle/HOL
● executable specs
● rapid prototyping
● high confidence
● rising in popularity
● no state-space limitations
● deep insights
● even higher confidence
19. Where can I learn more about this?
More Questions? Visit us at the AMA
● TLA+ Home Page: http://lamport.azurewebsites.net/tla/tla.html
● TLA+ Video Course: http://lamport.azurewebsites.net/video/videos.html
● Introduction to TLA+: https://learntla.com
● Tutorial on Isabelle/HOL: http://isabelle.in.tum.de/doc/tutorial.pdf
● Use of Formal Methods at AWS: http://lamport.azurewebsites.net/tla/formal-methods-amazon.pdf
● Formal models of core Elasticsearch algorithms: https://github.com/elastic/elasticsearch-formal-models
● Related talk at 3:30pm (Salon 1-7): Elasticsearch Consensus: The Past, the Present, and the Future