Skip to content

Instantly share code, notes, and snippets.

@mdmarek
Created November 3, 2016 16:18
Show Gist options
  • Save mdmarek/c5a4317f059e90b12e0732bb96b32b8e to your computer and use it in GitHub Desktop.
Save mdmarek/c5a4317f059e90b12e0732bb96b32b8e to your computer and use it in GitHub Desktop.
TLA+ One Bit Clock
INIT
Init
NEXT
Next
INVARIANT
TypeOK
---- MODULE OneBitClock ----
VARIABLE b
TypeOK == b \in {0, 1}
Init == (b=0) \/ (b=1)
Next == /\ (b = 0) => (b' = 1)
/\ (b = 1) => (b' = 0)
====
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment