The addition of temporal neighborhood makes the logic of prefixes and sub-intervals EXPSPACE-complete

A classic result by Stockmeyer gives a non-elementary lower bound to the emptiness problem for star-free generalized regular expressions. This result is intimately connected to the satisfiability problem for interval temporal logic, notably for formulas that make use of the so-called chop operator. Such an operator can indeed be interpreted as the inverse of the concatenation operation on regular languages, and this correspondence enables reductions between non-emptiness of star-free generalized regular expressions and satisfiability of formulas of the interval temporal logic of chop under the homogeneity assumption. In this paper, we study the complexity of the satisfiability problem for suitable weakenings of the chop interval temporal logic, that can be equivalently viewed as fragments of Halpern and Shoham interval logic. We first consider the logic $\mathsf{BD}_{hom}$ featuring modalities $B$, for \emph{begins}, corresponding to the prefix relation on pairs of intervals, and $D$, for \emph{during}, corresponding to the infix relation. The homogeneous models of $\mathsf{BD}_{hom}$ naturally correspond to languages defined by restricted forms of regular expressions, that use union, complementation, and the inverses of the prefix and infix relations. Such a fragment has been recently shown to be PSPACE-complete . In this paper, we study the extension $\mathsf{BD}_{hom}$ with the temporal neighborhood modality $A$ (corresponding to the Allen relation \emph{Meets}), and prove that it increases both its expressiveness and complexity. In particular, we show that the resulting logic $\mathsf{BDA}_{hom}$ is EXPSPACE-complete.


Introduction
Interval temporal logics (ITLs for short) are versatile and expressive formalisms to specify properties of sequences of states and their duration. When it comes to fundamental problems like satisfiability, their high expressive power is often obtained at the price of undecidability. As an example, the satisfiability problem of the most widely known ITLs, namely, Halpern and Shoham's HS [HS91], and Venema's CDT [Ven91a], turn out to be highly undecidable. Despite these negative results, a number of decidable logics have been identified by suitably weakening ITLs (see [BMM + 14] for a complete classification of HS fragments). Here the term "weakening" is intended as a set of syntactic and/or semantics restrictions imposed on the formulas of the logic and/or the temporal structures on which such formulas are interpreted, respectively. Among the plethora of possible weakenings, in this paper we focus on (the combination of) the following two natural and well-studied restrictions: • Restrict the set of interval relations. Many decidable fragments of ITLs are obtained by considering a restricted set of Allen's relations over pairs of intervals. This approach naturally induces fragments of HS with modalities corresponding to the selected subset of interval relations. As an example, the logic of temporal neighborhood (PNL for short) features only 2 modalities, corresponding to 2 interval relations among the possible 13 ones, namely, A (adjacent to the right) and its inversē A [CH97]. PNL has been shown to be decidable over all meaningful classes of linear orders [BMSS11,MS12]. • Restrict the class of models. As an alternative, it is possible to tame the complexity of ITLs by restricting to classes of models that satisfy certain specific assumptions. An example of such an approach can be found in a recent series of papers that study the model checking problem for ITLs (see, e.g., the seminal paper [MMM + 16]), as well as their expressiveness compared to that of classical point-based temporal logics, like LTL, CTL, and CTL * [BMM + 19a]. In this setting, models are represented as Kripke structures, and are inherently point-based rather than interval-based. The very same models can be obtained from interval temporal structures by making the so-called homogeneity assumption, that is, by assuming that every proposition letter holds over an interval if and only if it holds at all its points [Roe80]. Under such an assumption, full HS has a decidable satisfiability problem (as a matter of fact, the model checking procedures proposed in the aforementioned series of papers can be easily turned into satisfiability procedures, often retaining the same complexity) [MMM + 16]. Because of this, the focus in studying HS fragments under the homogeneity assumption was shifted from decidability to complexity.
Under the homogeneity assumption, a natural connection to generalized * -free regular languages emerges from the analysis of the complexity of ITLs over finite linear orders. A classic result by Stockmeyer states that the emptiness problem for generalized * -free regular expressions is non-elementarily decidable (tower-complete) for unbounded nesting of negation [Sch16,Sto74] (it is (k-1)-EXP SP ACE-complete for expressions where the nesting of negation is at most k ∈ N + ). Such a problem can be easily turned into the satisfiability problem for the logic C of the chop modality, over finite linear orders, under the homogeneity assumption [HMS08, Mos83,Ven91b], and vice versa. C has one binary modality only, the so-called chop operator, that allows one to split the current interval in two parts and to state what is true over the first part and what over the second one. It can be easily shown that there is a LOGSP ACE-reduction of the emptiness problem for generalized * -free regular expressions to the satisfiability problem for C with unbounded nesting of the chop operator, and vice versa.
The close relationships between formal languages and ITLs have been already pointed out in [MS13a,MS13b], where the ITL counterparts of regular languages, ω-regular languages, and extensions of them (ωB-and ωS-regular languages) have been provided. Here, we focus on some meaningful fragments of C (under the homogeneity assumption). 1 Modalities for the prefix, suffix, and infix relations over (finite) intervals can be easily defined in C. We have that a formula holds over a prefix of the current interval if and only if it is possible to split the interval in such a way that the formula holds over the first part and the second part contains at least two points. The case of suffixes is completely symmetric. Infixes can be defined in terms of prefixes and suffixes: a proper sub-interval of the current interval is a suffix of one of its prefixes or, equivalently, a prefix of one of its suffixes. The satisfiability problem for the logic D hom of the infix relation has been recently shown to be P SP ACEcomplete by a suitable contraction method [BMM + 17]. The same problem has been proved to be EXP SP ACE-hard for the logic BE hom of prefixes and suffixes by a polynomial-time reduction from a domino-tiling problem for grids with rows of single exponential length [BMM + 19b]. As for the upper bound, the only available one is given by the non-elementary decision procedure for HS hom [MMM + 16] (BE hom is a small fragment of it). Despite several attempts, no progress has been done in the reduction/closure of such a very large gap. 2 A couple of additional elements that help in understanding why BE hom is such a peculiar beast are the following: (i) as shown in [BMM + 19b], the only known fragments of HS hom whose satisfiability problem has been given an EXPSPACE lower bound contain both B and E modalities; (ii) the satisfiability problem for the logic DE hom (and the symmetric logic BD hom ), which is a maximal proper fragment of BE hom , has been recently proved to be PSPACE-complete [BMM + 17, BMPS20,BMPS21b].
Goals and structure of the paper. In this paper, we identify the first EXPSPACEcomplete fragment of HS hom which does not include both B and E modalities. Such a fragment is the logic BDA hom , which extends BD hom with the meet (adjacent to the right) modality A. As a preparatory step, we apply the proposed model-theoretic proof technique to the simpler fragment BD hom ; then, we show that it can be tailored to the logic BDA hom without any increase in complexity. The paper is organized as follows. In Section 2, we provide a gentle introduction to ITLs. We first introduce in an informal way the two main propositional ITLs, namely CDT and HS, interpreted over finite linear orders. Then, by making use of a simple example, we compare their expressive power with that of Linear Temporal Logic (LTL). Next, in Section 3, we specify syntax and semantics of BD hom , and we point out some interesting connections between BD hom formulas and restricted forms of generalized * -free regular expressions. Then, we prove a small model theorem for the satisfiability of BD hom formulas over finite linear orders, which provides a doubly exponential bound (in the size of the formula) on their models. By exploiting such a small model theorem, we show that there exists a decision procedure to check satisfiability of BD hom formulas that works in exponential space with respect to the size of the input formula. The proof consists of the following sequence of 1 Hereafter, for any ITL X, we will write X hom to indicate that we are considering X under the homogemeity assumption.
2 In fact, the only achieved result was a negative one showing that there is no hope in trying to tailor the proof techniques exploited for HS hom , which are based on the notion of BE-descriptor, to BE hom , as it is not possible to give an elementary upper bound on the size of BE-descriptors (in the case of BE hom ) [BMP19].
steps. In Section 4, we introduce and discuss a spatial representation of the models of BD hom formulas, called compass structure. Then, in Section 5, we prove a series of spatial properties of compass structures for formulas involving modalities B and D. Next, in Section 6, by making use of the properties stated in Section 5, we prove the small model theorem for BD hom , which allows us to devise a procedure to check the satisfiability of BD hom formulas over finite linear orders of EXPSPACE complexity. It is worth pointing out that such a decision procedure is sub-optimal, given the results proved in [BMPS21b], where a PSPACE decision procedure for the very same problem is provided; however, it plays an instrumental role in the proof of the main result of the paper about BDA hom . In Section 7, we introduce modality A and formally define the logic BDA hom ; in addition, we define and discuss its counterpart in terms of generalized * -free regular expressions. In Section 8, we first prove that the properties stated in Section 5 still holds for BDA hom , and then we show that an EXPSPACE decision procedure for BDA hom , over finite linear orders, can be obtained from the one developed in Section 6 with a few small adjustments. In Section 9, we prove EXPSPACE-hardness of the satisfiability problem for BDA hom , over finite linear orders, by providing a reduction from the exponential corridor tiling problem, thus allowing us to conclude that the EXPSPACE complexity bound for BDA hom finite satisfiability is tight. In Section 10, we provide an assessment of the work and outline future research directions.

