LTLf, a finite word variant of LTL, can be reduced to LTL by introducing a new atomic proposition indicating the prefix of the infinite words that correspond to the finite words that the original LTLf formula was considering. Such a reduction was originally proposed by De Giacomo and Vardi [2].
However, while any LTL formula reduced from LTLf describes an obligation property in the hierarchy of Manna and Pnueli [5], the aforementioned reduction does not provide an LTL formula that belongs to the syntactic obligation fragment of LTL.
This note shows how the reduction was fixed in Spot in order to ensure that the resulting LTL formula is always a syntactic obligation. Doing so allows algorithms specialized to syntactic obligation to be used on LTLf formulas. For instance, in previous work [4] we described a specialized translation from syntactic obligations to minimal, weak, deterministic Büchi automata that would not be usable with the original reduction.
1 Preliminaries
We assume that the reader is familiar with Linear Temporal Logic (LTL) over infinite words and with LTLf, one of its restrictions to finite words [2]. We use the standard temporal operators F (eventually), G (always), X (weak next), X[1] (strong next), U (until), W (weak until), R (release), and M (strong release). In LTLf all operators are interpreted on nonempty finite words: strong operators (F, U, M) have to fulfill their promise before the end of the finite word, Xf is vacuously true at the last position, and X[1]f requires a next position.
Satisfaction. We write (w,i)⊨φ to mean that the infinite word w satisfies the LTL formula φ at position i≥0, and w⊨finf to mean that the finite word w satisfies the LTLf formula f (at its first position).
Syntactic hierarchy. We recall the syntactic hierarchy of Manna and Pnueli [5]. The hierarchy classifies LTL formulas into classes (Safety: φS; Guarantee: φG; Obligation: φO; Persistence; Recurrence; Reactivity) that correspond to automata-theoretic classes. The precise definition of the syntactic sub-classes most relevant to this paper is given by the following grammars, where ν ranges over atomic propositions:
Let LTLB, LTLG, LTLS, and LTLO denote the sets of LTL formulas generated by φB, φG, φS, and φO, respectively. Intuitively:
LTLB (Bottom) contains propositional formulas plus X.
LTLG (Guarantee) contains no weak operators (G, W, R).
• LTLS (Safety) contains no strong operators (F, U, M).
LTLO (Obligation) is the closure of LTLG∪LTLS under Boolean connectives, X, and four mixed temporal operators: φO∪φG, φORφS, φSWφO, and φGMφO. These additional grammar rules are due to Chang et al. [1].
Note that LTLG and LTLS are not closed under ⊕ and ↔; however, LTLB and LTLO are.
We will also need a variant of LTLB that includes the strong-next operator X[1] of LTLf. Let LTL4B denote the set of LTLf formulas generated by φB extended with the production ∣X[1]φB.
The alive encoding. Following De Giacomo and Vardi [2], a nonempty finite word w=w0⋯wn−1 over an alphabet 2AP can be encoded as an infinite word w′=w0′w1′⋯ over 2AP∪{alive} where
wi′=wi∪{alive}fori<n,alive∈/wi′fori≥n.
The proposition alive marks the live prefix of the infinite word; positions i≥n are dead.
Equivalence at alive positions. We say that two LTL formulas ψ1 and ψ2 are equivalent at alive positions, written ψ1≡finψ2, if for every infinite word w′ conforming to the alive encoding and every alive position i of w′,(w′,i)⊨ψ1 if and only if (w′,i)⊨ψ2.
2 The Original Reduction from LTLf to LTL
De Giacomo and Vardi [2] define t and prove that, for any LTLf formula f and any nonempty finite word w, if w′ is the alive encoding of w, then
from_ltlf(f)=t(f)∧alive∧(alive∪G¬alive)(1)
is satisfied by w′ if and only if w∈finf. Consequently, from_ltlf( f) is satisfiable by an alive-encoded word if and only if f is satisfied by some nonempty finite word. The function t is defined by the following equations. For Boolean operators and atomic propositions, t is the identity (applied homomorphically). For temporal operators, live-prefix constraints are injected:
Strong operators (F, U, M, X [1]) require the target position to be alive; weak operators (G, R, W, X) allow a dead position as a trivial escape.
The definition above was used to implement from_ltlf in Spot [3] from version 2.2.2 to version 2.15.1.
The translation is not a syntactic obligation. Using from_ltlf, every LTLf formula translates to an LTL formula whose language is an obligation property in [5] hierarchy. However, the output of from_ltlf is generally not in LTLO. There are two issues.
The first issue is the wrapper itself: syntactically, alive U G¬alive is a persistence formula, not in LTLO. This is a minor problem and is easily fixed: on alive-encoded words, alive U G¬alive is equivalent to F¬alive ∧ (alive W G¬alive), which is in LTLO.
The second, deeper issue is that even the inner formula t(f) is generally not in LTLO.
Example 1. Consider t(G(Fa)) = G(¬alive ∨ F(alive ∧ a)), or its dual t(F(Ga)) = F(alive ∧ G(¬alive ∨ a)). Neither result is in LTLO.
The failure in Example 1 is structural: t uses the same recursive call in both the “φG-context” (inside F, right of U, left of M) and the “φS-context” (inside G, right of R, left of W), producing a formula of mixed class in each case. The new translation in Section 3 addresses this by introducing two auxiliary functions that produce LTLG and LTLS formulas, respectively, and using them in the appropriate positions.
3 The New Reduction from LTLf to Syntactic Obligation
We define three mutually recursive functions t_G, t_S, and t_O, supported by an auxiliary function t_B, with the following invariants established by structural induction:
For any LTLf formula f, t_G(f) ∈ LTL_G and t_G(f) ≡_fin t(f);
For any LTLf formula f, t_S(f) ∈ LTL_S and t_S(f) ≡_fin t(f);
For any LTLf formula f, t_O(f) ∈ LTL_O and t_O(f) ≡_fin t(f).
The auxiliary function t_B is simply a restriction of t to inputs that are in LTLtB. So it also naturally follows that
If f∈LTLtB then t_B(f) ∈ LTL_B and t_B(f) ≡_fin t(f)
3.1 Revised top-level wrapper
The wrapper alive U G¬alive from (1) is not in LTLO. We replace it with an LTLO formula equivalent to it on alive-encoded words:
All four conjuncts belong to LTLO or its subclasses, so the full formula belongs to LTLO.
3.2 The function t_B
The function t_B translates formulas of LTLtB (the bottom class extended with X^{[1]}) into formulas of LTLB. This restriction of the translation uses the same rules as the original t(·) function.
tB(⊥)=⊥,tB(⊤)=⊤,tB(ν)=νtB(¬f)=¬tB(f)[¬φB∈LTLB]tB(f⊙g)=tB(f)⊙tB(g)for any ⊙∈{∧,∨,→,↔,⊕}[φB⊙φB∈LTLB]tB(Xf)=X(¬alive∨tB(f))[XφB∈LTLB]tB(X[1]f)=X(alive∧tB(f))[XφB∈LTLB]
In the implementation, tB is used by tG and tS to avoid expanding ⊕ and ↔ when their operands belong to LTLB.
3.3 The function tG
The function tG produces a LTLG formula equivalent to t(f) at alive positions. It converts every weak temporal operator into an equivalent U-based form (since U stays in LTLG) and recurses with tS wherever a LTLS subformula is needed (e.g. as the negated argument or the antecedent of an implication).
Under the alive prefix, tG(f)∪¬alive≡finGf: the U holds iff tG(f) holds at every alive position (the “exit” branch of U is triggered at the first ¬alive position). Hence tG(Gf)=tG(f)∪¬alive.
The function tS is the dual of tG: it produces a LTLS formula equivalent to t(f) at alive positions. It converts every strong temporal operator into an R-based form and recurses with tG wherever a LTLG subformula is needed.
Under the alive prefix, F(alive∧tS(f))≡fintS(f)Ralive: the R holds iff tS(f) holds at some alive position (the “forever” branch of R is ruled out by alive eventually becoming false). Hence tS(Ff)=tS(f)Ralive.
• f∪g≡¬((¬f)R(¬g)), so by duality with tG: expanding with the tG rule for R and simplifying gives tS(f∪g)=tS(g)R(alive∧(tS(f)∨tS(g))).
The function t0 is the main translation. Boolean operators are treated homomorphically (since LTL0 is closed under all Boolean connectives). Temporal operators use tG or tS on the operand that requires a constrained syntactic class, and t0 recursively on the unconstrained operand.
Syntactic-class membership. By structural induction: every rule for tB produces a formula in LTLB, every rule for tG produces a formula in LTLG, every rule for tS produces a formula in LTLS, and every rule for tO produces a formula in LTLO, as annotated above. The only non-obvious cases are ⊕ and ↔ in tG and tS: because LTLG (respectively LTLS) is closed under ⊕ and ↔ only when both operands are in LTLB, we delegate to tB for LTLB formulas. Otherwise, we expand those connectives into ∧/∨/¬ combinations of tG and tS results, which are closed under ∧ and ∨.
Proof sketch: semantic equivalence. By simultaneous structural induction on f, with all formulas evaluated on an alive-encoded word at an alive position, covering tG, tS, and tO (and their mutual recursion), we show:
tG(f)≡fint(f): the key case is Gf. At alive position i, tG(f)∪¬alive holds iff tG(f) (which agrees with t(f) by induction) holds at all alive positions j≥i, which is exactly the meaning of G(¬alive∨t(f)) at i.
tS(f)≡fint(f): the key case is Ff. At alive position i, tS(f)R alive holds iff tS(f) holds at some alive position j≥i (the “forever” branch of R is ruled out by the live prefix being finite), matching F(alive∧t(f)).
tO(f)≡fint(f): each mixed temporal rule uses tG (resp. tS) on the constrained operand; by the above, those agree with t at alive positions, so tO(f) and t(f) agree at every alive position.
The invariant for tB follows because tB is simply the restriction of t to inputs in LTLB: since tB uses the same homomorphic rules as t for the common operators, tB(f)≡fint(f) holds for f∈LTLB by the same structural induction.
Together with the corrected wrapper (2), the new translation therefore has the same satisfiability behavior as the original on alive-encoded words.
3.7 Why Replace t by Four Functions?
As mentioned at the top of section 3, t(f), t_S(f), t_G(f), and t_O(f) all produce formulas that are equivalent under the alive prefix. For instance:
These LTL formulas are not equivalent in general, but are equivalent at the alive position of alive-encoded words.
The wrapper (2) adds a combination of terms that are in LTLS and in LTLG in every case, so choosing to, t_S, or t_G does not change the class of the resulting formula.
The reason we prefer to use to is that it will change fewer temporal operators when possible (e.g., if the LTLf formula already syntactically belongs to LTLO, it will only add the alive proposition, as in the original t function). Furthermore, compared to t_S and t_G, it can also deal with ⊕ and ↔ naturally.
Function t_B was added as an optimization to recover subcases where ⊕ and ↔ can be supported without blowup.
4 Availability in Spot
The new from_ltlf_O function has been implemented in Spot, and is intended to be available in the upcoming Spot 2.16 release:
% ltlfilt --from-ltlf -f 'GFa'
alive & G(!alive | (a R alive)) & F!alive & (alive W G!alive)
% ltlfilt --from-ltlf -f 'GFa' --syntactic-obligation -c
1
In Spot 2.16, the old reduction, which does not produce syntactic obligations, can still be obtained by setting the SPOT_FROM_LTLF environment variable to 0.
On this last example, the third command shows that the result of the second one is not a syntactic obligation.
References
[1] Edward Y. Chang, Zohar Manna, and Amir Pnueli. Characterization of temporal property classes. In Proceedings of the 19th International Colloquium on Automata, Languages and Programming (ICALP'92), pages 474–486, London, UK, 1992. Springer-Verlag. doi:10.1007/3-540-55719-9_97.
[2] Giuseppe De Giacomo and Moshe Y. Vardi. Linear temporal logic and linear dynamic logic on finite traces. In Francesca Rossi, editor, Proceedings of the 23rd International Joint Conference on Artificial Intelligence (IJCAI'13), pages 854–860, August 2013. doi:10.5555/2540128.2540252.
[3] Alexandre Duret-Lutz, Etienne Renault, Maximilien Colange, Florian Renkin, Alexandre Gbaguidi Aisse, Philipp Schlehuber-Caissier, Thomas Medioni, Antoine Martin, Jérôme Dubois, Clément Gillard, and Henrich Lauko. From Spot 2.0 to Spot 2.10: What's new? In Proceedings of the 34th International Conference on Computer Aided Verification (CAV'22), volume 13372 of Lecture Notes in Computer Science, pages 174–187. Springer, August 2022. doi:10.1007/978-3-031-13188-2_9.
[4] Alexandre Duret-Lutz, Giuseppe De Giacomo, Marcin Jurdzinski, Nir Piterman, Moshe Y. Vardi, and Shufang Zhu. Fast obligation translation and synthesis. In Proceedings of the 38th International Conference on Computer Aided Verification (CAV'26), volume 16682 of Lecture Notes in Computer Science, pages 322–339. Springer, July 2026. doi:10.1007/978-3-032-32519-8_17. Distinguished paper award.
[5] Zohar Manna and Amir Pnueli. A hierarchy of temporal properties. In Proceedings of the sixth annual ACM Symposium on Principles of distributed computing (PODC'90), pages 377–410, New York, NY, USA, 1990. ACM. doi:10.1145/93385.93442.