Every digital system lives in time. A traffic light cycles through states. A network protocol sends, waits, and retries. A CPU fetches, executes, and writes back â again and again, forever. The bugs that matter most are not crashes but misbehaviors over time: a lock that is never released, a message that is sent but never acknowledged, a safety valve that stays open when it should eventually close.
Ordinary logic says "this is true now." Temporal logic lets us say things like "this will always be true," "this will eventually be true," and "whenever this happens, that will happen later." Two flavors dominate the field:
- LTL (Linear Temporal Logic) imagines time as a single infinite path â the one execution you happen to be watching. It adds operators G ("globally / always"), F ("finally / eventually"), X ("next"), and U ("until"). A formula like G(request â F grant) means: on every step of this path, if a request is seen, some later step will see a grant.
- CTL (Computation Tree Logic) imagines time as a tree of all possible futures branching out from the current state. It combines path quantifiers A ("for all paths") and E ("there exists a path") with the same temporal operators. AG(request â AF grant) means: on every path and at every state, if a request occurs, some future state on every continuation will grant it.
These two languages look almost identical. The difference is whether you reason along one fixed path or across all possible paths. That gap â which seems philosophical â turns out to matter enormously for how hard the verification problem is.
Model checking is the algorithmic question: given a finite system (a Kripke structure â states, transitions, and labels) and a formula, does the system satisfy the formula? In the 1980s Clarke, Emerson, and Sifakis invented efficient algorithms for CTL and shared the 2007 Turing Award. But LTL model checking, despite looking similar, is harder â it is PSPACE-complete (proven by Sistla and Clarke in 1985), while CTL model checking runs in polynomial time.
Comments
Loading comments...