# LTL property - safety or liveness?

How can I check if an LTL (Linear Temporal Logic) property is safety or liveness? Is it right to say that a property is safety OR liveness (or neither)?

How can I evaluate this:

G(x -> (a U y) )

To answer your second question: there is one property that is both safety and liveness: True. With this exception, however, it is fair to say that a property is either safety or liveness or neither. "Most" properties (like yours) are actually neither, but every property can be represented by the intersection of a safety and a liveness property.

I think your property could be represented by the intersection (conjunction) of the following two properties in LTL notation:

Safety: G(x -> (a W y))

and

Liveness: G(x -> F y)

• Why is this G(x -> (a W y)) safety? you can reach the bad state (y never happend) Feb 7, 2015 at 10:21
• W = weak until operator
– 0 _
Jun 11, 2015 at 18:41
• The fact that "y never happened" is not a bad state but an infinite trace - and it is handled in the liveness part (the second formula). Jun 12, 2015 at 21:10

Your first question is answered in this paper: https://www.cs.cornell.edu/fbs/publications/RecSafeLive.pdf Given an LTL formula, translate it into a Büchi automaton, and remove states that have no path to an accepting state. Then, change all states to be accepting. If the language of the automaton does not change, then the property is a safety property. If the language of the automaton becomes $\Sigma^\omega$, then it is a liveness property.