Temporal Specifications for Safety and Liveness
Write trace properties for request handling and distinguish a finite bad prefix from an indefinitely missing response.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 2
- Reading time
- 1 min
In this article2 chapters
A safety violation can be exposed by a finite prefix
A property forbidding two processes from being in a critical section at once is violated as soon as both are in it. Any continuation of that finite bad prefix remains a violation. On a model with observations \(\mathit{inside}_1,\mathit{inside}_2\), the invariant is \(\mathbf G\neg(\mathit{inside}_1\land\mathit{inside}_2)\). The temporal operator \(\mathbf G\) means the condition must hold at all positions.
A liveness question depends on future progress
“Each request eventually receives a response” can be formalized \(\mathbf G(\mathit{req}\to\mathbf F\,\mathit{res})\) for suitable observations that pair responses with requests. After a finite wait, a later response is still possible. An infinite wait witnesses failure in the basic model. Fair scheduling assumptions matter if the responsible process can otherwise be postponed indefinitely. Temporal model checking gives automata-based verification tools. State exploration computes finite reachability for safety properties.[1][2]