A gentle introduction to Interval Temporal Logics (ITLs)
In this section, we provide a gentle introduction to ITLs, focusing on the features that distinguish them from point-based temporal logics. As a term of comparison, we choose LTL. For the sake of simplicity, we restrict our attention to totally ordered finite models, that is, finite prefixes 0 < 1 < . . . < N of N. With a little abuse of notation, we denote such an order by N . In such a setting, the focus is on LTL formulas interpreted on finite traces (we will refer to the set of finite traces simply as models). In the literature, LTL over finite traces is commonly referred to LTL f [GV13,GMM14]. Let Prop be a set of proposition letters. The first, crucial difference between ITLs and LTL f is the way in which Prop is interpreted over models. Let I N = {[x, y] ∶ 0 ≤ x ≤ y ≤ N } be the set of all and only intervals on N . In the case of LTL f , we have a function π ∶ N → 2 Prop , while, in the case of ITLs, we have V ∶ I N → 2 Prop . It is easy to see that V is, in fact, a generalization of π, as the point-based semantics π can be embedded in the interval-based one V by assuming π(x) = V([x, x]), for all x ∈ N . From now on, we will refer to intervals of the form [x, x] as point-intervals and to intervals of the form [x, y], with x < y, as strict-intervals. Whenever we will not need to distinguish between point-and strict-intervals, we will simply refer to them as intervals.
In its full generality, ITL interval-based semantics does not impose any constrain on the relationships between the proposition letters that hold over a strict-interval and those that hold over the point-intervals that it includes, that is, the set of proposition letters V([x, y]) that hold over the strict-interval One of the first ITLs proposed in literature was CDT [Ven90], whose name comes from its three binary modalities C (Chopping), D (Dawning), and T (Terminating). Their semantics is graphically depicted in Figure 2. Intuitively speaking, if we take a point z inside an interval [x, y] and we consider the ternary relation [x, y] may be split into [x, z] and [z, y], the three CDT modalities allow one to talk about the properties of such a relation starting from any of the three intervals. More precisely, a formula ψ 1 C ψ 2 (chopping between ψ 1 and ψ 2 ) holds over an interval [x, y] Figure 2).
CDT turns out to be very expressive. It can be easily checked that it allows one to specify a number of advanced properties in a straightforward way. As an example, it is easy to write a CDT formula that forces one or more proposition letter to behave like an equivalence relation over the points of the underlying linear order. However, such an expressivity is paid with an undecidable satisfiability problem on every interesting linear order, that is, any linear order but bounded ones, where the problem is trivially decidable. Such a statement holds even if we consider any of the fragments of CDT that contains just one modality among C , D , and T [GMSS06].  A meaningful fragment of CDT is HS [HS91], which features a unary modality for each ordering relation between a pair of intervals (the so-called Allen's relations [All81]), as shown in Figure 3. For the sake of simplicity, in Figure 3, we deliberately omitted the modality for the inverse of each considered relation, namely ⟨A⟩, ⟨B⟩, ⟨D⟩, ⟨E⟩, ⟨L⟩, and ⟨O⟩. The semantics of each HS modality can be captured by a suitable combination of CDT modalities as shown in Figure 4. The converse is not true. In Figure 4, we make an extensive use of the modal constant π, which holds over an interval [x, y] if and only if x = y, that is, [x, y] is a point-interval. It immediately follows that ¬π holds on all and only strict intervals. It is worth pointing out that some HS modalities can be defined as suitable combinations of other ones (a complete account of definability equations for the most significant classes of linear orders is given in [BMM + 14, BMM + 19c]). For what concerns the HS fragments considered in this paper, namely those featuring unary modalities ⟨A⟩, ⟨B⟩, and ⟨D⟩ (which should not be mistaken with the binary modality D of CDT), we have that modality ⟨L⟩ can be defined in terms of modality ⟨A⟩ and modality ⟨D⟩ can be expressed by means of a suitable combination of modalities ⟨B⟩ and ⟨E⟩. Notice that the opposite is not true, e.g., ⟨A⟩ cannot be expressed by means of modality ⟨L⟩. Moreover, in BDA it is not possible to define ⟨A⟩ in terms of ⟨L⟩, ⟨D⟩, and ⟨B⟩ and it is not possible to express ⟨B⟩ (resp., ⟨D⟩) in terms of ⟨A⟩ and ⟨D⟩ (resp., ⟨B⟩). We conclude the section by showing how both LTL f modalities Until (ψ 1 U ψ 2 ) and Next ( ψ) can be easily encoded by means of a combination of modalities ⟨A⟩ and ⟨B⟩ (no need to bring up modality ⟨D⟩). In Figure 5, we give the formulas that define ψ 1 U ψ 2 (above) and ψ (below) in AB together with a graphical account of how they "operate" on an interval model. Then, in Figure 6 we applied these encodings to translate the formula p U (¬p ∧ ¬q) (resp., (¬p ∧ ¬q)) into an equivalent formula of AB and, by means of the example of Figure 1, we show how the interval model is constrained when the resulting formula holds over an interval.

Allen relation
As shown in Figure 5 (top), the LTL f formula ψ 1 U ψ 2 is translated into the conjunction of [B]⟨A⟩(π ∧ ψ 1 ) and ⟨A⟩(π ∧ ψ 2 ). Let us recall that ψ 1 U ψ 2 holds at a point x if there exists a point y, with x ≤ y, where ψ 2 holds, and, for each point x ≤ x i < y, ψ 1 holds at x i . The idea behind the translation (a graphical account of it is given in Figure 5) exploits the generality of interval semantics to force the translation of ψ 1 U ψ 2 to hold over the whole interval [x, y]. Then, it constrains the formula ψ 2 to hold on [y, y], that is, the right endpoint of the interval, by means of the conjunct ⟨A⟩(π ∧ ψ 2 ), which literally says taht there exists an interval [y, y ′ ], which begins exactly where the current one ends (modality ⟨A⟩) and is a point-interval (constant π), where ψ 2 holds. Such an interval [y, y ′ ] can thus be only the interval [y, y]. The first conjunct [B]⟨A⟩(π ∧ ψ 1 ) forces the formula ⟨A⟩(π ∧ ψ 1 ) to hold on each proper prefix (modality Then, by the very same argument we used for ⟨A⟩(π ∧ ψ 2 ), we have that ψ 1 holds on each point-interval In Figure 6 (top), we give an example of the application of the proposed translation that makes use of the model of Figure 1. In particular, we analyze the translation of the LTL f formula p U (¬p ∧ ¬q), which is true at time point 0 according to the point-based semantics π, into the AB formula ψ = ([B]⟨A⟩(π ∧ p) ∧ ⟨A⟩(π ∧ ¬p ∧ ¬q)), which holds over the interval [0, 3] according to the interval-based semantics V. Let us assume that the formula ψ holds over the interval [0, 3]. Its second conjunct ⟨A⟩(π ∧ ¬p ∧ ¬q) forces the existence of an interval [3, y], with y ≥ 3, where π, ¬p, and ¬q hold. The truth of π on the Figure 4. A graphical account of the encoding of HS modalities in CDT.
Let us consider now LTL f modality . In Figure 5 (bottom), we provide the translation of ψ into ψ ′ = ⟨A⟩(¬π ∧ [B]π ∧ ⟨A⟩(π ∧ ψ)). According to the semantics of , ψ holds at a point x if and only if ψ holds at the point x + 1. As a matter of fact, for the sake of generality and simplicity, the proposed translation ψ ′ of ψ holds on an interval [x, y] if and only if ψ holds at the point-interval [y + 1, y + 1] regardless of the fact that [x, y] is a strictinterval or a point-interval. It is possible to force [x, y] to be a point-intervals by adding π as a conjunct of the translation, that is, by defining ψ ′ as π ∧ ⟨A⟩(¬π ∧ [B]π ∧ ⟨A⟩(π ∧ ψ)). A graphical account of the translation is given in Figure 5 (  there exists an interval [y + 1, y ′ ] where both π and ψ hold. The truth of π over [y + 1, y ′ ] allows us to conclude that y ′ = y + 1, and thus ψ holds over the point-interval [y + 1, y + 1]. In Figure 6 (bottom), we give an example of the application of the above translation that makes use of the model of Figure 1. We focus our attention on the translation of the LTL f formula (¬p ∧ ¬q), which is true at time point 2 according to the point-based semantics π, into the AB f formula ψ = ⟨A⟩(¬π ∧ [B]π ∧ ⟨A⟩(π ∧ ¬p ∧ ¬q)), which holds over the interval [0, 2]. The outermost modality ⟨A⟩ constrains the three conjuncts ¬π, [B]π, and ⟨A⟩(π ∧ ¬p ∧ ¬q) to simultaneously hold over an interval [2, y]. From the truth of ¬π, it follows that y > 2, and from the truth of [B]π, we can conclude that y = 3. Now, from the truth of ⟨A⟩(π ∧ ¬p ∧ ¬q) over [2, 3], it follows that there exists 3 ≤ y such that the conjuncts π, ¬p, and ¬q simultaneously hold over [3, y]. Once more, π is true on [3, y] if and only if y = 3 [3, 3], and thus both ¬p and ¬q hold over [3, 3].
Last but not least, it is worth pointing out that the truth values of proposition letters on strict-intervals do not come into play in the proposed translations. It immediately follows that such translations still properly work under the homogeneity assumption that we will make in all the following sections.

The logic BD of prefixes and infixes
In this section, we introduce the logic BD of prefixes and infixes, we formally state the homogeneity assumption, and we define the relation of finite satisfiability under such an assumption. We conclude the section with a short analysis of the relationships between such a logic and a suitable restriction of generalized * -free regular expressions.
BD formulas are built up from a countable set Prop of proposition letters according to the following grammar: ϕ ∶∶= p | ¬ψ | ψ ∨ ψ | ⟨B⟩ψ | ⟨D⟩ψ, where p ∈ Prop and ⟨B⟩ and ⟨D⟩ are the modalities for Allen's relations Begins and During, respectively. In the following, given a formula ϕ, we denote by |ϕ| the size of the parse tree for ϕ generated by the above grammar. It is straightforward to show that |ϕ| is less than or equal to the number of symbols used to encode ϕ.
Let N ∈ N be a natural number and let Prop is a valuation that maps intervals in I N to sets of proposition letters.
Given a model M and an interval [x, y], the semantics of a BD formula is defined as follows: The logical constants ⊤ (true) and ⊥ (false), the Boolean operators ∨, →, and ↔, and the (universal) dual modalities [B] and [D] can be derived in the standard way. We say that a BD formula ϕ is finitely satisfiable if and only if there exist a (finite) model M and an interval [x, y] such that M, [x, y] ⊧ ϕ (w.l.o.g., [x, y] can be assumed to be the maximal interval [0, N ]). Hereafter, whenever we use the term satisfiable, we always mean finite satisfiability, that is, satisfiability over the class of finite linear orders.
Definition 1 (Homogeneity). We say that a model M = (I N , V) satisfies the homogeneity property (M is homogeneous for short) if and and only if In Figure 7, we given an example of a homogeneous model (a) and of an arbitrary non-homogeneous one (b). For the sake of readability, we will refer to them as M a = (I 7 , V a ) and M b = (I 7 , V b ), respectively. The complete definitions of V a and V b are given in Figure 7 below the respective models. It is easy to check that the definition of V a satisfies the homogeneity property as stated by Definition 1.
To begin with, we observe that, in homogeneous models, the labelling V of the intersection of two intervals contains the labellings of the two intervals. This is the case, for instance, with intervals [1, 4] and [2, 6] in Figure 7 (a), whose intersection is the interval [2, 4]. This   is not the case with arbitrary models. Consider, for instance, the very same intervals in Fig. 7 (b). Interval [1, 4] violates the homogeneity property because r ∈ V b (1, 4) but r ∉ V b (1, 1), thus violating the ⇒ direction of Def. 1. Interval [2, 4] violates the homogeneity property as well, because q ∈ V b (2, 2) ∩ V b (3, 3) ∩ V b (4, 4), but q ∉ V b (2, 4) (the same for r), thus violating the ⇐ direction of Definition 1. All the other intervals, including interval [2, 6], in Figure 7 (b) satisfy the homogeneity property, but this is obviously not sufficient to consider the model homogeneous, since each interval of the model must satisfy such a property. It is worth pointing out that the homogeneity property does not entail, in general, a similar containment property for formulas ψ ∉ Prop. As an example, it is easy to check that in the homogeneus model of Figure 7  Finally, we would like to observe that in homogeneous models, for any proposition letter, the labelling of point-intervals determines that of arbitrary intervals. This is not the case with arbitrary models. Counterexamples are intervals [1, 4] and [2, 4] in Figure 7 (b).
Satisfiability can be relativized to homogeneous models. We say that a BD formula ϕ is satisfiable under homogeneity if there is a homogeneous model M such that M, [0, N ] ⊧ ϕ. Satisfiability under homogeneity is clearly more restricted than plain satisfiability. We know from [MM14,MMK10] that dropping the homogeneity assumption makes D undecidable. This is not the case with the fragment B, whose expressive power is quite limited, which remains decidable [GMS04]. Hereafter, we will always refer to BD under the homogeneity assumption, denoted by BD hom .
We conclude the section with a short account of the relationships between BD hom and generalized * -free regular expressions. Let Σ be a finite alphabet. A generalized * -free regular expression (hereafter, simply expression) e over Σ is a term of the form: e ∶∶= ∅ | a | ¬e | e + e | e ⋅ e, for any a ∈ Σ.
We exclude the empty word from the syntax, as it makes the correspondence between finite words and finite models of BD hom formulas easier (such a simplification is quite common in the literature). An expression e defines a language Lang(e) ⊆ Σ + , which is inductively defined as follows: • Lang(∅) = ∅; • Lang(a) = {a}, for every a ∈ Σ; • Lang(¬e) = Σ + \ Lang(e); • Lang(e 1 + e 2 ) = Lang(e 1 ) ∪ Lang(e 2 ); • Lang(e 1 ⋅ e 2 ) = {w 1 w 2 ∶ w 1 ∈ Lang(e 1 ), w 2 ∈ Lang(e 2 )}. In [Sto74], Stockmeyer proves that the problem of deciding the emptiness of Lang(e), for a given expression e, is non-elementary hard. Let us now consider the logic C of the chop operator (under the homogeneity assumption). As informally described in Section 2, C features one binary modality, the "chop" operator ⟨C⟩, plus the modal constant π. As already pointed out (see Figure 4), modalities ⟨B⟩ and ⟨D⟩ of BD hom can be easily encoded in C as follows: ⟨B⟩ψ = ψ⟨C⟩¬π and ⟨D⟩ψ = ¬π⟨C⟩(ψ⟨C⟩¬π). It can be shown that, for any expression e over Σ, there exists a formula ϕ e of C whose set of models is the language Lang(e), that is, Lang(e) = {V(0, 0) . . . V(N, N ) ∶ (I N , V) ⊧ ψ e }. Such a formula is the conjunction of two sub-formulas ψ Σ and ψ e , where ψ Σ guarantees that each unitary interval of the model is labelled by exactly one proposition letter from Σ, and ψ e constrains the valuation on the basis of the inductive structure of (the translation of) e. As an example, if e = e 1 ⋅ e 2 , then ψ e = ψ e 1 ⟨C⟩((¬π ∧ ¬(¬π⟨C⟩¬π))⟨C⟩ψ e 2 ).
Such a mapping of expressions in C formulas allows one to conclude that the satisfiability problem for C is non-elementary hard (its non-elementary decidability follows from the opposite mapping). A careful look at the expression-to-formula mapping reveals that modality C only comes into play in the translation of expressions featuring the operator of concatenation. In view of that, it is worth looking for subclasses of generalized * -free regular expressions where the concatenation operation is used in a very restricted manner, so as to avoid the need of modality C in the translation.
In the next sections, we will show that the satisfiability problem for BD hom belongs to EXP SP ACE. From the above mapping, it immediately follows that the emptiness problem for the considered subclass of expressions, that only uses prefixes and infixes, can be decided in exponential space (rather than in non-elementary time).

Homogeneous compass structures
In this section, we introduce a spatial representation of homogeneous models, called homogeneous compass structures, that will considerably simplify the proofs of the next sections.
It is easy to see that, given a model M = (I N , V), we can always univocally associate an atom F [x,y] in At(ϕ) with each interval [x, y] ∈ I N by simply put An example of such an extension of the labelling V to atoms is provided in Figure 8 in both a graphical (top) and a tabular (bottom) form. For the sake of readability, in the graphical representation of Figure 8 we only provide the value for positive formulas, since the presence of negative ones follows from the absence of their negation in the atom. As an example, for the interval [1, 2] in Figure 8, F For R ∈ {B, D}, we introduce the functions Req R , Obs R , and Box R , that map each atom F ∈ At(ϕ) to the following subsets of Cl(ϕ): Notice that, for each F ∈ At(ϕ) and each formula ψ, with ψ ∈ {ψ ′ ∶ ⟨B⟩ψ ′ ∈ Cl(ϕ)}, either ψ ∈ Req B (F ) or ¬ψ ∈ Box B (F ); the same for D (this means that, per se, Box B (⋅) and Box D (⋅) are not strictly necessary; we introduce them to simplify some proofs).
Sets Req R (F ), Obs R (F ), and Box R (F ) will be extensively used to prove most of the results of the paper. For that reason, we would like to illustrate their behaviour by means of the example in Figure 8.
First, let us observe that all these sets are univocally determined by the atoms in their argument; however, while Obs R (F ) ⊆ F , this is not the case with Req R (F ) and Box R (F ). As an example, it holds that q ∈ Req D (F [1,4]  On the other hand, if ⟨R⟩ψ ∈ Cl(ϕ) and ψ ∉ Req R (F ), then, necessarily, [R]¬ψ ∈ F and thus ¬ψ ∈ Box R (F ). It is easy to prove that Box R (F ) ∩ Req R (F ) = ∅ and  Figure 8. A graphical (top) and tabular (bottom) account of the behaviour of Req R (F ), Obs R (F ), and Box R (F ), for F ∈ At(ϕ) and R ∈ {B, D}, with ϕ = ⟨B⟩(p ∧ ¬r) ∧ ⟨D⟩(¬q ∧ ⟨D⟩q).
partition of the whole set of temporal requests R in Cl(ϕ). Consider, for instance, for interval [1, 4] in Figure 8. We have that Req As opposed to what we stated above for Req R , for every ¬ψ ∈ Box B (F [x,y] ) (resp., ). In the considered case, for instance, since ¬ψ 2 ∈ We would like to further explain the relation between Req R and Obs R by considering the example in Figure 8 from another angle. Suppose that, for a given N ∈ N (in our example N = 4), we want to find, for each [x, y] in I N , a "labelling" F [x,y] ∈ At(ϕ) such that: With the additional property: such a problem turns out to be the bounded satisfiability problem, which is simpler than the problem we are addressing in this paper, namely, the finite satisfiability problem. In the latter, indeed, N is not given as a parameter. It can be easily shown that the labelings for which the following property holds: all and only the labellings that satisfy property ( * 1 ). This means that all the requests that we associate with an interval [x, y] by means of its labelling F [x,y] must be satisfied (fulfilled). Consider, for instance, the B relation.

It holds that Req
The very same observations hold for modality D and all the other HS hom modalities. In fact, this is a general property which holds even without the homogeneity assumption. Thus, we can conclude that ( * 3 ) is a necessary and sufficient condition for M to satisfy ϕ.
By making use of Req B , Req D , Obs B , and Obs D , we define two binary relations → B and → D over At(ϕ) as follows.
Definition 2. For all F, G ∈ At(ϕ) we let: Relations → B and → D are often referred to as view-to-type dependencies since they constrain the labelling of a state (an interval) according to the labellings of the states that it can access via certain relations (interval relations). As already pointed out, for every ψ ∈ {ψ ′ ∶ ⟨B⟩ψ ′ ∈ Cl(ϕ)} we have either ψ ∈ Req B (F ) or ¬ψ ∈ Box B (F ) (and vice versa). Given two atoms F and G, with F → B G, and a formula ¬ψ ∈ Box B (F ) it immediately follows that ψ ∉ Req B (F ) and thus from Req it follows that ⟨B⟩ψ ∈ Cl(ϕ), and from ⟨B⟩ψ ∈ Cl(ϕ) and ψ ∉ Obs B (G), it follows that ψ ∉ G. For the maximality of atoms, it follows that ¬ψ ∈ G. This allows us to conclude that for every pair of atoms F and G, with F → B G, we have that Box B (F ) ⊆ G. The same argument can be applied to the relation → D , and thus for every pair of atoms F and G, with F → D G, it holds that Box D (F ) ⊆ G.
In addition, relation → D is transitive (by definition of atom, from Req R (F ) ⊇ Req R (G), it immediately follows that Box R (F ) ⊆ Box R (G)), while → B is not. A graphical account of relations → B and → D is given in Figure 9 and Figure 10, respectively.
As for relation → B (Figure 9), we may observe how it is used to constrain the Req B (F [x,y] ) part of the labelling, for each interval [x, y] and its maximal proper pre- . This means that, in a "consistent model", we expect that for each . Notice that → B is intended to constrain only the maximal prefix of an interval, not all its prefixes. Now, let us unravel the definition of → B . We have that the following three conditions are satisfied: ( , or ψ is featured again as a request, that is, In Figure 9, both in the interval model and in its compass structure counterpart, we show the labelling of intervals which are required to satisfy relation → B . We are faced with three ⟨B⟩ requests, namely, ψ 1 = r ∧ ¬p ∧ ¬q, ψ 2 = ¬p ∧ ¬q ∧ ¬r, and ψ 3 = ⟨D⟩ψ 1 . We focus on the intervals starting at point 0, namely,  satisfy neither ψ 1 nor ψ 2 , as, for instance, p holds on both of them. Then, , that is, the two labellings can be swapped without any consequence on the consistency of B requests. In situations like this one, we will say that the involved atoms are B-reflexive. Reflexive atoms will play a crucial role in the proof of the results of the next sections. They are denoted by a self-loop in the compass structure of Figure 9.
neither satisfies ψ 1 nor features ⟨B⟩ψ 1 . As for the observables, compared to atom which is transferred to its ⟨B⟩ψ 1 request, but it satisfies two more requests, namely, ψ 2 and ⟨D⟩ψ 1 in Obs B (F [0,3] ), for the labelling of the intervals that feature [0, 2] as proper prefix.
. Lemma 1. Let ϕ be a BD hom formula. For any atom F ∈ At(ϕ) and any sequence of Proof. Let us consider the sequence of pairs Moreover, by recursively unravelling the right part of the equation . . , h} as follows: . . , h} as follows: The fact that iobs is well defined follows from Req We now prove that there exists not an index i > 0 such that i ∉ Img(ireq) ∪ Img(iobs). By contradiction, let us assume that such an index exists (let us assume i > 0; the case i = 0 is symmetric). It follows that: Let us consider now relation → D . By Definition 2, given two atoms F and G, the condition imposed by F → D G is weaker than the one imposed by → B , that is, containement (superset) instead of full equality of the two sets. This is because with F → D G we want to express the fact that G may label any sub-interval  In Figure 10, both in the interval model and in its compass structure counterpart, we show the labelling of intervals which are required to satisfy relation → D . We cope with three ⟨D⟩ requests: ψ 1 = p ∧ q, ψ 2 = ¬p ∧ q, and ψ 3 = p ∧ ¬q. Let us consider all the proper sub-intervals of the largest interval in the model, namely, sub-intervals , is true and it is not. The same pieces of information are graphically depicted in the top right part of Figure 10. Let It is worth pointing out that, in general, the following stronger consistency property, involving equality in place of containment, holds for ⟨D⟩ requests: . Such a property states that the ⟨D⟩ requests that hold over an interval [x, y] must be completely "covered" by those holding over its maximal proper sub-interval [x + 1, y − 1] and the union of all the observables of As an example, in Figure 10, we have that The next proposition reduces the equality condition for any pair of atoms to the equality of their propositional components and their respective sets of ⟨B⟩ and ⟨D⟩ requests.
The proof of Proposition 1 trivially follows from the fact that, for each atom F and Given a formula ϕ, a ϕ-compass structure (simply compass structure, when ϕ is clear is a labelling function that satisfies the following conditions: Observe that the definition of → B and B-consistency guarantee that all the existential requests via relation B (hereafter B-requests) are fulfilled in a compass structure. We say that an atom Let G = (G N , L) be a compass structure. We define the function P ∶ G N → 2 y). The proof of the following theorem is straightforward and thus omitted.   Hereafter, we will often write compass structure for homogeneous ϕ-compass structure.
In the next sections, we will prove a small model theorem about compass structures for an input BD hom formula ϕ. In particular, we will prove that a model can be built by contracting a larger one in such a way that the resulting model is still a compass structure for ϕ. To achieve such a goal, we need to state some spatial properties of compass structures that involves the distinction between B-reflexive (resp., D-reflexive) and B-irreflexive (resp., D-irreflexive) atoms. Intuitively, if a point is labelled with an atom which is both B-reflexive and D-reflexive, its only purpose is to "fill the gaps" in the model, as each B/D-request that it possibly solves for other points are transferred to its prefixes/sub-intervals. On the other hand, a point that is B-irreflexive, D-irreflexive, or both B-irreflexive and D-irreflexive must be treated carefully since it feature at least one B/D-request in its observables that is solved once and for all, and it is not transferred to its prefixes/sub-intervals.

Spatial properties of compass structures for BD hom formulas
In this section, we prove a series of spatial properties of compass structures that turn out to be very useful in the proofs of the results of Sections 6 and 8. Each property is proved by making use of the previous one as follows: Section 5.1 -We first show that for any compass structure and any of its X-axis coordinate x, the sequence L(x, 0) . . . L(x, N ) is monotonic, that is, for any triplet 0 ≤ y 1 < y 2 < y 3 ≤ N , it cannot be the case that L(x, y 1 ) = L(x, y 3 ) and L(x, y 1 ) ≠ L(x, y 2 ). Such a property allows us to represent relevant information associated with any column x in space (polynomially) bounded in |ϕ|. Section 5.2 -Next, we define an equivalence relation over columns such that two columns are equivalent if they feature the same set of atoms. It is easy to verify that such an equivalence relation is of finite index and its index is exponentially bounded in |ϕ|.
By exploiting the representation of Section 5.1, we first define a partial order over equivalent columns, and then we prove that, in a compass structure, such a relation totally orders equivalent columns. Section 5.3 -By exploiting the total order of the elements of each equivalence class, we show a crucial property of the rows of a compass structure, which is the cornerstone of the proof. First, we associate with each point (x, y) on row y, with 0 ≤ x ≤ y, a tuple consisting of: (i) L(x, y), (ii) the equivalence class ∼ x of column x, and (iii) the set of pairs (L(x ′ , y), ∼ x ′ ), for all x < x ′ ≤ y, and then we prove that, for every pair of points (x, y), (x ′ , y) that feature the same tuple, that is, columns x and x ′ behave the same way (i.e., exhibit the same labelling) from y to the upper end. 5.1. A finite characterisation of columns and of their relationships. In this section, we first show that, in every compass structure, the atoms that appear in a column x must respect a certain order, that is, they cannot be interleaved. Let F, G, and H be three pairwise distinct atoms. In Figure 12.(a), we give a graphical account of the property that we are going to prove, while, in Figure 12.(b), we show a violation of it (atom H appears before and after atom G moving upward along the column).
We preliminarily prove a fundamental property of B-irreflexive atoms.
Let us now provide a bound on the number of distinct atoms that can be placed above a given atom F in a column, that takes into account B-requests, D-requests, and negative literals in F . Formally, we define a function ∆ ↑ ∶ At(ϕ) → N as follows: The result and the proof of Lemma 1 in Section4 helps us to understand why the factor 2 comes into play in the case of B-requestes. Informally, from the proof of Lemma 1 it immediately follows that in order to move down from an atom including ⟨B⟩ψ to an atom including ¬ψ, [B]¬ψ one must pass through an atom including ψ, [B]¬ψ. It can be easily checked that, for each F ∈ At(ϕ), 0 ≤ ∆ ↑ (F ) ≤ 4|ϕ| + 1. To explain how ∆ ↑ works, we give a simple example. Let {ψ ∶ ⟨B⟩ψ ∈ Cl(ϕ)} = {ψ 1 } and let We say that an atom F is initial if and only if Req B (F ) = ∅. A B-sequence is a sequence of atoms Sh B = F 0 . . . F n such that F 0 is initial and for all 0 It is worth pointing out that atoms in a B-sequence are monotonically non-increasing in ∆ ↑ , that is, Definition 3. We say that a B-sequence F 0 . . . F n is flat if and only if it can be written as a sequence F For the sake of clarity, it is worth to mention that in this paper F it is not used to denote the complement of F but as a simple alias for atoms. Moreover, we say that a flat B-sequence F   L(x, N ). The next lemma easily follows from Definition 3 and Definition 4. It allows us to abstract the shadings in a compass structure into flat B-sequences (proof omitted).
The next lemma is the missing piece that allows us to restrict our attention to decreasing flat B-sequences when abstracting shadings in a compass-structure.
Proof. The left-to-right direction is proved via a case analysis. If P(x, y) ≠ P(x, y + 1) or Req D (x, y) ≠ Req D (x, y + 1), then L(x, y) ≠ L(x, y + 1) immediately follows. If L(x, y) is B-irreflexive, then one gets a contradiction by observing that having two occurrences of the same B-irreflexive atom stacked one above the other violates the consistency of the compass structure (with respect to the → B relation). Let us prove now the right-to-left direction. Suppose, by way of contradiction, that L(x, y) ≠ L(x, y + 1). Then, there exists a formula ψ ∈ Cl(ϕ) such that ψ ∈ L(x, y + 1) and ¬ψ ∈ L(x, y). By Lemma 1, for all 0 ≤ x ≤ y ≤ N , the truth of ψ ∈ L(x, y) is uniquely determined by the truth values of P(x, y), Req B (x, y), and Req D (x, y). By the assumption, we get Req B (x, y + 1) ⊃ Req B (x, y). To reach the contradiction, we then proceed as in the proof of Lemma 2.
The next corollary immediately follows from Lemma 1 and Lemma 4. It allows us to give a bound on the distinct atoms that may appear on a shading. More precisely, it states that the shading of each column x in G is a decreasing flat B-sequence, and it gives a polynomial bound on the number of distinct atoms occurring in it.
Corollary 1. Let G = (G N , L) be a compass structure (for a formula ϕ). Then, for all Figure 13. Two equivalent columns that respect the order (a) and two equivalent columns that violate it (b).

5.2.
A suitable equivalence relation over columns of a compass structure. By exploiting the above (finite) characterisation of columns, we can define a natural equivalence relation of finite index over columns: we say that two columns x, x ′ are equivalent if and only if they feature the same set of atoms. Thanks to Corollary 1, if multiple copies of the same atom are present in a column, their occurrences are consecutive, and thus can be represented as blocks. Moreover, these blocks appear in the same order in equivalent columns because of the monotonicity of Req B , Req D , and P rop, the latter being forced by the homogeneity assumption (see Fig. 12.(a)).
In the following, we prove that equivalent columns can be totally ordered according to a given partial order relation over their shadings. Formally, for any two equivalent columns x and x ′ , Sh if and only if for every row y the atom L(x ′ , y) is equal to atom L(x, y ′ ) for some row y ′ , with 0 ≤ y ′ ≤ y. Intuitively, this means that moving upward column x ′ an atom cannot appear until it has appeared on column x. In Fig. 13.(a), we depict two equivalent columns that satisfy such a condition. In general, when moving upward, atoms on x ′ are often "delayed" with respect to atoms in x, the limit case being when atoms on the same row are equal. In Fig. 13.(b), a violation of the condition (boxed atoms) is shown. We are going to prove that this latter situation never occurs in a compass structure.
Let us now define an equivalence relation ∼ over decreasing flat B-sequences. Two decreasing flat B-sequences Let us consider, for instance, the four equivalent decreasing flat B-sequences shown in Figure 13, from left to right they are Sh . In the following we will prove that the latter scenario cannot occur in the case of compass structures.
Finally, we introduce a notation for atom retrieval.
The next lemma constrains the relationships between pairs of equivalent shadings (decreasing flat B-sequences) appearing in a compass structure.
m . Let us suppose by contradiction that Sh we have that both Bsequences features the same atoms in the same order, they can differ just in their numerosity (i.e., exponents). From Sh (x ′ is closer to N than x and thus is shorter) there exists an index 0 ≤ i ≤ N − x ′ such that one of the following conditions holds: . The above cases stem from the fact that we are claiming that for a certain index i there exists j such that Sh . This is the case, for instance, of x and x ′ in Figure 13 for which we have Let us assume that i is the minimum index which satisfies one of the above conditions. In the following, we will assume that Sh Before proving that in each case we reach a contradiction, let us spend a few more words on how such cases are derived. Since Sh and since |Sh G (x)| < |Sh G (x ′ )| we have a situation analogous to the one depicted in Figure13.(b). In particular, we have that Sh G (x) starts "before" Sh G (x ′ ) by unraveling the common sequence of atoms F 0 . . . F m (which is F 1 . . . F 4 in Figure13.(b)). Due to the fact that Sh starts it must unravel the same sequence an then it is easy to see that either for every i there exists k ′ ≤ k such that Sh it is the case with i = 3, k = 3, and k ′ = 4 in Figure13.(b)). The first case it is a sufficient condition for concluding that Sh In the latter case, if we take the mimimal i that satisfy the condition it is easy to see that k ′ = k + 1. Then, we have F k ′ → B F k but F k ′ ≠ F k . The cases (1)-(4) above are all the possible way in which we may have and we are in a compass structures, x + ∆ + i) must satisfy the homogeneity condition and Req D (L(x ′ , x ′ + i)) ⊆ Req D (L(x, x + ∆ + i)).

For case (1) we have that since Sh
and thus P( This translates into the intervals of a compass structure in ⟨D⟩ψ ∈ L(x ′ , x ′ + i) and [D]¬ψ ∈ L(x, x+∆+i). Since, G is a compass structure we have that there exists a proper sub-interval Let us assume that Req B (Sh we can apply Lemma 4 we have Sh ) (case 4) then from Lemma 2 we have that one among F j and F j−1 is B-irreflexive. If F j is B-irreflexive and F j−1 is B-reflexive we can use exactly the previous argument to prove a contradiction. If F j is B-irreflexive and F j−1 is B-irreflexive one of the above conditions holds for i − 1 violating the minimality of i. It remains the case in which F j−1 is B-irreflexive and F j is B-reflexive but in such case we have that one of the above conditions holds for i − 1 violating the minimality of i too (contradiction).

A spatial property of columns in homogeneous compass structures.
In this section, we provide a very strong characterization of the rows of a compass structure by making use of a covering property, depicted in Fig. 14, which states that the sequences of atoms on two equivalent columns x < x ′ must respect a certain order. To start with, we define the intersection of row y and column x, with 0 ≤ x ≤ y, as the pair consisting of the equivalence class of x and the labelling of (x, y). We associate with each point (x, y) its intersection as well as the set S → (x, y) of intersections of row y with columns x ′ , for all x < x ′ ≤ y. Let us denote by f p(x, y) (f p stands for fingerprint) the triplet associated with point (x, y).
We prove that if a point (x, y) has n + 1 columns (x <) x 0 < . . . < x n ≤ y on its right (with n large enough, but polynomially bounded by |ϕ|) such that, for all 0 ≤ i ≤ n, f p(x i , y) is equal to f p(x, y), then the sequence of atoms that goes from (x, y) to (x, N ) is exactly the same as the sequence of atoms that goes from (x 0 , y) to (x 0 , N ).
Let G = (G N , L) be a compass structure and let 0 ≤ x ≤ y. We define S → (x, y) as y) collects the equivalence classes of ∼ which are witnessed to the right of x on row y plus a "pointer" to the "current atom", that is, the atom they are exposing on y. If G = (G N , L) is homogeneous (as in our setting), for all 0 ≤ x ≤ y ≤ N , the number of possible sets S → (x, y) is bounded by , that is, it is doubly exponential in the size of |ϕ|. The next lemma constrains the way in which two columns x, x ′ , with x < x ′ and , evolve from a given row y on when S → (x, y) = S → (x ′ , y).
Lemma 6. Let G = (G N , L) be a compass structure and let 0 ≤ x < x ′ ≤ y ≤ N . If f p(x, y) = f p(x ′ , y) and y ′ is the smallest point greater than y such that L(x, y ′ ) ≠ L(x, y), if any, and N otherwise, then, for all y ≤ y ′′ ≤ y ′ , L(x, y ′′ ) = L(x ′ , y ′′ ).
Proof. Let y be the minimum point y > y such that L(x ′ , y) ≠ L(x ′ , y). Let us assume by contradiction that y ≠ y ′ . By Lemma 5 we have that y > y ′ . Let Sh Figure 14. A graphical account of the behaviour of covered points. We have that x is covered by x 0 < . . . < x n on row y and thus the labelling of points on column x above (x, y) is exactly the same of the correspondent points on column x 0 above (x 0 , y), that is, L(x, y ′ ) = L(x 0 , y ′ ), for all y ≤ y ′ ≤ N . and let 0 ≤ i < m be the index such that Sh Req D (L(x ′ , y ′ − 1)), otherwise conditions for Lemma 4 apply and L(x, y ′ ) = L(x, y ′ − 1) (contradiction). This means that there exists x < x < x ′ such that ψ ∈ (L(x, y ′ − 1) ∩ Req D (L(x, y ′ )) \ Req D (L(x ′ , y ′ ))) and for every x The simpler case is when y ′ = y + 1. In such a case from S → (x, y) = S → (x ′ , y) we have that there exists x ′ > x ′ such that L(x ′ , y) = L(x, y) (contradiction). Let us consider now the case in which y ′ > y + 1. Since ¬ψ ∈ Box D (L(x, y ′ − 1)) we have that ψ ∉ L(x ′′ , y ′′ ) for every x < x ′′ ≤ y ′′ < y ′ − 1. Two cases arise: • there exists y ≤ y ′′ < y ′ − 1 such that L(x, y ′′ ) is B-reflexive. If it is the case Then for Lemma 4 we have that L(x, y ′ − 1) = L(x, y ′ − 2) = . . . = L(x, y ′′ ) this means that L(x, y ′ − 1) is not the first atom featuring ψ on the column x (contradiction); Let us observe that, by definition of B-sequence, for every B-sequence F h 0 0 . . . F h n n and for every 1 ≤ i ≤ n if F i is B-irreflexive then h i = 1 (i.e., B-irreflexive atoms are unique in every B-sequence). Then, we have that for every y ≤ y ′′ ≤ y ′ − 1 we have L(x, y ′′ ) = L(x ′ , y ′′ ) and thus ψ ∈ L(x ′ , y ′ − 1) this implies ψ ∈ Req D (L(x ′ , y ′ )) (contradiction).
From Lemma 6, the next corollary follows.
Corollary 2. Let G = (G N , L) be a compass structure and let 0 ≤ x < x ′ ≤ y ≤ N . If f p(x, y) = f p(x ′ , y) and y ′ is the smallest point greater than y such that L(x, y ′ ) ≠ L(x, y), if any, and N otherwise, then, for every pair of points The above results lead us to the identification of those points (x, y) whose behaviour perfectly reproduces that of a number of points (x ′ , y) on their right with f p(x, y) = f p(x ′ , y). These points (x, y), like all points "above" them, are useless with respect to fulfilment in a compass structure. We call them covered points.
Definition 6. Let G = (G N , L) be a compass structure and 0 ≤ x ≤ y ≤ N . We say that (x, y) is covered iff there exist n + 1 = ∆ ↑ (L(x, y)) distinct points x 0 < . . . < x n ≤ y, with x < x 0 , such that for all 0 ≤ i ≤ n, f p(x, y) = f p(x i , y). In such a case, we say that x is covered by x 0 < . . . < x n on y.
Lemma 7. Let G = (G N , L) be a compass structure and let x, y, with 0 ≤ x ≤ y ≤ N , be two points such that x is covered by points x 0 < . . . < x n on y. Then, for all y ≤ y m , the proof is by induction on n = ∆ ↑ (L(x, y)). If n = 0 we have that L(x, y) = F m , since L(x, y) = L(x 0 , y) we have F m = L(x 0 , y). Since we are on the last atom of the sequence Sh G (x, y) and Sh G (x, y) ∼ Sh G (x 0 , y) we have L(x, y ′ ) = L(x 0 , y ′ ) for every y < y ′ ≤ N . If n > 0, let L(x, y) = F i with 0 ≤ i < m (if i = m we can apply the same way of the inductive basis), by Lemma 6 we have that there exists a single minimum point y ′ > y for which L(x, y ′ ) = L(x 0 , y ′ ) = . . . = L(x n , y ′ ) = F i+1 and thus for every y ≤ y ′′ ≤ y ′ we have L(x, y ′′ ) = L(x 0 , y ′′ ). Moreover, for Corollary 2 we have that for every x ′ > x n such that Sh for every 0 ≤ i < n (every one but x n ). Since ∆ ↑ (F i ) < ∆ ↑ (F i+1 ) we have that we can apply the inductive hypothesis since x is covered by x 0 < . . . < x n−1 on y ′ and we have that for every y ′ ≤ y ′′ ≤ N we have L(x, y ′′ ) = L(x 0 , y ′′ ).
In Figure 15, we give an intuitive account of the notion of covered point and of the statement of Lemma 7. First of all, we observe that, since S → (x, y) = S → (x 0 , y) = . . . = S → (x n , y) and, for all 0 ≤ j, j ′ ≤ n, it holds that (Sh there exists x n <x ≤ y such that (Sh G (x n ), L(x n , y)) = (Sh G (x), L(x, y)), andx is the smallest point greater than x n that satisfies such a condition. Now, it may happen that for some x < x < x n , are such that x n < x ′ <x. Then, it can be the case that, for all 0 ≤ i ≤ n, L(x i , y ′ ) = F i+1 , as all points (x i , y ′ ) satisfy some D-request ψ that only belongs to L(x ′ , y ′ − 1). In such a case, as shown in Figure 15, Then, by applying Corollary 2, we have that The same argument can then be applied to x, x 0 , . . . , x n−1 on y ′ , and so on. Figure 15. An intuitive account of the statement of Lemma 7.

The satisfiability problem for BD hom is decidable in EXPSPACE
In this section, by exploiting the properties proved in Section 5, we show that the problem of checking whether a BD hom formula ϕ is satisfied by some homogeneous model can be decided in exponential space. First, by means of a suitable small model theorem, we prove that either ϕ is unsatisfiable or it is satisfied by a model (a compass structure) of at most doubly-exponential size in |ϕ|; then, we show that this model of doubly-exponential size can be guessed in single exponential space.
Theorem 2. Let ϕ be a BD hom formula. The problem of deciding whether or not it is satisfiable belongs to EXPSPACE.
The proof of Theorem 2 follows from Corollary 3, Lemma 8, and Lemma 9 below. First of all, thanks to the property proved in Section 5.3, we know that, for every row y, there is a finite set of columns C y = {x 1 , . . . , x n } that behave pairwise differently for the portion of the compass structure above y. This means that each column 0 ≤ x ≤ y, with x ∉ C y , behaves exactly as some x i ∈ C y above y, that is, for all y ′ > y, L(x, y ′ ) = L(x i , y ′ ). We prove that n is bounded by |ϕ|, from which it immediately follows that, in any large enough model, there are two rows y and y ′ , with Sh Then, we can suitably contract the model into one whose Y -size is y ′ − y shorter. By (possibly) repeatedly applying such a contraction, we obtain a model whose Y -size satisfies a doubly exponential bound. To complete the proof, it suffices to show that there exists a procedure that checks whether or not such a model exists in exponential space.
By exploiting Lemma 7, we can show that, for each row y, the cardinality of the set of columns x 1 , . . . , x m which are not covered on y is exponential in |ϕ|. Then, the sequence of triplets for non-covered points that appear on y is bounded by an exponential value on |ϕ|. It follows that, in a compass structure of size more than doubly exponential in |ϕ|, there exist two rows y, y ′ , with y < y ′ , such that the sequences of the triplets for non-covered points that appear on y and y ′ are exactly the same. This allows us to apply a "contraction" between y and y ′ on the compass structure. An example of how contraction works is given in Figure 16. First of all, notice that rows 7 and 11 feature the same sequences for triplets of non-covered points, and that, on any row, each covered point is connected by an edge to the non-covered point that "behaves" in the same way. More precisely, we have that column 2 behaves as column 4 between y = 7 and y ′ = 15, columns 3, 5, and 7 behave as column 8 between y = 11 and y ′ = 15, and column 4 behaves as column 6 between y = 11 and y ′ = 15. The compass structure in Figure 16.(a) can thus be shrinked into the compass structure in Figure 16.(b), where each column of non-covered points x on y ′ is copied above the corresponding non-covered point x ′ on y. Moreover, the column of a non-covered point x on y ′ is copied over all the points which are covered by the non-covered point x ′ corresponding to x on y. This is the case with point 2 in Figure 16.(b) which takes the new column of its "covering" point 4. The resulting compass structure is y ′ − y shorter than the original one, and we can repeatedly apply such a contraction until we achieve the desired bound.
The next corollary, which easily follows from Lemma 7, turns out to be crucial for the proof of Theorem 2. Roughly speaking, it states that the property of "being covered" propagates upward.
Corollary 3. Let G = (G N , L) be a compass structure. Then, for every covered point (x, y), it holds that, for all y ≤ y ′ ≤ N , point (x, y ′ ) is covered as well.
From Corollary 3, it immediately follows that, for every covered point (x, y) and every Hence, for all x, y, with x < x ≤ y ′ < y, and any D-request ψ ∈ Req D (L(x, y)) ∩ Obs D (L(x, y)), we have that This allows us to conclude that if (x, y) is covered, then all points (x, y ′ ), with y ′ ≥ y, are "useless" from the point of view of D-requests. Let G = (G N , L) be a compass structure and 0 ≤ y ≤ N . We define the set of witnesses of y as the set Wit G (y) = {x ∶ (x, y) is not covered}. Corollary 3 guarantees that, for any row y, the shading Sh G (x) and the labelling L(x, y) of witnesses x ∈ Wit G (y) are sufficient, bounded, and unambiguous pieces of information that one needs to maintain about y. Given a compass structure G = (G N , L) and 0 ≤ y ≤ N , we define the row blueprint of y in G, written Row G (y), as the sequence Row G (y) = ([Sh Given a compass structure G = (G N , L), the next lemma allows us to prove the existence of a smaller compass structure G = (G N ′ , L ′ ) with N ′ < N if G features two distinct rows y < y ′ which share the same blueprint.
Now we have to prove that the resulting structure G ′ = (G N ′ , L ′ ) is a homogeneous compass structure. This part is omitted, since it is pretty simple but extremely long. Let us just say that it can be proved by exploiting Corollary 3 and the definition of witnesses for a row y.
To conclude the proof of Theorem 2, it suffices to show that if a BD hom formula is satisfiable, then it is satisfied by a doubly exponential compass structure, whose existence can be checked in exponential space. The following result provides both the small model theorem and the complexity class of checking whether or not a BD hom formula ϕ admits it.
Lemma 9. Let ϕ be a BD hom formula. It holds that ϕ is satisfiable if and only if there is a , whose existence can be checked in EXP SP ACE.
Proof. To start with, let us consider the problem of determining how many possible different Row G (y) we can have in a compass structure G = (G N , L). Let us first observe that for the monotonicity of the function S → we have, for every 0 ≤ y ≤ N , S → (0, y) ⊇ . . . ⊇ S → (y, y). Then, since we cannot have two incomparable, w.r.t. ⊆ relation, S → (x, y) and S → (x ′ , y) we have at most 2 4|ϕ| 2 +6|ϕ|+2 ⋅ 2 |ϕ|+1 = 2 can be associated to at most 4|ϕ| + 2 (i.e., the maximum value for ∆ ↑ plus one) distinct points in Wit G (y). Summing up, we have that the maximum length for Row G (y) is bounded by 2 4|ϕ| 2 +7|ϕ|+3 ⋅ 2 that is 2 which is doubly exponential in |ϕ|. Finally, given a ϕ-compass structure G = (G N , L), by repeatedly applying Theorem 8, we can obtain a ϕ-compass structure G = (G N ′ , L ′ ) such that for every 0 ≤ y < y ′ ≤ N we have Row G (y) ≠ Row G (y ′ ), then, by means of the above considerations on the maximum cardinality for the set of all possible Row G (y), we may conclude that that ϕ is satisfiable iff there is a compass structure G = (G N , L) for it such . To complete the proof, it suffices to show that checking the existence of such a doubly exponential compass structure can be done in exponential space.
The semantics of a BDA hom formula is specified by the semantic clauses for BD hom plus the following one: In the rest of section, in analogy to what we did for modalities ⟨B⟩ and ⟨D⟩ in Section 3, we investigate the counterpart of modality ⟨A⟩ in terms of a suitable extension of generalized * -free regular expressions. Basically, we enrich the semantics of generalized * -free regular expressions with what we call a "right context". We will prove that the resulting semantics subsumes the original one, that is, the notion of generalized * -free regular expression given in Section 3 is just a specialization of it. In particular, the encoding of both Pre(e) and Inf(e) directly transfers to this new semantics without any modification. We will conclude the section by providing an example that shows how the operator corresponding to modality ⟨A⟩ has an explicit counterpart in the generalized * -free regular expressions used for real-world programming languages. As a preliminary remark, we would like to observe that one may be tempted to interpret modality ⟨A⟩ as a logical counterpart of the concatenation operator. This is wrong. Informally speaking, modality ⟨A⟩ characterizes words with a specific "right context". Such an idea can be formalized as follows.
In order to identify the right generalized * -free regular expression for modality ⟨A⟩, we provide an alternative, yet equivalent, semantics for these expressions. In such a semantics, the language − −− → Lang(e) of a generalized * -free regular expression e is interpreted over pairs of finite words, that is, Lang(e) represents the word w belonging to the language Lang(e), according to the semantics given in Section 3, together with its "right context" word w ′ , which is the word that must appear immediately after w.
Formally, generalized * -free regular expressions of Section 3 are extended as follows: e ∶∶= ∅ | a | ¬e | e + e | Pre(e) | Inf(e) | − − → Con(e), for any a ∈ Σ Their semantics is defined as follows: Let us denote the empty word by . With a little abuse of notation, we say that, for every w ∈ Σ + , w ∈ Lang(e) if and only if (w, ) ∈ − −− → Lang(e). Then, it is easy to prove that, for any expression e ∶∶= ∅ | a | ¬e | e + e | Pre(e) | Inf(e), w ∈ Lang(e) if and only if (w, ) ∈ − −− → Lang(e). In such a way, the original (restricted) semantics turns out to be a specialization of the extended one.
It can be easily shown that the extended semantics preserves the mapping from a restricted expression e to an equivalent BD hom formula ϕ e outlined in Section 3. In order to capture the language − −− → Lang( − − → Con(e)) in BDA hom , we extend the mapping with the rule: . Let us assume that ϕ − −− → Con(e) holds over an interval [x, y]. Then, it predicates over "the right context" of [x, y] by stating that there exists an interval [y, y + 1] (the constraint on the length of such an interval is imposed by the first two conjuncts ⟨B⟩⊤ ∧ [B][B]⊥) which has an adjacent-to-the-right interval [y + 1, y ′ ] where ψ e holds (third conjunct ⟨A⟩ψ e ).
In order to show the significance of the proposed extension of generalized * -free regular expression, we explore an interesting correspondence between the operator − − → Con (and thus, indirectly, modality ⟨A⟩) and an operator of the regular expressions tipically used in popular programming languages like, for instance, Python [VRDJ95]. It is easy to see that the − − → Con operator corresponds to the lookahed operation. Such an operation is usually implemented as positive lookahead, whose syntax is (? = e), and negative lookahed, whose syntax is (? ! e), where e is a regular expression. In many real-world applications, regular expressions are used to execute pattern matching inside a long text as an effective alternative to the task of checking whether such a long text belongs to a certain language. This is the case especially in the domain of natural language processing from which the following toy example is borrowed. Let us suppose that we want to capture a pattern that consists of an English word followed by a list of words in English separated by commas and whose last word is prefixed by the word "and". An example of a sentence containing such a pattern is the following: "This paper deals with HS operators meets meets meets meets meets meets meets meets meets meets meets meets meets meets meets meets meets, begins begins begins begins begins begins begins begins begins begins begins begins begins begins begins begins begins, and during during during during during during during during during during during during during during during during during under homogeneity assumption." In such a toy example, a motivation for matching the word operators may be related to the fact that the noun preceding a natural language description of items may represent their type. In the above sentence, "meets", "begins", and "during" are indeed of type "operators". In such an interpretation, we are assuming that the word denoting the type is put immediately before the list of words and thus conjunctions like, e.g., "such as" or "like" are not contemplated. However, they may be captured by regular expressions longer, but not much more complex, than the one we are going to show. For the sake of simplicity, we assume that the number of words in the list is greater than or equal to 3 and each word is a single one. As an example, the pattern "Concepts such as atoms atoms atoms atoms atoms requests requests requests requests requests will be introduced in this section" is not captured. A regular expression re, which works in any modern programming language, that captures such a pattern is: where is used to highlight the single white space " ". Since it is outside the scope of this paper, we will not delve too much into the syntax of this kind of regular expressions. For that matter, wonderful websites such as [Reg], exist (they provide a quick reference for syntax and semantics together with examples and, more importantly, a full on-line environment for testing and debugging regular expressions).
Let us briefly explain how re captures the desired pattern. First of all, we have that (e) is used to capture any pattern in e. The (? = e) operator checks whether the current position is followed by a pattern belonging to the language of e. The \w variable represents any word-character, both lower and upper case. The operator + is analogous to the operator e + = ee * in standard regular expressions. Thus, \w+ means any single word. The operator (e){n, }, with n ≥ 0, captures a sequence of n or more occurrences of pattern e. Finally, the operator (? ∶ e) represents just standard parentheses. A graphical account of the various parts of regular expression re is shown in Figure 17.
Let Σ = W ∪ S, where W = {a, . . . , z, A, . . . , Z} (word symbols) and S = { , ., ','} (separator symbols). For the sake of brevity, we omit the intermediate phase of translating re into our * -free restricted fragment and we jump directly to the translation into BDA hom . For the sake of simplicity, we do not apply the literal translation here; instead, we make use of a shorter, more understandable encoding which is tailored to the structure of the specific regular expression re. As a preliminary step, we provide some shorthands and assumptions that make the encoding formulas more compact. First, we introduce a global modality [G]ψ, whose semantics is as follows: (i) a whitespace; (ii) a sequence of two or more concatenations of a single word, a comma, and a whitespace; (iii) the concatenation of the word "and", a whitespace, and a single word. In BDA hom , we may capture the semantics of len ≥n and len n by means of the formulas ⟨B⟩ n π and len ≥n ∧ [B] n+1 ⊥, respectively. 4 Since in the proposed encoding we will make use of proposition letters in Σ to represent words as points of an interval model (Figure 18), we need to force each point to hold exactly one symbol σ ∈ Σ. Such a constraint is imposed by putting the formula [G](π → ⋁ σ∈Σ (σ ∧ ⋀ σ ′ ∈Σ\{σ ′ } ¬σ ′ )) in conjunction with the encoding of re. For the sake of brevity, we will tacitly assume that this is the case. Finally, with a little abuse of notation, in the encoding of re we will make use of W as a shorthand for ⋁ σ∈W σ, which basically allow us to state that a certain (point-)interval holds a word symbol. Now, we are ready to encode re by a formula ψ re . More precisely, we will make use of ⟨D⟩ψ re as the main formula, where ψ re just encodes the matching part. Thus, by "reading" a model M = (I N , V) for ⟨D⟩ψ re , we can easily retrieve every matching by taking all and only those intervals [x, y] such that M, [x, y] ⊧ ψ re . As an example, in Figure 18 we have that M, [0, 90] ⊧ ⟨D⟩ψ re , while [24, 34] ⊧ ψ re . In fact, [24,34] is the only interval that satisfies ψ re in the model of Figure 18 and, as we will see when we will discuss ψ re in more detail, this is determined both by the points belonging to [24,34] and by the formulas that hold in its "right context", that is, the intervals [x, y], with 34 ≤ x ≤ 90.
We conclude the section with some remarks about the practical use of regular expressions. To the best of our knowledge, in their implementation the majority of existing programming languages do not support the free use of negation in regular expressions, but they allow for positive/negative lookahead/lookbehind. In this section, we showed how to deal with positive/negative lookahead by means of modality ⟨A⟩. Moreover, we argued that positive/negative lookbehind may be captured by adding modality ⟨A⟩, which is the converse of modality ⟨A⟩, to BDA hom , thus obtaining the logic BDAA hom . For the sake of simplicity, we did not take modality ⟨A⟩ into consideration in this work, as its introduction involves a number of technicalities. However, in view of the results established in the next section, we may conjecture with a certain confidence that, under the homogeneity assumption, the satisfiability problem for BDAA hom belongs to the same complexity class as its proper fragment BDA hom .

The satisfiability problem for BDA hom is decidable in EXPSPACE
In this section, we go through the definitions and proofs of Sections 5.1, 5.2, and 5.3 in order to identify the changes that must be made in order to extend them to the fragment BDA hom .
To begin with, we state a lemma that establishes a fundamental property of modality A, and will be extensively used in the following definitions and proofs. Lemma 10 has been proved in several occasions (see [BMS07], for example) here we will provide a graphical account of it in Figure 19. Where it is shown that on intervals (resp., points) sharing their right endpoints (resp., laying on the same row) must feature the same A-requests.
Let us consider now an homogeneous ϕ-compass structure G = (G N , L) for an BDA hom formula ϕ it is easy to see that, as a direct consequence of Lemma 10, we have that for every point 0 ≤ y ≤ N ) we have Req A (L(x, y)) = Req A (L(y, y)) for every 0 ≤ x ≤ y and thus Box A (L(x, y)) = Box A (L(y, y)).
For the sake of brevity, in the following definitions we will make extensive use of the special constant π which, as we should recall from the previous, holds over an interval [x, y] if and only if x = y. Let us notice that in BDA hom the constant π is just an alias for the formula [B]⊥, from now on we will assume that π ∈ Cl(ϕ) holds.
Let us now extend the notion of ϕ-atom introduced in Section 4 to the notion of markedϕ-atom. Let T F ϕ A = {ψ ∶ ⟨A⟩ψ ∈ Cl(ϕ)} the set of all the arguments ψ for ⟨A⟩ψ formulas in Cl(ϕ), marked ϕ-atom (atom from now on) is a pair F α = (F, α) where: (1) F is a maximal subset of Cl(ϕ) that, for all ψ ∈ Cl(ϕ), satisfies the following three conditions: (i) ψ ∈ F if and only if ¬ψ ∉ F , (ii) if ψ = ψ 1 ∨ ψ 2 , then ψ ∈ F if and only if {ψ 1 , ψ 2 } ∩ F ≠ ∅, and (iii) if π ∈ F then for every [A]ψ ∈ F we have ψ ∈ F ; (2) α is a function α ∶ T F  Figure 19. A graphical account of the intuition behind the proof of Lemma 10 from both interval and spatial perspectives.
While, by considering just the first component of a newly defined atom, we keep functions Req R , Obs R , and Box R for all R ∈ {A, B, D} the same as the ones introduced in Section 4 we introduce the following specializations for the relations → B and → D : In Figure 20 we provide an example of consistent atom labelling of a model of an BDA hom formula ϕ. For what concerns Req R (⋅), Box R (⋅), and Obs R (⋅) with R ∈ {B, D} we can make the same considerations made in the description of the example of Figure 8 in Section 4. For the example in Figure 20, we focus on describing how the behaviour of sets Req A (⋅), Box A (⋅), and Obs A (⋅) differ w.r.t. their counterparts Req R (⋅), Box R (⋅), and Obs R (⋅) with R ∈ {B, D} as well as an initial account of the behaviour of the marking functions α [x,y] . Let us observe first that while Req R is "monotone" for R ∈ {B, D} for atoms labelling intervals which are in the same R-relation. This claim is not true when R = A as a direct consequence of the fact that Allen relations STARTED-BY and CONTAINS are transitive while relation MEETS is not. For instance, in Figure 20   we have that: (1) α [x,y ′ ] (¬ψ 1 ) = ◊ for every x ≤ y ′ < y which means that the pending ⟨A⟩ request ¬ψ 1 is not fulfilled for the intervals ending in x if we consider the model up to y ′ ; α [x,y ′ ] (¬ψ 1 ) = ⧫ for every x ≤ y ≤ y ′ which means that the pending ⟨A⟩ request ¬ψ 1 is fulfilled for the intervals ending in x if we consider the model up to y ′ and, obviously, will stay fulfilled for such intervals ever after. In Figure 20,  We can extend the claim on labelings made in Section 4 to BDA hom formula and say that all and only the labelings which respect property ( * 1 ) are the ones for which the following property holds: and An account of how the second component of an atom behaves w.r.t. the relations → B and → D is given in Figure 21. Informally speaking, we have that the second component of an atom associated to an interval [x, y] keeps track of the A-requests featured by [x, x] which have been satisfied by intervals [x, y ′ ] with y ′ ≤ y (i.e., the ones marked with ⧫) against the ones still pending (i.e., the ones marked with ◊). Moreover, the second component of an atom keeps track of the formulas ψ that are forced to appear negated in every interval starting in x due to the presence of [A]ψ in the labelling of [x, x] (i.e., the formulas marked with ◊). Since we cannot consider a model fulfilled until all the A-requests are satisfied for all points x in the model we introduce the notion of final atom. An atom F α is final iff for every ψ ∈ T F ϕ A we have α(ψ) ∈ {⧫, □}. Now we can provide the notion of compass structures for BDA hom formula of by extending the BD hom with the following requirements: • (initial formula) ϕ ∈ L(0, N ); • (A-consistency) for all 0 ≤ x ≤ y ≤ N , Req A (L(x, y)) = Req A (L(y, y)); • (A-fulfilment) for every 0 ≤ x ≤ N atom L(x, N ) is final. Then we have the very same result for compass structures on BDA hom formulas.
Theorem 3. A BDA hom formula ϕ is satisfiable iff there is a homogeneous ϕ-compass structure.
Now we are ready to point out the minor differences in the steps for generalizing small model theorem of Section 5 to the BDA hom case. First of all it is asy to prove using Lemma 10 that Lemma 2 holds also for BDA hom homogeneous compass structures. in order to take into account the second component of atoms, we redefine the function ∆ ↑ ∶ At(ϕ) → N as follows: The main complication that arises from the introduction of the ⟨A⟩ operator consists of the fact that a B-sequence sequence that can be instantiated in a compass structure may . . . be not flat (it is forced to be decreasing still). Then, we introduce the concept of minimal ). Let us observe that for every minimal B-sequence Sh B = F 0 α 0 . . . F n α n we have n ≤ 5|ϕ| (i.e., the length of a minimal B-sequence is at most 5|ϕ| + 1). A minimal B-sequence will not represent the whole sequence of atoms on a "column" x of a given compass structure, as it happened for flat decreasing B-sequences in Section 5. In this case, a minimal B-sequence represents the labellings of the sequence of points sharing the same "column" x where the function ∆ ↑ (F i α i ) decreases as long as we move up on y. For capturing such a behaviour we provide the following notion of shading.
Let G = (N, L) be a compass structure for ϕ and 0 ≤ x ≤ N . We define the shading of x in G, written Sh G (x), as the sequence of pairs atoms (L(x, y 0 ), y 0 ) . . . (L(x, y m ), y m ) such that: (1) y i < y i+1 for every 0 ≤ i < m; (2) {∆ ↑ (L(x, y)) ∶ 0 ≤ y ≤ N } = {∆ ↑ (L(x, y i )) ∶ 0 ≤ i ≤ m}; (3) for every 0 ≤ i ≤ m we have y i = min {0 ≤ y ≤ N ∶ ∆ ↑ (L(x, y i )) = ∆ ↑ (L(x, y))}, i.e., y i is the minimum height on the column x that exhibits its value for ∆ ↑ . The above (finite) characterisation work just as good as the one defined in Section 5 for defining a natural equivalence relation of finite index over columns: we say that two columns x, x ′ are equivalent, written x ∼ x ′ , if and only if Sh . Then taking advantage of Lemma 10 we can prove that Lemma 5 also holds for BDA hom compass structures. The definitions of S → (x, y) and, consequently, of fingerprint f p(x, y) for all 0 ≤ x ≤ x ≤ N is the same as the one given in Section 5. Let us observe that the number of possible sets S → (x, y) due to the specialization of atoms is bounded by 2 6 5|ϕ| 2 +2|ϕ| ⋅ 2 3 5|ϕ|+2 in this case. For two atoms F α and G β , we say that they are equivalent modulo A, written F α ≡ ¬A G β if and only if F \ Req A (F α ) = G \ Req A (G β ) and α = β (i.e., F α and G β have at most different ⟨A⟩ requests). Then we may prove the analogous of Lemma 6 and related Corollary 2 in the case of BDA hom compass structures.
Lemma 12. Let G = (N, L) be a compass structure and let 0 ≤ x < x ′ ≤ y ≤ N . If f p(x, y) = f p(x ′ , y) and y ′ is the smallest point greater than y such that L(x, y ′ ) ≢ ¬A L(x, y), if any, and N otherwise, then, for all y ≤ y ′′ ≤ y ′ , L(x, y ′′ ) = L(x ′ , y ′′ ).
Corollary 4. Let G = (N, L) be a compass structure and let 0 ≤ x < x ′ ≤ y ≤ N . If f p(x, y) = f p(x ′ , y) and y ′ is the smallest point greater than y such that L(x, y ′ ) ≢ ¬A L(x, y), if any, and N otherwise, then, for every pair of points x, For BDA hom compass structures the definition of covered point, as well as witnesses Wit G (y), and row blueprint Row G (y) is the same of the ones given in Definition 6 and in Section 6, then Lemma 7, Corollary 2, Lemma 7, and Theorem 8 can be proved also in the case of BDA hom compass structures. On the basis of such results we can provide an algorithm very similar to the one proposed in the proof of Theorem 9 and thus the following analogous result.

EXPSPACE-hardness of BDA hom over finite linear orders
In this section we prove that the satisfiability problem for BDA hom interpreted over finite linear orders is EXPSPACE-hard. The result is obtained by a reduction from the exponentialcorridor tiling problem, which is known to be EXPSPACE-complete [vEB97]. Such a problem can be stated as follows. (1) for every x ∈ N we have tile(x, 0) = 0 and tile(x, C) = T ; (2) for every x ∈ N and every 0 ≤ y ≤ C we have (tile(x, y), tile(x + 1, y)) ∈ ⇒; (3) for every x ∈ N and every 0 ≤ y < C we have (tile(x, y), tile(x, y + 1)) ∈ ⇑.
The following classical result will be exploited to prove the main goal of this section.
To define a reduction from Problem 1 to the finite satisfiability of BDA hom we have to face the problem that formulas of BDA hom are interpreted over finite domains, whereas the tile functions ranges over an infinite domain. Roughly speaking, we will solve Problem 1 by means of an infinite "unfolding" of a finite portion of the tiling space that can be encoded by a (finite) model for a suitable BDA hom formula. The following result is crucial to that purpose.
Lemma 13. Given an instance T = (T, ⇒, ⇑, C) of Problem 13 we have that T is a positive instance if and only if there exists a function tile ∶ N × {0, . . . , C} → {0, . . . , T } that fulfills conditions 1, 2, and 3 of Problem 1 together with the following one: (4) there exist pref ix ∈ N and period ∈ N + s.t. for every x ≥ pref ix and every 0 ≤ y ≤ C we have tile(x, y) = tile(x + period, y).
Given an instance T = (T, ⇒, ⇑, C) of Problem 1 we provide a BDA hom formula ϕ T that is satisfiable over finite models if and only if there exists a function tile that satisfies the aforementioned properties an thus, by Lemma 13, if and only if T is a positive instance of Problem 1. In the proposed encoding we force each point of the model to represent exactly one tile. This is done by exploiting T + 1 propositional variables t 0 , . . . , t T , called tile variables, constrained by the following formulas 5 : t i , given a point in the model at least one tile variable holds over it; given a point in the model at most one tile variable holds over it (i.e., mutual exclusion).
Let us assume w.l.o.g. that C = 2 c − 1 for some c ∈ N. Then, we associate to each model For the sake of brevity, we denote with y n the natural number whose c-bit length binary encoding is bit V (n, b 1 ) . . . bit V (n, b c ). We encode the domain of a general function tile ∶ {0, . . . , pref ix, . . . , pref ix + period} → {0, . . . , T } into a finite model M = (N, V) by enumerating all the points of the grid {0, . . . , pref ix + suf f ix} × {0, . . . , C} along the timepoints {0, . . . , N } of the model in a lexicographical order. The formula ψ tile = ψ ∃ ∧ ψ ! ∧ ψ boundaries ∧ ψ ↑ is used to force such constraint where ψ boundaries and ψ ↑ are formulas defined as follows: every model M = (N, V) for ψ boundaries satisfies y 0 = 0 and y N = C; for every n ∈ {0, . . . , N } if y n = C then either n = N or y n+1 = 0, if y n < N then y n+1 = y n + 1; if and only if n < n ′ and bit V (n, b j ) = bit V (n ′ , b j ) for every i ≤ j ≤ c; Note that if ψ 1 = holds over [n, n ′ ] then y n = y n ′ . Formula ψ i = is used for guaranteeing the correct bitwise increment in formulas ψ i + , moreover it will be used in the following for correctly identifying tiles which are in the ⇒ relation.
It is worth noticing that any model M = (N, V) that satisfies ψ tile = ψ ∃ ∧ψ ! ∧ψ boundaries ∧ψ ↑ fulfills some properties. First of all, the interplay between ψ boundaries and ψ ↑ guarantees that N is a multiple of (C + 1) and thus, for suitably chosen pref ix and suf f ix, we can associate each point (x, y) ∈ {0, . . . , pref ix + suf f ix} × {0, . . . , C} to a point n ∈ {0, . . . , N } by means of a bijection map ∶ {0, . . . , pref ix + suf f ix} × {0, . . . , C} → {0, . . . , N } defined as map(x, y) = x ⋅ (C + 1) + y (i.e., map −1 (n) = (⌊ n C+1 ⌋, n % C) where % is the integer remainder operation). Moreover, let us observe that for every element (x, y) in the grid, we have that x is just implicitly encoded in the model by map(x, y) (i.e., x = ⌊ map(x,y) C+1 ⌋), while y is both implicitly encoded (i.e., x = ⌊map(x, y)% C) and explicitly encoded by the the values of variables b 1 . . . b c since it is easy to prove that ψ boundaries ∧ ψ ↑ forces y = y map(x,y) . Finally, the conjuncts ψ ∃ ∧ ψ ! ensure that each point in n ∈ {0, . . . , N }}, and thus, by means of map, any point in the grid, is associated with exactly one tile, that is the unique tile variable that belongs to V([n, n]). tile(x, y) = i and y map(x,y) = y, it is easy to prove that f is a bijection between the set of all such tile function, for every M ∈ N + , and the set of all finite models for ψ tile . In summary, the detailed description above shows that any model for ψ tile is basically a way to represent a generic function tile ∶ {0, . . . , M } × {0, . . . , C} → {0, . . . , T } and that, viceversa, each of such functions is represented by exactly one model of ψ tile . The next step is the encoding of the constraints of Lemma 13 in BA hom which allow to check whether there exists a function tile that witnesses that T is a positive instance. Such conditions, restricted to the finite case, are imposed by the following formulas: formula ψ 0,C forces condition 1 of Problem 1, that is, the bottom tile of each column is 0 and the top tile of each column is T ; formula ψ ⇒ forces condition 2 of Problem 1, that is, each pair of grid points of type (x, y), (x + 1, y) must be labelled with two tiles that are in the ⇒ relation. This is done by taking for each point n < N the minimal interval [n, n ′ ] with n < n ′ and y n = y n ′ ; then, the ⇒ relation is forced between the pair of tile variables that hold over [n, n] and y n = y n ′ , and does not exist n < n ′′ < n ′ such that y n = y n ′′ . Let us notice that, for the constraints imposed by ψ tile we have that n ′ − n = C + 1 and thus, according to the definition of map, we have map −1 (n ′ ) = (⌊ n C+1 ⌋ + 1, n % C); then, ψ min = holds on all and only those intervals whose endpoints represent horizontally adjacent points of the original grid; formula ψ ⇑ forces condition 3 of Problem 1, that is, each pair of grid points of type (x, y), (x, y + 1) must be labelled with two tiles that are in the ⇑ relation. The constraint can be easily imposed since the encoding ensures that vertical consecutive points in the grid corresponds to consecutive points in the model. The constraint is triggered on all the intervals of the type [n, n + 1], with the exception of the of the ones with y n = C. The constraint imposes that unique (thanks to ψ ∃ ∧ ψ ! ) pair of tile variables (t i , t j ) with (t i ) ∈ V([n, n]) and (t j ) ∈ V([n ′ , n ′ ]) must satisfy (i, j) ∈ ⇑.
, formula ψ pref ix forces condition 13 of Lemma 13, which imposes that there are two distinct columns in the grid which are tiled identically and one of such columns is the last one. This is done by means of a propositional letter p. The first conjunct of formula ψ pref ix imposes that there exists an interval [n, n ′ ] in the model for which p ∈ V([n, n ′ ]), y n = 0, and y n ′ = C (i.e., p "covers" at least one column). Moreover, for the homogeneity assumption, we have that p ∈ V([n ′′ , n ′′ ]) for every n ≤ n ′′ ≤ n ′ . The second conjunct imposes that for each p labelled points n there must exist a point n ′ > n with y n = y n ′ (this implicitly implies that n is associated to a grid point which does not belong to the last column). Moreover, formula [A]¬ψ 1 = imposes that n ′ must belong to the last column. Finally, it is required that there exists 0 Notice that in the above definitions the use of the ⟨A⟩ operator enables us to deal with two key aspects: (1) we can predicate on all the intervals [n, n ′ ] for any n, n ′ ∈ {0, . . . , N }, whereas, by using the ⟨B⟩ operator alone, we could predicate only on intervals of the form [0, n]; (2) we can predicate on the ending point of any current interval [n, n ′ ], i.e., the interval [n ′ , n ′ ]. Such a feature is missing in the logic BD hom where we can predicate only on the beginning point of any current interval. For instance, the logic BD hom cannot express properties like ψ 1 = which checks whether the same set of propositional letters holds over the two ending points of an interval. Let us define now the formula ϕ T as ϕ T = ψ tile ∧ ψ 0,C ∧ ψ ⇒ ∧ ψ ⇑ ∧ ψ pref ix . Since the models of ψ tile represent all and only the possible finite tiling functions for T and ψ 0,C ,ψ ⇒ , ψ ⇑ , ψ pref ix select the subset of such functions/models where conditions 1, 2, and 3, of Problem 1 together with condition 13 of Lemma 13 are fulfilled, we can prove the next result.
Theorem 6. Let T = (T, ⇒, ⇑, C) be an instance of Problem 1. Then, T is a positive instance if and only if the AB hom formula ϕ T is satisfiable over finite linear orders.
It is easy to see that ϕ T may be generated in LOGSPACE. To this end, it suffices to observe that we may define a multitape Turing Machine that performs the reduction using just a constant amount of working tapes, each one holding either ⌈log 2 T ⌉ bits or c bits. From such an observation and Theorem 5, we obtain the main result of the section.
Theorem 7. The satisfiability problem for the logic AB hom over finite linear orders is EXPSPACE-hard.
We conclude the section with some remarks that allow us to better understand how the homogeneity assumption affects the satisfiability problem of the considered HS fragments. First of all, we observe that the complexity of the satisfiability problem for AB hom over finite linear orders does not change if we replace it by full AB, that is, if we remove the homogeneity assumption [BMM + 14]). Moreover, we would like to point out that the proof of the EXPSPACE-hardness of the satisfiability problem for AB hom , that is, the proof of Theorem 7 to which this entire section is devoted, does not make use of the homogeneity assumption. On the contrary, the homogeneity assumption marks a deep difference in BDA: we proved that the satisfiabilty problem for BDA hom is decidable in exponential space, whereas the problem is known to be undecidable for full BDA [MM14,MMK10]. As for model checking, the model checking problem for AB hom over finite Kripke structures has been proved to be PSPACE-complete [BMM + 19b], while here we proved that the satisfiability checking problem, over finite linear orders, belongs to a higher complexity class, namely, EXPSPACE. The tight complexity bound for the model checking problem over finite Kripke structures for BDA hom is still open: we only know that for its three maximal proper fragments AB hom , DA hom , and BD hom it is PSPACE-complete [BMM + 19b, BMPS21b].

