{'fraction_non_alphanumeric': 0.049962209075034535, 'fraction_numerical': 0.0057859209257473485, 'mean_word_length': 3.969563528040409, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 21, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Deciding Hyperproperties

Hyperproperties, like observational determinism or symmetry, cannot be expressed as properties of individual computation traces, because they describe a relation between multiple computation traces. HyperLTL is a temporal logic that captures such relations through trace variables, which are introduced through existential and universal trace quantifiers and can be used to refer to multiple computations at the same time. In this paper, we study the satisfiability problem of HyperLTL. We show that the problem is PSPACE-complete for alternation-free formulas (and, hence, no more expensive than LTL satisfiability), EXPSPACE-complete for exists-forall-formulas, and undecidable for forall-exists-formulas. Many practical hyperproperties can be expressed as alternation-free formulas. Our results show that both satisfiability and implication are decidable for such properties.


Introduction
Hyperproperties [4] are system properties that relate multiple computation traces. For example, in the design of a system that handles sensitive information, we might specify that a certain secret is kept confidential by requiring that the system is deterministic in its legitimately observable inputs, i.e., that all computations with the same observable inputs must have the same observable outputs, independently of the secret [12,15]. In the design of an access protocol for a shared resource, we might specify that the access to the resource is symmetric between multiple clients by requiring that for every computation and every permutation of the clients, there exists a computation where the access is granted in the permuted order [6].
To express hyperproperties in a temporal logic, linear-time temporal logic (LTL) has recently been extended with trace variables and trace quantifiers. In HyperLTL [3], observational determinism can, for example, be expressed as the formula ∀π.∀π ′ . (I π = I π ′ ) → (O π = O π ′ ), where I is the set of observable inputs and O is the set of observable outputs. The universal quantification of the trace variables π and π ′ indicates that the property must hold for all pairs of computation traces. It has been shown that many hyperproperties of interest can be expressed in HyperLTL [11].
In this paper, we study the satisfiability problem of HyperLTL. Unlike the model checking problem, for which algorithms and tools exist [3,6], the decidability and complexity of the satisfiability problem was, so far, left open. The practical demand for a decision procedure is strong. Often, one considers multiple formalizations of similar, but not necessarily equivalent hyperproperties. An alternative (and slightly stronger) version of observational determinism requires, for example, that differences in the observable output may only occur after differences in the observable input have occurred: ∀π.∀π ′ . (O π = O π ′ ) W (I π = I π ′ ). A decision procedure for HyperLTL would allow us to automatically check whether such formalizations imply each other. Another important application is to check whether the functionality of a system, i.e., a standard trace property, is compatible with the desired hyperproperties, such as confidentiality. Since both types of properties can be expressed in HyperLTL, a decision procedure for HyperLTL would make it possible to identify inconsistent system requirements early on, before an attempt is made to implement the requirements.
The fundamental challenge in deciding hyperproperties is that hyperproperties are usually not ω-regular [1]. HyperLTL formulas thus cannot be translated into equivalent automata [5]. Intuitively, since hyperproperties relate multiple infinite traces, an automaton, which only considers one trace at a time, would have to memorize an infinite amount of information from one trace to the next. This means that the standard recipe for checking the satisfiability of a temporal logic, which is to translate the given formula into an equivalent Büchi automaton and then check if the language of the automaton is empty [14], cannot be applied to HyperLTL.
In model checking, this problem is sidestepped by verifying the selfcomposition [2] of the given system: instead of verifying a hyperproperty that refers to n traces, we verify a trace property that refers to a single trace of a new system that contains n copies of the original system. Since the satisfiability problem does not refer to a system, this idea cannot immediately be applied to obtain a decision procedure for HyperLTL. However, it would seem natural to define a similar self-composition, on the formula rather than the system, in order to determine satisfiability.
We organize our investigation according to the quantifier structure of the Hy-perLTL formulas. LTL, for which the satisfiablity problem is already solved [13], is the sublogic of HyperLTL where the formulas have a single universally quantified trace variable, which is usually left implicit. The next larger fragment consists of the alternation-free formulas, i.e., formulas with an arbitrary number of trace variables and a quantifier prefix that either consists of only universal or only existential quantifiers. Many hyperproperties of practical interest, such as observational determinism, belong to this fragment. It turns out that the satisfiability of alternation-free formulas can indeed be reduced to the satisfiability of LTL formulas by replicating the atomic propositions such that there is a separate copy for each trace variable. This construction is sound, because in an alternation-free formula, the values for the quantifiers can be chosen independently of each other. The size of the resulting LTL formula is the same as the given HyperLTL formula; as a result, the satisfiability problem of the alternation-free fragment has the same complexity, PSPACE-complete, as LTL satisfiability.
If the formula contains a quantifier alternation, the values of the quantifiers can no longer be chosen independently of each other. However, if the quantifier structure is of the form ∃ * ∀ * , i.e., the formula begins with an existential quantifier and then has a single quantifier alternation, then it is still possible to reduce HyperLTL satisfiability to LTL satisfiability by explicitly considering all possible interactions between the existential and universal quantifiers. For example, In general, enumerating all combinations of existential and universal quantifiers causes an exponential blow-up and we show that the satisfiability problem for the ∃ * ∀ * -fragment is indeed EXPSPACE-complete. This high complexity is, however, relativized by the fact that practical hyperproperties rarely need a large number of quantifiers. If we bound the number of universal quantifiers by a constant, the complexity becomes PSPACE again.
Formulas where an existential quantifier occurs in the scope of a universal quantifier make the logic dramatically more powerful, because they can be used to enforce, inductively, models with an infinite number of traces. We show that a single pair of quantifers of the form ∀∃ suffices to encode Post's correspondence problem. The complete picture is thus as summarized in Table 1: The largest decidable fragment of HyperLTL is the EXPSPACE-complete ∃ * ∀ * fragment. Bounding the number of universal quantifiers and in particular restricting to alternation-free formulas reduces the complexity to PSPACE. Any fragment that contains the ∀∃ formulas is undecidable.
From a theoretical point of view, the undecidability of the ∀∃ fragment is a noteworthy result, because it confirms the intuition that hyperproperties are truly more powerful than trace properties. In practice, already the alternationfree fragment suffices for many important applications (cf. [6]). From a practical point of view, the key result of the paper is therefore that both satisfiability of alternation-free formulas and implication between alternation-free formulas, which can be expressed as an unsatisfiability check of an ∃ * ∀ * formula, are decidable.

HyperLTL
Let AP be a set of atomic propositions. A trace t is an infinite sequence over subsets of the atomic propositions. We define the set of traces TR := (2 AP ) ω . A subset T ⊆ TR is called a trace property. We use the following notation to manipulate traces: let t ∈ TR be a trace and i ∈ N be a natural number. t[i] denotes the i-th element of t. Therefore, t[0] represents the starting element of the trace. Let j ∈ N and LTL Syntax. Linear-time temporal logic (LTL) [8] combines the usual boolean connectives with temporal modalities such as the Next operator and the Until operator U. The syntax of LTL is given by the following grammar: where p ∈ AP is an atomic proposition. ϕ means that ϕ holds in the next position of a trace; ϕ 1 U ϕ 2 means that ϕ 1 holds until ϕ 2 holds. There are several derived operators, such as ϕ ≡ true U ϕ, ϕ ≡ ¬ ¬ϕ, and ϕ 1 W ϕ 2 ≡ (ϕ 1 U ϕ 2 ) ∨ ϕ 1 . ϕ states that ϕ will eventually hold in the future and states that ϕ holds globally; W is the weak version of the until operator.
LTL Semantics. Let p ∈ AP and t ∈ TR. The semantics of an LTL formula is defined as the smallest relation |= that satisfies the following conditions: LTL-SAT is the problem of deciding whether there exists a trace t ∈ TR such that t |= ψ. [13].

Theorem 1. LTL-SAT is PSPACE-complete
HyperLTL Syntax. HyperLTL [3] extends LTL with trace variables and trace quantifiers. Let V be an infinite supply of trace variables. The syntax of Hyper-LTL is given by the following grammar: where a ∈ AP is an atomic proposition and π ∈ V is a trace variable. Note that atomic propositions are indexed by trace variables. The quantification over traces makes it possible to express properties like "on all traces ψ must hold", which is expressed by ∀π. ψ. Dually, one can express that "there exists a trace such that ψ holds", which is denoted by ∃π. ψ. The derived operators , , and W are defined as for LTL.
HyperLTL Semantics. A HyperLTL formula defines a hyperproperty, i.e., a set of sets of traces. A set T of traces satisfies the hyperproperty if it is an element of this set of sets. Formally, the semantics of HyperLTL formulas is given with respect to a trace assignment Π from V to TR, i.e. a partial function mapping trace variables to actual traces. Π[π → t] denotes that π is mapped to t, with everything else mapped according to Π. Π[i, ∞] denotes the trace assignment that is equal to Π(π)[i, ∞] for all π.
HyperLTL-SAT is the problem of deciding whether there exists a non-empty set of traces T such that Π |= T ψ, where Π is the empty trace assignment and |= T is the smallest relation satisfying the conditions above. If it is clear from the context, we omit Π and simply write T |= ψ. If |= T ψ, we call T a model of ψ.

Alternation-free HyperLTL
We begin with the satisfiability problem for the alternation-free fragments of Hy-perLTL. We call a HyperLTL formula ψ (quantifier) alternation-free iff the quantifier prefix only consists of either only universal or only existential quantifiers. We denote the corresponding fragments as the ∀ * and ∃ * fragments, respectively. For both fragments, we show that every formula can be reduced, as discussed in the introduction, to an equisatisfiable LTL formula of the same size. As a result, we obtain that the satisfiability problem of alternation-free HyperLTL is PSPACE-complete, like the satisfiability problem of LTL.

The ∀ * Fragment
The ∀ * fragment is particularly easy to decide, because we can restrict the models, without loss of generality, to singleton sets of traces: since all quantifiers are universal, every model with more than one trace could immediately be translated into another one where every trace except one is omitted. Hence, we can ignore the trace variables and interpret the HyperLTL formula as a plain LTL formula.
Example 1. Consider the following HyperLTL formula with atomic propositions {a, b}: Since the trace variables are universally quantified, we are reasoning about every pair of traces, and thus in particular about the pairs where both variables refer to the same trace. It is, therefore, sufficient to check the satisfiability of the LTL formula b ∧ ¬b, which turns out to be unsatisfiable.
The satisfiability of hyperproperties that can be expressed in the ∀ * fragment, such as observational determinism, thus immediately reduces to LTL satisfiability.
Definition 1. Given a HyperLTL formula Q.ϕ, where Q is an arbitrary quantifier prefix. We delete every trace variable in ϕ and omit the quantifier prefix Q. We denote the resulting LTL formula by ϕ −l .
We prove that the previous definition preserves satisfiability with the following lemma. It states that, for a given ∀ * HyperLTL formula, every trace of a model does also satisfy the LTL formula obtained by Definition 1.
⊓ ⊔ Lemma 2. For every ∀ * HyperLTL formula there exists an equisatisfiable LTL formula of the same size.
-Assume ∀π 1 . . . ∀π n . ϕ is satisfiable by a trace set T . Choose an arbitrary trace t ∈ T . By Lemma 1, t is a witness for the satisfiability of ϕ −l , i.e., ϕ −l is satisfiable. -Assume the LTL formula ϕ −l is satisfiable by a trace t. A trace set satisfying ∀π 1 . . . ∀π n . ϕ is {t}, since t is assigned to every universally quantified trace variable.

⊓ ⊔
With this lemma, we provide proof that HyperLTL-SAT of ∀ * formulas inherits the complexity of LTL-SAT, which is PSPACE-complete.
Proof. We use Definition 1 to transform an arbitrary ∀ * HyperLTL formula to an LTL formula in polynomial space, which is, by Lemma 2, equisatisfiable to the original HyperLTL formula. LTL-SAT is, by Theorem 1, in PSPACE and thus ∀ * HyperLTL-SAT is in PSPACE too. We prove hardness with a reduction from LTL-SAT, which is, by Theorem 1, PSPACE-hard. An LTL formula ϕ is reduced to a HyperLTL formula ∀π. ϕ(π), where ϕ(π) denotes that every atomic proposition occurring in ϕ is labelled with π. The resulting formula ∀π. ϕ(π) is satisfiable by the singleton {t} if and only if ϕ is satisfiable by t, for all t ∈ TR. Hence, ∀ * HyperLTL-SAT is PSPACEcomplete.

The ∃ * Fragment
A model of a formula in the ∃ * fragment may, in general, have more than one trace. For example the models of ∃π 1 ∃π 2 . a π1 ∧¬a π2 have (at least) two traces. In order to reduce HyperLTL satisfiability again to LTL satisfiability, we zip such traces together. For this purpose, we introduce a fresh atomic proposition for every atomic proposition a and every path variable π that occur as an indexed proposition a π in the formula. We obtain an equisatisfiable LTL formula by removing the quantifier prefix and replacing every occurrence of a π with the new proposition.
Example 2. Consider the following HyperLTL formula over the atomic propositions {a, b}: By discarding the quantifier prefix and replacing the indexed propositions with fresh propositions, we obtain the equisatisfiable LTL formula over the atomic propositions {a 1 , b 1 , b 2 }: The LTL formula is satisfied by the tracep: ({a 1 , b 2 }) ω . We can map the fresh propositions back to the original indexed propositions. In this way, we obtain witnesses for π 1 and π 2 by splittingp into two traces {a} ω and {b} ω , where for every position in these traces only those atomic propositions that were labelled with π 1 or π 2 , respectively, hold. Hence, the trace set satisfying the HyperLTL formula is {{a} ω , {b} ω }.
We formally define a mapping that replaces atomic propositions, which are labelled with trace variables, with fresh atomic propositions, that contain the information, which is lost by discarding the quantifier prefix. For example, a πm will be replaced with a m . Definition 2. Let AP be {a 1 , . . . , a m } and ∃π 1 . . . ∃π n . ϕ be an ∃ * HyperLTL formula. We create an LTL formula ϕ ∃ by replacing every trace-labelled atomic proposition a 1π 1 , . . . , a 1π n , . . . , a mπ 1 , . . . , a mπ n with fresh atomic propositions of AP := m j=1 n i=1 a ji . Furthermore, we discard the quantifier prefix. The substitution is represented by the mapping s ∈ AP ×{1, . . . , n} → AP, where {1, . . . , n} represents the trace variables. We will use ϕ ∃ as notation for applying this construction.
After the replacement, we can construct a trace set by projecting every atomic proposition back to its corresponding trace, since Definition 2 preserves the necessary information. For example, consider a trace where a 1 and a 2 holds on the first position. The atomic proposition a ∈ AP will be put in the first position of the first and the second trace, but no other.
Definition 3. Let AP be a set of atomic propositions. Let s ∈ AP × {1, . . . , n} → AP be a substitution that maps trace-labelled atomic propositions to fresh ones. Lett be a trace that ranges over AP and ϕ an ∃ * HyperLTL formula with n quantifier. We also define s(M, i) for a set M ⊆ AP and This denotes that only the atomic propositions that correspond to the ith trace variable are kept in the corresponding trace. Therefore, pr s (t) := n i=1 pr s i (t) splits the trace t into a trace set containing n traces, each being a witness for its respective trace quantifier π i . -Let ∃π 1 . . . ∃π n . ϕ be an ∃ * HyperLTL formula. Assume there exists a model T ⊆ TR, s.t. T |= ∃π 1 , . . . , π n . ϕ. Let t 1 , . . . , t n ∈ T be the witnesses of π 1 , . . . , π n . We definet as the trace that is generated by zipping the traces t 1 , . . . , t n ∈ T together, which means that ∀j ∈ N.t[j] := n i=1 s(t i [j], i). Sincet is exactly the trace that satisfies ϕ ∃ by Definition 2,t |= ϕ ∃ must hold. This means we found a witness for satisfiability, namelyt.
• a ′ ∈t[k]: Assume a ′ holds at position k int. The projection pr s simply projects a ′ to a at position k of the witness of the ith quantifier, i.e., a ∈ t i [k].
• a ′ ∈t[k]: If a ′ does not hold at position k, a ′ is not projected to position k in p i , i.e., a ∈ t i [k].
Satisfiability is, therefore, preserved by the projection pr s of Definition 3. With Definition 2 above we have shown that ∃π 1 . . . ∃π n . ϕ and ϕ ∃ are equisatisfiable. ⊓ ⊔ Using Lemma 4, we prove the following lemma and conclude with Lemma 2 that HyperLTL-SAT inherits the complexity of LTL-SAT for the alternation-free fragment.
Proof. We use Definition 2 to transform an arbitrary ∃ * HyperLTL formula to a plain LTL formula using polynomial space, which is, by Lemma 4, equisatisfiable to the original HyperLTL formula. LTL-SAT is, by Theorem 1, in PSPACE and thus ∃ * HyperLTL-SAT is in PSPACE too. We prove hardness with a reduction from LTL-SAT, which is, by Theorem 1, PSPACE-hard. An LTL formula ϕ is reduced to a HyperLTL formula ∃π. ϕ(π), where ϕ(π) denotes that every atomic proposition occurring in ϕ is labelled with π. By definition the resulting formula ∃π. ϕ(π) is satisfiable if and only if ϕ is satisfiable. Hence, ∃ * HyperLTL-SAT is PSPACE-complete.
Proof. Follows directly from Lemma 3 and Lemma 5.
Allowing quantifier alternation makes the satisfiability problem significantly more difficult, and even leads to undecidability, as we will see in the next section.
In this section, we show that deciding formulas with a single quantifier alternation is still possible if the quantifiers start with an existential quantifier. A Hyper-LTL formula is in the ∃ * ∀ * fragment iff it is of the form ∃π 1 . . . ∃π n ∀π ′ 1 . . . ∀π ′ m . ψ. This fragment is especially interesting, because it includes implications between alternation-free formulas. The idea of the decision procedure is to eliminate the universal quantifiers by explicitly enumerating all possible interactions between the universal and existential quantifiers. This leads to an exponentially larger, but equisatisfiable ∃ * formula. Lemma 6. For every formula in the ∃ * ∀ * fragment, there is an equisatisfiable formula in the ∃ * fragment with exponential size.
Proof. We define a function sp that takes a formula of the form ∃π 1 . . . ∃π n ∀π ′ 1 . . . ∀π ′ m . ψ and yields an ∃ * HyperLTL formula ψ ′ of size O(n m ) of the following shape, where ψ[π ′ i \π i ] denotes that the trace variable π ′ i in ψ is replaced by π i .
Let ϕ be an ∃ * ∀ * HyperLTL formula satisfied by some model T . Hence, there exist traces t 1 , . . . , t n ∈ T such that {t 1 , . . . , t n } satisfies sp(ϕ). Assume sp(ϕ) is satisfied by some model T ′ . Since sp covers every possible combination of trace assignments for the universally quantified trace variables, . Applying the construction from Lemma 6, we obtain the following ∃ * formula: Combining the construction from Lemma 6 with the satisfiability check for ∃ * formulas from Section 3, we obtain an exponential-space decision procedure for the ∃ * ∀ * fragment. Proof. Membership in EXPSPACE follows from Lemma 6 and Lemma 4. We show EXPSPACE-hardness via a reduction from the problem whether an exponential-space bounded deterministic Turing machine T accepts an input word x. Given T and x, we construct an ∃ * ∀ * HyperLTL formula ϕ such that T accepts x iff ϕ is satisfiable.
Let T = (Σ, Q, q 0 , F, →), where Σ is the alphabet, Q is the set of states, q 0 ∈ Q is the initial state, F ⊆ Q is the set of final states, and → ⊆ Q × Σ × Q × Σ × {L, R} is the transition relation. We use (q, σ) → (q ′ , σ ′ , ∆) to indicate that when T is in state q and it reads the input σ in the current tape cell, it changes its state to q ′ , writes σ ′ in the current tape cell, and moves its head one cell to the left if ∆ = L and one cell to the right if ∆ = R. Let n ∈ O(|x|) be such that the working tape of T has 2 n cells. We encode each letter of Σ as a valuation of a set s = {s 1 , . . . , s kΣ } of atomic propositions and each state Q as a valuation of another set q = {q 1 , . . . , q kQ } of atomic propositions, where k Σ is logarithmic in |Σ| and k Q is logarithmic in |Q|. We furthermore use the valuations of a set a = {a 1 , . . . , a n } to encode the position of a tape cell in a configuration of T , and the valuations of a set h = {h 1 , . . . , h n } to encode the position of the head of the Turing machine. With these atomic propositions, we can represent configurations of the Turing machine as sequences of valuations of the atomic propositions. The state of the Turing machine is encoded as the valuation of q at the position indicated by h. Computations of a Turing machine are sequences of configurations; we thus represent computations as traces.
We begin our encoding into HyperLTL with four quantifier-free formulas over a free trace variable π: ϕ init (π) encodes that the initial configuration represents x and q 0 , and places the head in the first position of the sequence. ϕ head (π) ensures that the position of the head may only change when a new configuration begins and that the change of the position as well as the change of the state is as defined by →. ϕ count (π) expresses that the addresses in a continuously count from 1 to 2 n . ϕ halt (π) expresses that the Turing machine halts eventually, i.e., the trace eventually visits a final state at the position of the head.
The more difficult part of the encoding now concerns the comparison of the tape content from one configuration to the next. We need to enforce that the tape content at the position represented by h changes as defined by →, and that the content of all tape cells except for the position represented by h stays the same. For this purpose, we need to be able to memorize a position from one configuration to the next. We accomplish the "memorization" with the following trick: we introduce two existentially quantified trace variables π zero and π one . Let v be a new atomic proposition. We use a quantifier-free formula ϕ zero/one (π zero , π one ) to ensure that v is always false on π zero and always true on π one . We now introduce another set of n universally quantified trace variables π 1 , π 2 , . . . , π n that will serve as memory: if one of these trace variables is bound to π zero its "memory content" is 0, if it is bound to π one its memory content is 1. We add a sufficient number of universally quantified variables to memorize the position of some cell and its content. Our complete encoding of the Turing machine as a HyperLTL formula then looks, so far, as follows: ∃π, π zero , π one . ∀π 1 , π 2 , . . . , π n , π ′ 1 , π ′ 2 , . . . , π ′ kΣ . ϕ init (π) ∧ ϕ head (π) ∧ ϕ count (π) ∧ ϕ halt (π) ∧ ϕ zero/one (π zero , π one ) ∧ ψ(π, π 1 , π 2 , . . . , π n , π ′ 1 , π ′ 2 , . . . , π ′ kΣ ) The missing requirement about the correct contents of the tape cells is encoded in the last conjunct ψ. We first ensure that all the universally quantified traces have constant values in v, i.e., v is either always true or always false. To enforce that the tape content changes at the head position, we specify in ψ that whenever we are at the head position, i.e., whenever a i,π = h i,π for all i = 1, . . . , n, then when we visit the same position in the next configuration, the tape content must be as specified by →: i.e., if a i,π = v πi for all i = 1, . . . , n, then when a i,π = v πi holds again for all i = 1, . . . , n during the next configuration, the tape content as represented in s must be the one defined by →. To enforce that the tape content is the same at every position except that encoded in h, we specify that for all positions except the head position, i.e., whenever a i,π = h i,π for some i = 1, . . . , n, then if a i,π = v πi for all i = 1, . . . , n, and s i,π = v π ′ i for all i = 1, . . . , k Σ , then the following must hold: when, during the next configuration, we visit the same position again, i.e., when again a i,π = v πi for all i = 1, . . . , n, we must also find the same tape content again, i.e., s i,π = v π ′ i for all i = 1, . . . , k Σ .
By induction on the length of the computation prefix, we obtain that any model of the HyperLTL formula represents in π a correct computation of the Turing machine T . Since this computation must reach a final state, the model exists iff T accepts the input word x.
⊓ ⊔ In practice, the number of quantifiers is usually small. Often it is sufficient to reason about pairs of traces, which can be done with just two quantifiers. To reflect this observation, we define a bounded version of the ∃ * ∀ * fragment where the number of universal quantifiers that may occur in the HyperLTL formula is bounded by some constant b ∈ N. A bounded ∃ * ∀ * formula of length n with bound b can be translated to an equisatisfiable LTL formulas of size O(n b ). The satisfiablility problem can thus be solved in polynomial space.
Another observation that is important for the practical application of our results is that implication between alternation-free formulas is decidable. As discussed in the introduction, it frequently occurs that multiple formalizations are proposed for the same hyperproperty, and one would like to determine whether the proposals are equivalent, or whether one version is stronger than the other. A HyperLTL formula ψ implies a HyperLTL formula ϕ iff every set T of traces that satisfies ψ also satisfies ϕ.
To determine whether ψ implies ϕ, we check the satisfiability of the negation ¬(ψ → ϕ). If one formula is in the ∀ * fragment and the other in the ∃ * fragment, implication checking is especially easy, because the formula we obtain is alternation-free. If the given HyperLTL formulas are both in the ∀ * fragment, respectively ∃ * fragment, we can construct an equisatisfiable ∃ * ∀ * HyperLTL formula with the help of the following lemma.
Lemma 7. Implication between two HyperLTL formulas of the ∀ * fragment is decidable in exponential space.
⊓ ⊔ Lemma 8. Implication between two HyperLTL formulas of the ∃ * fragment is decidable in exponential space.
Proof. The proof is done analogously to the proof of Lemma 7. ⊓ ⊔ Analogously to Theorem 3, we obtain that checking implication between two alternation-free HyperLTL formulas is EXPSPACE-complete.
⊓ ⊔ With the results of this section, we have reached the borderline of the decidable HyperLTL fragments. We will see in the next section that HyperLTL-SAT immediately becomes undecidable if the formulas contain a quantifier alternation that starts with a universal quantifier.

The Full Logic
We now show that any extension beyond the already considered fragments makes the satisfiability problem undecidable. We prove this with a many-one-reduction from Post's correspondence problem (PCP) [10] to the satisfiability of a ∀∃ Hy-perLTL formula. In PCP, we are given two lists α and β consisting of finite words from some alphabet Σ. For example, α, with α 1 = a, α 2 = ab and α 3 = bba and ∀π∃πs∃π ′ .
(ȧ,ȧ)π s ∨ (ḃ,ḃ)π s (1) β, with β 1 = baa, β 2 = aa and β 3 = bb, where α i denotes the ith element of the list, and α ij denotes the jth symbol of the ith element. In this example, α 31 corresponds to b. PCP is the problem to find an index sequence (i k ) 1≤k≤K with K ≥ 1 and 1 ≤ i k ≤ n for all k, such that α i1 . . . α iK = β i1 . . . β iK . We denote the finite words of a PCP solution with i α and i β respectively. It is a useful intuition to think of the PCP instance as a set of n domino stones. The first stone of our example is a baa , the second is ab aa and the third, and last, is bba bb . Those stones must be arranged (where copying is allowed) to construct the same word with the α-and β-concatenations. A possible solution for this PCP instance would be (3, 2, 3, 1), since the stone sequence bba bb ab aa bba bb a baa produces the same word, i.e., bbaabbbaa = i α = i β . For modelling the necessary correspondence between the α and β components, we will use pairs of the PCP instance alphabet as atomic propositions, e.g., (a, b). We represent a stone as a sequence of such pairs, where the first position of the pair contains a symbol of the α component and the second position a symbol of the β component. For example, the first stone a baa will be represented as (a, b), (#, b)(#, a). We will use # as a termination symbol. Since the α and β component of a stone may differ in its length, a sequence of stone representations might "overlap". Therefore, we indicate the start of a new stone with a dotted symbol. For example, we can string the first stone two times together: (ȧ,ḃ), (ȧ, b)(#, a)(#,ḃ)(#, b)(#, a). In the following, we writeã if we do not care if this symbol is an a orȧ and use * as syntactic sugar for an arbitrary symbol of the alphabet. We assume that only singletons are allowed as elements of the trace, which could be achieved by adding for every atomic proposition (y 1 , y 2 ) the conjunction (y1,y2) =(y,y ′ ) (¬((y 1 , y 2 )∧ (y, y ′ ))), for all (y, y ′ ).
∧ ( ( * , #)π → ( * , #) π ′ ) (14) Fig. 2. Formula in the reduction of the PCP instance from Example 4, encoding that a trace may start with a valid stone 3 and that there must also exist a trace where stone 3 is deleted.
The subformula (1) expresses that there exists a trace that starts with (ȧ,ȧ) or (ḃ,ḃ). Intuitively, this means that there must exist a stone whose α and β component start with the same symbol. Subformula (2) requires that there exists a "solution" trace π s . It ensures that the trace ends synchronously with (#, #) ω . Combined, this guarantees that the word constructed from the α components is equal to the word constructed from the β components, i.e., i α = i β for a PCP solution i(k). Subformula (3) ensures that every trace eventually ends with the termination symbol #. It is important to notice here that all traces besides π s are allowed to end asynchronously.
It remains to ensure that trace π s only consists of valid stones. This is where the ∀∃ structure of the quantifier prefix comes into play. The key idea is to use a ∀∃ formula to specify that for every trace with at least one stone there is another trace with the first stone removed. Since we check that every trace begins with a valid stone, this implies that all stones are valid. The encoding of stone 3 is exemplarily shown in Figure 2. The first three α components and the first two β components of the new trace are deleted. The example set shown in Figure 3 shows this behavior for π s , which starts with stone 3. By deleting stone 3 from π s and shifting every position accordingly, we obtain π ′ . Since π ′ starts with a valid stone, namely stone 2, it satisfies subformula (4) for i = 2. This requires that there exists another trace where stone 2 is deleted analogously. This argument is repeated until the trace is reduced to (#, #) ω , which is the only possibility for "termination" in the sense that π s ends synchronously with (#, #) ω .
Corresponding to this example, we can give a generalized reduction, establishing the undecidability of ∀∃ formulas.

Theorem 5. ∀∃ HyperLTL-SAT is undecidable.
Proof. Let a PCP instance with Σ = {a 1 , a 2 , ..., a n } and two lists α and β be given. We choose our alphabet as follows: Σ ′ = (Σ ∪ {ȧ 1 ,ȧ 2 , ...,ȧ n } ∪ #) 2 , where we use the dot symbol to encode that a stone starts at this position of the trace. Again, we writeã if we do not care if this symbol is an a orȧ and use * as syntactic sugar for an arbitrary symbol of the alphabet. We encode the idea from Example 4 in the following formula.
We ensure that there exists a "solution" trace π s , which starts pointed, i.e., where the α and β components are the same. Accordingly to PCP, we require synchronous "termination".
ϕ validStone (π). This is ensured by a generalization of lines (7) and (8) of the stone encoding sketched in Figure 2. Every trace in the trace set starts with a valid stone. Note that we do not require synchronous termination in any other trace than the "solution" trace. -ϕ delete (π, π ′ ). This is ensured by a generalization of lines (9) to (14) of the stone encoding sketched in Figure 2. By exploiting the ∀∃ structure of the formula, we encode that for every trace π there exists another trace π ′ which is nearly an exact copy of π but with its first stone removed.
Correctness. We prove correctness of the reduction by showing that if there exists a solution, namely an index sequence i(l) with l ∈ N, for a PCP instance, then there exists a trace set T satisfying the resulting formula ϕ reduc and vice versa. For the sake of readability, we, again, omit the set braces around atomic propositions, since we can assume that only singletons occur.
-Assume there exists a solution i to the given PCP instance with |i α | = |i β | = k. We can construct a trace set T by building the trace )(#, #) ω , denoted by t 0 and adding a dot to the symbol corresponding to the new stones start. We can infer the correct placement of the dots from the solution. We distinguish two cases. If the solution is only of length 1, we add (#, #) ω to T and successfully constructed a trace set satisfying the formula. Otherwise, let t 0 start with stone j. We also add one of the following traces t 1 based on t 0 to T : We repeat adding traces t n based on the starting stone of every newly added trace t n−1 until we terminate with (#, #) ω . Note that t n−1 might already end asynchronously. By construction this is exactly a trace set T satisfying ϕ reduc . -Let the formula ϕ reduc be satisfiable by a trace set T . Therefore, there exists a witness t 0 for π s , which starts with a dot, whose α and β components are the same at all positions, and which ends synchronously with (#, #) ω . t 0 also needs to start with a valid stone, which is ensured by the stone encoding, since otherwise t 0 ∈ T . By construction there exists a subset T min ⊆ T that satisfies ϕ reduc , which contains t 0 and every trace constructed by deleting one stone after another, with the last trace being (#, #) ω . Because t 0 eventually terminates synchronously with (#, #), the solution remains finite. We define a total order for the traces in T min according to the number of dots or, equivalently, the number of stones. We also define a function s that maps traces to the index of their starting stone. Let A = [t 0 , t 1 , . . . , t n ] be the list of traces in T min sorted in descending order. A possible solution for the PCP instance is the index sequence s(t 0 ) s(t 1 ) . . . s(t n ).
Since we can use the construction from Section 3.2, the minimal undecidable fragment of HyperLTL is, in fact, ∀∃. ⊓ ⊔

Conclusion
We have analyzed the decidability and complexity of the satisfiability problem for various fragments of HyperLTL. The largest decidable fragment of Hyper-LTL is the EXPSPACE-complete ∃ * ∀ * fragment; the alternation-free ∃ * and ∀ * formulas are PSPACE-complete; any fragment that contains the ∀∃ formulas is undecidable. Despite the general undecidability, our results provide a strong motivation to develop a practical SAT checker for HyperLTL. The key result is the PSPACE-completeness for the alternation-free fragment and the bounded ∃ * ∀ * fragment, which means that for the important class of hyperproperties that can be expressed as a HyperLTL formula with a bounded number of exclusively universal or exclusively existential quantifiers, satisfiability and implication can be decided within the same complexity class as LTL.
There are several directions for future work. An important open question concerns the extension to branching time. HyperLTL is a sublogic of the branchingtime temporal logic HyperCTL * [3]. While the undecidability of HyperLTL implies that HyperCTL * is also, in general, undecidable (this was already established in [3]), the obvious question is whether it is possible to establish decidable fragments in a similar fashion as for HyperLTL.
Another intriguing, and still unexplored, direction is the synthesis problem for HyperLTL (and HyperCTL * ) specifications. In synthesis, we ask for the existence of an implementation, which is usually understood as an infinite tree that branches according to the possible inputs to a system and whose nodes are labeled with the outputs of the system. Since HyperLTL can express partial observability, the synthesis problem for HyperLTL naturally generalizes the well-studied synthesis under incomplete information [7] and the synthesis of distributed systems [9].
Finally, it will be interesting to develop a practical implementation of the constructions presented in this paper and to use this implementation to analyze the relationships between various hyperproperties studied in the literature.