Conclusions
In this paper, we proved that, under the homogeneity assumption, the satisfiability checking problem for BDA hom , over finite linear orders, is EXPSPACE-complete. This result stems a number of observations about the complexity landscape of the satisfiability and model checking problems for HS fragments under homogeneity (HS hom ): (1) it improves the previouslyknown non-elementary upper bound [MMM + 16]; (2) it identifies the first EXPSPACEcomplete fragment of HS hom with respect to the satisfiability problem [BMM + 19b]. For what concerns the satisfiability problem for BDA hom , we already observed that the homogeneity assumption plays a crucial role only in the proof of the EXPSPACE membership of the problem (upper bound), while it does not play any role in the proof of the EXPSACE-hardness of the problem (lower bound).
The results for BDA hom also shed some light on the problem of determining the exact complexity of the satisfiability checking problem for BE hom , which is still open. As a matter of fact, BDA hom and BE hom are not comparable from the point of view of their expressiveness [BMM + 14]. However, BDA hom captures a fragment of BE hom , that is, BD hom extended with a restricted version of modality ⟨E⟩, namely, ⟨E⟩ π ψ = ⟨A⟩(π ∧ ψ), that allows one to predicate on the right endpoint of an interval. As shown in Section 9, this is the key property that causes the increase in complexity of the satisfiability checking problem from BD hom (PSPACE-complete) to BDA hom (EXPSPACE-complete). It is easy to see that the result given here can be easily extended to the case of homogeneous structures isomorphic to N.
From a more practical standpoint, we showed how BDA hom may encode a very expressive fragment of generalized * -free regular expression, namely, the fragment that features prefix, infix, and lookahead. Thanks to the result obtained in this work, we have that the emptiness problem for the languages expressed by means of such a fragment is elementary (EXPSPACEcomplete) in constrast to the non-elementary-hard result which was known for the the emptiness problem for full generalized * -free regular expression [Sto74].
As for future work, we plan to investigate the satisfiability/model checking problems for (fragments of) HS hom , interpreted over the linear orders Q and R. However, the precise characterization of the complexity of the satisfiability problem for BE hom remains the main open problem on the path to determining the exact complexity of the satisfiability problem for full HS hom over finite linear orders.