Bollig Benedikt
email: bollig@lsv.ens-cachan.fr

Lsv

An automaton over data words that captures EMSO logic

We develop a general framework for the specification and implementation of systems whose executions are words, or partial orders, over an infinite alphabet. As a model of an implementation, we introduce class register automata, a one-way automata model over words with multiple data values. Our model combines register automata and class memory automata. It has natural interpretations. In particular, it captures communicating automata with an unbounded number of processes, whose semantics can be described as a set of (dynamic) message sequence charts. On the specification side, we provide a local existential monadic second-order logic that does not impose any restriction on the number of variables. We study the realizability problem and show that every formula from that logic can be effectively, and in elementary time, translated into an equivalent class register automaton.

Introduction

A recent research stream, motivated by models from XML database theory, considers data words, i.e., strings over an infinite alphabet [START_REF] Björklund | On notions of regularity for data languages[END_REF][START_REF] Bouyer | A logical characterization of data languages[END_REF][START_REF] Demri | LTL with the freeze quantifier and register automata[END_REF][START_REF] Neven | Finite state machines for strings over infinite alphabets[END_REF][START_REF] Segoufin | Automata and logics for words and trees over an infinite alphabet[END_REF]. The alphabet is the cartesian product of a finite supply of labels and an infinite supply of data values. While labels may represent, e.g., an XML tag or reveal the type of an action that a system performs, data values can be used to model time stamps [START_REF] Bouyer | A logical characterization of data languages[END_REF][START_REF] Bouyer | An algebraic approach to data languages and timed languages[END_REF][START_REF] Figueira | Relating timed and register automata[END_REF], process identifiers [START_REF] Bollig | Realizability of dynamic MSC languages[END_REF][START_REF] Tzevelekos | Fresh-register automata[END_REF], or text contents in XML documents [START_REF] Bojańczyk | Two-variable logic on data trees and applications to XML reasoning[END_REF].

We will consider data words as behavioral models of concurrent systems. In this regard, it is natural to look at suitable logics and automata. Logical formulas may serve as specifications, and automata as system models or tools for deciding logical theories. This viewpoint raises the following classical problems/tasks: satisfiability (does a given logical formula have a model ?), model checking (do all executions of an automaton satisfy a given formula ?), and realizability (given a formula, construct a system model in terms of an automaton whose executions are precisely the models of the formula). Much work has indeed gone into defining logics and automata for data words, with a focus on satisfiability [START_REF] Bojańczyk | Twovariable logic on words with data[END_REF][START_REF] David | On the satisfiability of two-variable logic over data words[END_REF].

One of the first logical approaches to data words is due to [START_REF] Bouyer | A logical characterization of data languages[END_REF]. Since then, a two-variable logic has become a commonly accepted yardstick wrt. expressivity and decidability [START_REF] Bojańczyk | Twovariable logic on words with data[END_REF]. The logic contains a predicate to compare data values of two positions for equality. Its satisfiability problem is decidable, indeed, but supposedly of very high complexity. An elementary upper bound has been obtained only for weaker fragments [START_REF] Bojańczyk | Twovariable logic on words with data[END_REF][START_REF] David | On the satisfiability of two-variable logic over data words[END_REF]. For specification of communicating systems, however, two-variable logic is of limited use: it cannot express properties like "whenever a process Pid1 spawns some Pid2, then this is followed by a message from Pid2 to Pid1". Actually, the logic was studied for words with only one data value at each each position, which is not enough to encode executions of message-passing systems. But three-variable logics as well as extensions to two data values lead to undecidability. To put it bluntly, any "interesting" logic for dynamic communicating systems has an undecidable satisfiability problem.

Instead of satisfiability or model checking, we therefore consider realizability. A system model that realizes a given formula can be considered correct by construction. Realizability questions for data words have, so far, been neglected. One reason may be that there is actually no automaton that could serve as a realistic system model. Though data words naturally reflect executions of systems with an unbounded number of threads, existing automata fail to model distributed computation. Three features are minimum requirements for a suitable system model. First, the automaton should be a one-way device, i.e., read an execution once, processing it "from left to right" (unlike data automata [START_REF] Bojańczyk | Twovariable logic on words with data[END_REF], class automata [START_REF] Bojańczyk | An extension of data automata that captures XPath[END_REF], two-way register automata, and pebble automata [START_REF] Neven | Finite state machines for strings over infinite alphabets[END_REF]). Second, it should be non-deterministic (unlike alternating automata [START_REF] Demri | LTL with the freeze quantifier and register automata[END_REF][START_REF] Neven | Finite state machines for strings over infinite alphabets[END_REF]). Third, it should reflect paradigms that are used in concurrent programming languages such as process creation and message passing. Two known models match the first two properties: register automata [START_REF] Kaminski | Finite-memory automata[END_REF][START_REF] Kaminski | Finite-memory automata with non-deterministic reassignment[END_REF][START_REF] Tzevelekos | Fresh-register automata[END_REF] and class memory automata [START_REF] Björklund | On notions of regularity for data languages[END_REF]; but they clearly do not fulfill the last requirement.

Contribution. We provide an existential MSO logic over data words, denoted rEMSO, which does not impose any restriction on the number of variables. The logic is strictly more expressive than the two-variable logic from [START_REF] Bojańczyk | Twovariable logic on words with data[END_REF] and suitable to express interesting properties of dynamic communicating systems.

We then define class register automata as a system model. They are a mix of register automata [START_REF] Kaminski | Finite-memory automata[END_REF][START_REF] Kaminski | Finite-memory automata with non-deterministic reassignment[END_REF][START_REF] Tzevelekos | Fresh-register automata[END_REF] and class memory automata [START_REF] Björklund | On notions of regularity for data languages[END_REF]. A class register automaton is a non-deterministic one-way device. Like a class memory automaton, it can access certain configurations in the past. However, we extend the notion of a configuration, which is no longer a simple state but composed of a state and some data values that are stored in registers. This is common in concurrent programming languages and can be interpreted as "read current state of a process" or "send process identity from one to another process". Moreover, it is in the spirit of communicating finite-state machines [START_REF] Brand | On communicating finite-state machines[END_REF] or nested-word automata [START_REF] Alur | Adding nesting structure to words[END_REF], where more than one resource (state, channel, stack, etc.) can be accessed at a time. Actually, our automata run over directed acyclic graphs rather than words. To our knowledge, they are the first automata model of true concurrency that deals with structures over infinite alphabets.

We study the realizability problem and show that, for every rEMSO formula, we can compute, in elementary time, an equivalent class register automaton. The effective translation is based on Hanf's locality theorem [START_REF] Hanf | Model-theoretic methods in the study of elementary logic[END_REF] and properly generalizes [START_REF] Bollig | Muller message-passing automata and logics[END_REF][START_REF] Bollig | Message-passing automata are expressively equivalent to EMSO logic[END_REF] to a dynamic setting with unbounded process creation.

Outline. Sections 2 and 3 introduce data words and their logics. In Section 4, we define the new automata model. Section 5 is devoted to the realizability problem and states our main result. In Section 6, we give translations from automata back to logic. An extension of our main result to infinite data words is discussed in Section 7. We conclude in Section 8.

Data Words

Let N = {0, 1, 2, . . .} denote the set of natural numbers. For m ∈ N, we denote by [m] the set {1, . . . , m}. A boolean formula over a (possibly infinite) set A of atoms is a finite object generated by the grammar β ::

= true | false | a ∈ A | ¬β | β ∨ β | β ∧ β.
For an assignment of truth values to elements of A, a boolean formula β is evaluated to true or false as usual. Its size |β| is the number of vertices of its syntax tree. Moreover, |A| ∈ N ∪ {∞} denotes the size of a set A. The symbol ∼ = will be used to denote isomorphism of two structures. For a partial function f , the domain of f is denoted by dom(f ).

We fix an infinite set D of data values. Note that D can be any infinite set. For examples, however, we usually choose D = N. In a data word, every position will carry m ≥ 0 data values. It will also carry a label from a nonempty finite alphabet Σ. Thus, a data word is a finite sequence over

Σ × D m (over Σ if m = 0). Given a data word w = (a 1 , d 1 ) . . . (a n , d n ) with a i ∈ Σ and d i = (d 1 i , . . . , d m i ) ∈ D m , we let ℓ(i) refer to label a i and d k (i) to data value d k i .
Classical words without data come with natural relations on word positions such as the direct successor relation ≺ +1 and its transitive closure <. In the context of data words with one data value (i.e., m = 1), it is natural to consider also a relation ≺ ∼ for successive positions with identical data values [START_REF] Bojańczyk | Twovariable logic on words with data[END_REF]. As, in the present paper, we deal with multiple data values, we generalize these notions in terms of a signature. A signature S is a pair (σ, I). It consists of a finite set σ of binary relation symbols and an interpretation I. The latter associates, with every ⊳ ∈ σ and every data word w = w 1 . . .

w n ∈ (Σ ×D m ) * , a relation ⊳ w ⊆ [n]×[n]
such that the following hold, for all word positions i, j, i ′ , j ′ ∈ [n]:

(1) i ⊳ w j implies i < j (2) there is at most one k such that i ⊳ w k (3) there is at most one k such that k ⊳ w i (4) if i ⊳ w j and i ′ ⊳ w j ′ and w i = w i ′ and w j = w j ′ , then i < i ′ iff j < j ′

In other words, we require that ⊳ w (1) complies with <, (2) has out-degree at most one, (3) has in-degree at most one, and (4) is monotone. Our translation from logic into automata will be symbolic and independent of I, but its applicability and correctness rely upon the above conditions. However, several examples will demonstrate that the framework is quite flexible and allows us to capture existing logics and automata for data words. Note that ⊳ w can indeed be any relation satisfying (1)-(4). It could even assume an order on D.

As the interpretation I is mostly understood, we may identify S with σ and write ⊳ ∈ S instead of ⊳ ∈ σ, or |S| to denote |σ|. If not stated otherwise, we let in the following S be any signature.

≺ w +1 = {(i, i + 1) | i ∈ {1, . . . , n -1}} and (≺ k ∼ ) w = {(i, j) | 1 ≤ i < j ≤ n, d k (i) = d k (j), and there is no i < i ′ < j such that d k (i) = d k (i ′ )}. When m = 1, we write ≺ ∼ instead of ≺ 1
∼ . Automata and logic have been well studied in the presence of one single data value (m = 1) and for signature S 1 +1,∼ = {≺ +1 , ≺ ∼ } with the above interpretation [START_REF] Björklund | On notions of regularity for data languages[END_REF][START_REF] Bojańczyk | Twovariable logic on words with data[END_REF]. Here, and in the following, we adopt the convention that the upper index of a signature denotes the number m of data values. Figure 1 d,c) to receive the message. Elements from Σ dyn = {f, n , ! , ?} reveal the nature of an action, which requires two identities so that we choose m = 2. When a process performs an action, it should access the current state of (i) its own, (ii) the spawning process if a new-action is executed, and (iii) the sending process if a receive is executed (message contents are encoded in states). To this aim, we define a signature S 2 dyn = {≺ proc , ≺ fork , ≺ msg } with the following interpretation. Assume w = w 1 . . . w n ∈ (Σ dyn × N × N) * and consider, for a, b ∈ Σ dyn and i, j ∈ [n], the property

P (a,b) (i, j) = (ℓ(i) = a ∧ ℓ(j) = b ∧ d 1 (i) = d 2 (j) ∧ d 2 (i) = d 1 (j)) .
We set ≺ w proc = (≺ 1 ∼ ) w , which relates successive positions with the same executing process. Moreover, let i ≺ w fork j if i < j, P (f,n) (i, j), and there is no i < k < j such that P (f,n) (i, k) or P (f,n) (k, j). Finally, we set i ≺ w msg j if i < j, P (!,?) (i, j), and

|{i ′ < i | P (!,?) (i ′ , j) }| = |{j ′ < j | P (!,?) (i, j ′ ) }| .
This models FIFO communication. An example data word is given in Figure 2, which also depicts the relations induced by S 2 dyn . Horizontal arrows reflect ≺ proc , vertical arrows either ≺ fork or ≺ msg , depending on the labels. Note that n(2, 2) is executed by "root process" 2, which was not spawned by some other process. ♦ Graph Abstraction. Note that the graph induced by the data word from Figure 2 does not resemble a word anymore, as the direct successor relation on word positions is abandoned. Actually, we can see data words from a different angle. A signature S determines a class of data graphs G with (Σ × D m )-labeled nodes and S-labeled edges. A data graph is contained in G if it can be "squeezed" into a word w such that nodes that are connected by a ⊳-labeled edge turn into word positions that are related by ⊳ w . In other words, we consider directed acyclic graphs such that at least one linearization (extension to a total order) matches the requirements imposed by the signature.

Our principal proof technique relies on a graph abstraction of data words where data values are classified into equivalence classes. Let Part (m) be the set of all partitions of [m]. An S-graph is a (node-and edge-labeled) graph G = (V, (⊳ G ) ⊳∈S , λ, ν). Here, V is the finite set of nodes, λ : V → Σ and ν : V → Part (m) are node-labeling functions, and each ⊳ G ⊆ V × V is a set of edges such that, for all i ∈ V , there is at most one j ∈ V with i ⊳ G j, and there is at most one j ∈ V with j ⊳ G i. We represent ⊳ G and (⊳ G ) -1 as partial functions and set next G

⊳ (i) = j if i ⊳ G j, and prev G ⊳ (i) = j if j ⊳ G i.
Local graph patterns, so-called spheres, will also play a key role. For nodes i, j ∈ V , we denote by dist G (i, j) the distance between i and j, i.e., the length of the shortest path from i to j in the undirected graph (V , ⊳∈S ⊳ G ∪ (⊳ G ) -1 ) (if such a path exists). In particular, dist G (i, i) = 0. For some radius B ∈ N, the B-sphere of G around i, denoted by B-Sph G (i), is the substructure of G induced by {j ∈ V | dist G (i, j) ≤ B}. In addition, it contains the distinguished element i as a constant, called sphere center.

These notions naturally transfer to data words: With word w of length n, we associate the graph G(w) = ([n], (⊳ w ) ⊳∈S , λ, ν) where λ maps i to ℓ(i) and

ν maps i to {{l ∈ [m] | d k (i) = d l (i)} | k ∈ [m]}.
Thus, K ∈ ν(i) contains indices with the same data value at position i. Now, next w ⊳ , prev w ⊳ , dist w , and B-Sph w (i) are defined with reference to the graph G(w). We hereby assume that S is understood. We might also omit the index w if it is clear from the context.

Data words u and v are called (S-)equivalent if G(u) ∼ = G(v). For a language L, we let [L] S denote the set of words that are equivalent to some word in L.

Given the data word w from Figure 1, we have dist w (1, 8) = 3. The picture r r a a on the right shows 1-Sph w (4). The sphere center is framed by a rectangle; node labelings of the form {{1}} are omitted.

Logic

We consider monadic second-order logic to specify properties of data words. Let us fix countably infinite supplies of first-order variables {x, y, . . .} and secondorder variables {X, Y, . . .}.

The set MSO(S) of monadic second-order formulas is given by the grammar

ϕ ::= ℓ(x) = a | d k (x) = d l (y) | x ⊳ y | x = y | x ∈ X | ¬ϕ | ϕ ∨ ϕ | ∃x ϕ | ∃X ϕ where a ∈ Σ, k, l ∈ [m], ⊳ ∈ S,
x and y are first-order variables, and X is a second-order variable. The size |ϕ| of ϕ is the number of nodes of its syntax tree. Important fragments of MSO(S) are FO(S), the set of first-order formulas, which do not use any second-order quantifier, and EMSO(S), the set of formulas of the form ∃X 1 . . . ∃X n ϕ with ϕ ∈ FO(S).

The models of a formula are data words. First-order variables are interpreted as word positions and second-order variables as sets of positions. Formula ℓ(x) = a holds in data word w if position x carries an a, and formula d k (x) = d l (y) holds if the k-th data value at position x equals the l-th data value at position y. Moreover, x ⊳ y is satisfied if x ⊳ w y. The atomic formulas x = y and x ∈ X as well as quantification and boolean connectives are interpreted as usual.

For realizability, we will actually consider a restricted, more "local" logic: let rMSO(S) denote the fragment of MSO(S) where we can only use d k (x) = d l (x) instead of the more general d k (x) = d l (y). Thus, data values of distinct positions can only be compared via x ⊳ y. This implies that rMSO(S) cannot distinguish between words u and v such that G(u) ∼ = G(v). The fragments rFO(S) and rEMSO(S) of rMSO(S) are defined as expected.

In the case of one data value (m = 1), we will also refer to the logic EMSO 2 (S 1 +1,∼ ∪ {<}) that was considered in [START_REF] Bojańczyk | Twovariable logic on words with data[END_REF] and restricts EMSO logic to two first-order variables. The predicate < is interpreted as the strict linear order on word positions (strictly speaking, it is not part of a signature as we defined it). We shall later see that rEMSO(S 1 +1,∼ ) is strictly more expressive than EMSO 2 (S 1 +1,∼ ∪ {<}), though the latter involves the non-local predicates d 1 (x) = d 1 (y) and <. This gain in expressiveness comes at the price of an undecidable satisfiability problem.

A sentence is a formula without free variables. The language defined by sentence ϕ, i.e., the set of its models, is denoted by L(ϕ). By MSO(S), rMSO(S), rEMSO(S), etc., we refer to the corresponding language classes. Example 3. Think of a server that can receive requests (r) from an unbounded number of processes, and acknowledge (a) them. We let Σ = {r, a}, D = N, and m = 1. A data value from D is used to model the process identity of the requesting and acknowledged process. We present three properties formulated in rFO(S 1 +1,∼ ). Formula ϕ 1 = ∃x∃y (ℓ(x) = r ∧ ℓ(y) = a ∧ x ≺ ∼ y) expresses that there is a request that is acknowledged. Dually, ϕ 2 = ∀x∃y (ℓ(x) = r → ℓ(y) = a ∧ x ≺ ∼ y) says that every request is acknowledged before the same process sends another request. A last formula guarantees that two successive requests are acknowledged in the order they were received:

ϕ 3 = ∀x, y ℓ(x) = r ∧ ℓ(y) = r ∧ x ≺ +1 y → ∃x ′ , y ′ ℓ(x ′ ) = a ∧ ℓ(y ′ ) = a ∧ x ≺ ∼ x ′ ≺ +1 y ′ ∧ y ≺ ∼ y ′ This is not expressible in EMSO 2 (S 1
+1,∼ ∪ {<}). We will see that ϕ 1 , ϕ 2 , ϕ 3 form a hierarchy of languages that correspond to different automata models, our new model capturing ϕ 3 . ♦ Example 4. We pursue Example 2 and consider Σ dyn with signature S 2 dyn . Recall that we wish to model systems where an unbounded number of processes communicate via message-passing through unbounded FIFO channels. Obviously, not every data word represents an execution of such a system. Therefore, we identify some well formed data words, which have to satisfy

ϕ 1 ∧ ϕ 2 ∧ ϕ 3 ∈ rFO(S 2
dyn ) given as follows. We require that there is exactly one root process:

ϕ 1 = ∃x ℓ(x) = n ∧ d 1 (x) = d 2 (x) ∧ ∀y (d 1 (y) = d 2 (y) → x = y)
. Next, we assume that every fork is followed by a corresponding new-action, the first action of a process is a new-event, and every new process was forked by some other process:

ϕ 2 = ∀x   ℓ(x) = f → ∃y (x ≺ fork y) ∧ ℓ(x) = n ↔ ¬∃y (y ≺ proc x) ∧ ℓ(x) = n → d 1 (x) = d 2 (x) ∨ ∃y (y ≺ fork x)  
Finally, every send should be followed by a receive, and a receive be preceded by a send action:

ϕ 3 = ∀x ℓ(x) ∈ { ! , ? } → ∃y (x ≺ msg y ∨ y ≺ msg x)
. This formula actually ensures that, for every c, d ∈ N, there are as many symbols !(c, d) as ?(d, c), the N -th send symbol being matched with the N -th receive symbol. We call a data word over Σ dyn and S 2 dyn a message sequence chart (MSC, for short) if it satisfies ϕ 1 ∧ ϕ 2 ∧ ϕ 3 . Figure 2 shows an MSC and the induced relations. When we restrict to MSCs, our logic corresponds to that from [START_REF] Leucker | Dynamic message sequence charts[END_REF]. Note that model checking rMSO(S 2 dyn ) specifications against fork-and-join grammars, which can generate infinite sets of MSCs, is decidable [START_REF] Leucker | Dynamic message sequence charts[END_REF].

A last rFO(S 2 dyn )-formula (which is not satisfied by all MSCs) specifies that, whenever a process c forks some d, then this is followed by a message from d to c:

∀x 1 , y 1 (x 1 ≺ fork y 1 → ∃x 2 , y 2 (x 1 ≺ proc x 2 ∧ y 1 ≺ proc y 2 ≺ msg x 2 )). ♦

Class Register Automata

In this section, we define class register automata, a non-deterministic one-way automata model that captures rEMSO logic. It combines register automata [START_REF] Kaminski | Finite-memory automata[END_REF][START_REF] Kaminski | Finite-memory automata with non-deterministic reassignment[END_REF] and class memory automata [START_REF] Björklund | On notions of regularity for data languages[END_REF]. When processing a data word, data values from the current position can be stored in registers. The automaton reads the data word from left to right but can look back on certain states and register contents from the past (e.g., at the last position that is executed by the same process).

Positions that can be accessed in this way are determined by the signature S.

Their register entries can be compared with one another, or with current values from the input. Moreover, when taking a transition, registers can be updated by either a current value, an old register entry, or a guessed value.

Definition 1. A class register automaton (over signature S) is a tuple A = (Q, R, ∆, (F ⊳ ) ⊳∈S , Φ) where -Q is a finite set of states, -R is a finite set of registers,
the F ⊳ ⊆ Q are sets of local final states, -Φ is the global acceptance condition: a boolean formula over { 'q ≤ N ' | q ∈ Q and N ∈ N}, and -∆ is a finite set of transitions of the form

(p, g) a -→ (q, f ) .
Here, p : S ⇀ Q is a partial mapping representing the source states. Moreover, g is a guard, i.e., a boolean formula over

{ 'θ 1 = θ 2 ' | θ 1 , θ 2 ∈ [m] ∪ (dom(p) × R)} to perform
comparisons of values that are are currently read and those that are stored in registers. Finally, a ∈ Σ is the current label, q ∈ Q is the target state, and

f : R ⇀ (dom(p) × R) ∪ ([m] × N) is a partial mapping to update registers.
In the following, we write p ⊳ instead of p(⊳). Transition (p, g) a -→ (q, f ) can be executed at position i of a data word if the state at position prev ⊳ (i) is p ⊳ (for all ⊳ ∈ dom(p)) and, for a register guard (⊳ 1 , r 1 ) = (⊳ 2 , r 2 ), the entry of register r 1 at prev ⊳1 (i) equals that of r 2 at prev ⊳2 (i). The automaton then reads the label a together with a tuple of data values that also passes the test given by g, and goes to q. Moreover, register r obtains a new value according to f (r

): if f (r) = (⊳, r ′ ) ∈ dom(p) × R, then the new value of r is the value of r ′ at position prev ⊳ (i); if f (r) = (k, B) ∈ [m] × N,
then r obtains any k-th data value in the B-sphere around i. In particular, f (r) = (k, 0) assigns to r the (unique) k-th data value of the current position. To some extent, f (r) = (k, B) calls an oracle to guess a data value. The guess is local and, therefore, weaker than [START_REF] Kaminski | Finite-memory automata with non-deterministic reassignment[END_REF], where a non-deterministic reassignment allows one to write any data value into a register. This latter approach can indeed simulate our local version (this is not immediately clear, but can be shown using the sphere automaton from Section 5).

Let us be more precise. A configuration of A is a pair (q, ρ) where q ∈ Q is the current state and ρ : R ⇀ D is a partial mapping denoting the current register contents. If ρ(r) is undefined, then there is no entry in r. Let w = w 1 . . . w n ∈ (Σ × D m ) * be a data word and ξ = (q 1 , ρ 1 ) . . . (q n , ρ n ) be a sequence of configurations. For i ∈

[n], k ∈ [m], and B ∈ N, let D k B (i) = {d k (j) | j ∈ [n] such that dist w (i, j) ≤ B}. We call ξ a run of A on w if, for every position i ∈ [n], there is a transition (p i , g i ) ℓ(i) -→ (q i , f i ) such that the following hold: (1) dom(p i ) = {⊳ ∈ S | prev ⊳ (i) is defined} (2) for all ⊳ ∈ dom(p i ) : (p i ) ⊳ = q prev ⊳ (i)
(3) g i is evaluated to true on the basis of its atomic subformulas:

θ 1 = θ 2 is true iff val i (θ 1 ) = val i (θ 2 ) ∈ D where val i (k) = d k (i) and val i ((⊳, r)) = ρ prev ⊳ (i) (r)
(the latter might be undefined and, therefore, not be in D)

(4) for all r ∈ R :

     ρ i (r) = ρ prev ⊳ (i) (r ′ ) if f i (r) = (⊳, r ′ ) ∈ dom(p) × R ρ i (r) ∈ D k B (i) if f i (r) = (k, B) ∈ [m] × N ρ i (r) undefined if f i (r) undefined Run ξ is accepting if q i ∈ F ⊳ for all i ∈ [n] and ⊳ ∈ S such that next ⊳ (i) is undefined.
Moreover, we require that the global condition Φ is met. Hereby, an atomic constraint q ≤ N is satisfied by

ξ if |{ i ∈ [n] | q i = q}| ≤ N . The language L(A) ⊆ (Σ × D m ) * of A is
defined in the obvious manner. The corresponding language class is denoted by CRA(S).

The acceptance conditions are inspired by Björklund and Schwentick [START_REF] Björklund | On notions of regularity for data languages[END_REF], who also distinguish between local and global acceptance. Local final states can be motivated as follows. When data values model process identities, a ≺ ∼ -maximal position of a data word is the last position of some process and must give rise to a local final state. Moreover, in the context of S 2 dyn , a sending position that does not lead to a local final state in F ≺msg requires a matching receive event. Thus, local final states can be used to model "communication requests". The global acceptance condition of class register automata is more general than that of [START_REF] Björklund | On notions of regularity for data languages[END_REF] to cope with all possible signatures. However, in the special case of S 1 +1,∼ , there is some global control in terms of ≺ +1 . We could then perform some counting up to a finite threshold and restrict, like [START_REF] Björklund | On notions of regularity for data languages[END_REF], to a set of global final states.

We can classify many of the non-deterministic one-way models from the literature (most of them defined for m = 1) in our unifying framework:

-A class memory automaton [START_REF] Björklund | On notions of regularity for data languages[END_REF] is a class register automaton where, in all transitions (p, g) a -→ (q, f ), the update function f is undefined everywhere. The corresponding language class is denoted by CMA(S).

-As an intermediary subclass of class register automata, we consider nonguessing class register automata: for all transitions (p, g) a -→ (q, f ) and registers r, one requires f (r) ∈ (dom(p) × R) ∪ ([m] × {0}). We denote the corresponding language class by CRA -(S).

-A register automaton [START_REF] Demri | LTL with the freeze quantifier and register automata[END_REF][START_REF] Kaminski | Finite-memory automata[END_REF] is a non-guessing class register automaton over S m +1 = {≺ +1 }. Moreover, non-guessing class register automata over S 1 +1,∼ capture fresh-register automata [START_REF] Tzevelekos | Fresh-register automata[END_REF], which can dynamically generate data values that do not occur in the history of a run. Actually, this feature is also present in dynamic communicating automata [START_REF] Bollig | Realizability of dynamic MSC languages[END_REF] and in class memory automata over S 1 +1,∼ where a fresh data value is guaranteed by a transition (p, g) a -→ (q, f ) such that p ≺∼ is undefined.

-Class register automata are a model of distributed computation: considered over Σ dyn and S 2 dyn , they subsume dynamic communicating automata [START_REF] Bollig | Realizability of dynamic MSC languages[END_REF]. In particular, they can handle unbounded process creation and message passing. Updates of the form f (r) = (≺ fork , r ′ ) and f (r) = (≺ msg , r ′ ) correspond to receiving a process identity from the spawning/sending process. Moreover, when a process requests a message from the thread whose identity is stored in register r, a corresponding transition is guarded by (≺ proc , r) = (≺ msg , r 0 ) where we assume that every process keeps its identity in some register r 0 .

Example 5. Let us give a concrete example. Suppose Σ = {r, a} and D = N. We pursue Example 3 and build a non-guessing class register automaton A over

S 1 +1,∼ for L = [{(r, 1) . . . (r, n)(a, 1) . . . (a, n) | n ≥ 1}] S 1 +1,∼ . Roughly speaking, Transitions Run source (p) guard (g) input q update (f ) input state r1 r2 ≺∼ ≺+1 1 (r, d) q1 r1 := d (r, 8) q1 8 ⊥ 2 q1 (r, d) q1 r1 := d r2 := (≺+1, r1) (r, 5) q1 5 8 3 q1 q1 (≺∼, r2) = ⊥ (a, d) q2 r1 := d (a, 8) q2 8 ⊥ 4 q1 q2 (≺∼, r2) = (≺+1, r1) (a, d) q2 r1 := d (a, 5) q2 5 ⊥
Fig. 3. A non-guessing class register automaton over S 1 +1,∼ and a run there is a request phase followed by an acknowledgment phase, and requests are acknowledged in the order they are received. Figure 3 presents A and an accepting run on (r, 8)(r, 5)(a, 8)(a, 5). The states of A are q 1 and q 2 . State q 1 is assigned to request positions (first phase), state q 2 to acknowledgments (second phase). Moreover, A is equipped with registers r 1 and r 2 . During the first phase, r 1 always contains the data value of the current position, and r 2 the data value of the ≺ +1 -predecessor (unless we deal with the very first position, where r 2 is undefined, denoted ⊥). These invariants are ensured by transitions 1 and 2. In the second phase, by transition 3, position n+1 carries the same data value as the first position, which is the only request with undefined r 2 . Guard (≺ ∼ , r 2 ) = ⊥ is actually an abbreviation for ¬((≺ ∼ , r 2 ) = (≺ ∼ , r 2 )). By transition 4, position n + i with i ≥ 2 has to match the request position whose r 2 -contents equals

r 1 at n + i -1. Finally, F ≺∼ = {q 2 }, F ≺+1 = {q 2 }, and Φ = ¬(q 1 ≤ 0). ♦
For the language L from Example 5, one can show L ∈ CMA(S 1 +1,∼ ), using an easy pumping argument. Next, we will see that non-guessing class register automata, though more expressive than class memory automata, are not yet enough to capture rEMSO logic. Thus, dropping just one feature such as registers or guessing data values makes class register automata incomparable to the logic. Assume m = 2 and consider S 2

∼ = {≺ 1 ∼ , ≺ 2 ∼ } (cf. Example 1). Lemma 1. rFO(S 2 ∼ ) ⊆ CRA -(S 2 ∼ ).
Proof. We determine a formula ϕ ∈ rFO(S 2 ∼ ) and show, by contradiction, that every non-guessing class register automaton capturing L = L(ϕ) will necessarily accept a data word outside L. Roughly speaking, L consists of words where every position belongs to a pattern that is depicted in Figure 4 and captured by the formula pattern(x 1 , . . . ,

x 4 ) = x 1 ≺ 1 ∼ x 3 ∧ x 1 ≺ 2 ∼ x 4 ∧ x 2 ≺ 2 ∼ x 3 ∧ x 2 ≺ 1 ∼ x 4 . With this, ϕ = ∀x∃x 1 , . . . , x 4 (x ∈ {x 1 , . . . , x 4 } ∧ pattern(x 1 , . . . , x 4 )) ∈ rFO(S 2
∼ ) is the formula for L. Suppose that there is a non-guessing class register automaton A over S 2 ∼ recognizing L. We build a data word w = (a, d 1 ) . . . (a, d n ) ∈ L with n ∈ 4N and {d 1 1 , . . . , d 1 n } ∩ {d 2 1 , . . . , d 2 n } = ∅ by nesting disjoint patterns as depicted in Figure 4: we first create i 1 , . . . , i 4 , then add j 1 , . . . , j 4 ; the next pattern is to be inserted at n 1 , . . . , n 4 , etc. We assume that the data values of distinct patterns are disjoint. If we choose n large enough, then there are an accepting run ξ = (q 1 , ρ 1 ) . . . (q n , ρ n ) of A on w (with transition

t i = (p i , g i ) a -→ (q i , f i ) at j1 j2 j3 j4 i1 i2 i3 i4 n1 n2 n3 n4 ≺ 1 ∼ ≺ 2 ∼ Fig. 4. Nested patterns j1 j2 j3 j4 i1 i2 i3 i4
Fig. 5. Merging patterns position i) and positions i 1 , . . . , i 4 , j 1 , . . . , j 4 of w such that j 1 < i 1 , i 1 , . . . , i 4 and j 1 , . . . , j 4 form two (disjoint) patterns, and t i1 = t j1 , . . . , t i4 = t j4 . Now, consider the data word w ′ that we obtain from w when we swap the second data values of positions i 1 and j 1 . Thus, the data part of w ′ is

d 1 . . . d j1-1 (d 1 j1 , d 2 i1 ) d j1+1 . . . d i1-1 (d 1 i1 , d 2 j1 ) d i1+1 . . . d n .
We have the situation depicted in Figure 5. In particular, i 1 , . . . , i 4 do not form a single closed cycle. This violates ϕ, as x = i 1 implies x 1 ∈ {i 1 , i 2 }. Thus, w ′ ∈ L. However, applying transitions t 1 , . . . , t n still yields an accepting run ξ ′ = (q 1 , ρ ′ 1 ) . . . (q n , ρ ′ n ) of A on w ′ . For i ∈ [n], ρ ′ i is then given as follows:

ρ ′ i (r) =            d 2 i1 if ρ i (r) = d 2 j1 and i ∈ {j 1 , j 3 } d 2 j1 if ρ i (r) = d 2 i1 and i ∈ {i 1 , i 3 } d 1 i1 if ρ i (r) = d 1 j1 and i = j 4 d 1 j1 if ρ i (r) = d 1 i1 and i = i 4 ρ i (r) otherwise
One can verify that ξ ′ is indeed an accepting run on w ′ . ⊓ ⊔ proj Σ just removes the Γ component while keeping Σ and the data values. For C ∈ {CRA, CRA -, CMA}, we say that C(S) is closed under projection if, for every Γ and

L ⊆ ((Σ × Γ ) × D m ) * , L ∈ C(S Γ ) implies proj Σ (L) ∈ C(S).
Lemma 2. For every signature S, CRA(S), CRA -(S), and CMA(S) are closed under union, intersection, and projection. They are, in general, not closed under complementation.

Proof. Closure under union and intersection follows standard automata-theoretic constructions. Closure under projection holds since projection preserves the graph structure of a data word. For non-complementability, we can rely on the corresponding result for communicating automata [START_REF] Bollig | Message-passing automata are expressively equivalent to EMSO logic[END_REF]. Roughly speaking, a communicating automaton is a dynamic communicating automaton with a fixed set of at least two processes Proc. It can be identified as a special case of our framework: We let m = 0, since the number of processes is fixed. Moreover,

Σ = { !(c, d) , ?(c, d) | c, d ∈ Proc such that c = d }
is the set of actions. Finally, we define the signature S 0 Proc = {≺ proc , ≺ msg } as the straightforward restriction of S 2 dyn (cf. Example 2) to this bounded case. Speaking in terms of our framework, [START_REF] Bollig | Message-passing automata are expressively equivalent to EMSO logic[END_REF] indeed shows that class register automata (or, as m = 0, class memory automata) over S 0 Proc are not closed under complementation. ⊓ ⊔

Realizability of EMSO Specifications

In this section, we solve the realizability problem for rEMSO specifications:

Theorem 1. For all signatures S, rEMSO(S) ⊆ CRA(S). An automaton can be computed in elementary time and is of elementary size.

Classical procedures that translate formulas into automata follow an inductive approach, use two-way mechanisms and tools such as pebbles, or rely on reductions to existing translations. There is no obvious way to apply any of these techniques to prove our theorem.

We therefore follow a technique from [START_REF] Bollig | Message-passing automata are expressively equivalent to EMSO logic[END_REF], which is based on ideas from [START_REF] Th | Local normal forms for first-order logic with applications to games and automata[END_REF][START_REF] Thomas | Elements of an automata theory over partial orders[END_REF]. We first transform the first-order kernel of the formula at hand into a normal form due to Hanf [START_REF] Hanf | Model-theoretic methods in the study of elementary logic[END_REF]. According to that normal form, satisfaction of a firstorder formula wrt. data word w only depends on the spheres that occur in G(w), and on how often they occur, counted up to a threshold. The size of a sphere is bounded by a radius that depends on the formula. The threshold can be computed from the radius and |S|. We can indeed apply Hanf's Theorem, as the structures that we consider have bounded degree: every node/word position has at most |S| incoming and at most |S| outgoing edges. In a second step, we transform the formula in normal form into a class register automaton.

Recall that B-Sph G (i) denotes the B-sphere of graph/data word G around i (cf. Section 2). Its size (number of nodes) is bounded by maxSize := (2|S| + 2) B . Let B-Spheres S = {B-Sph G (i) | G = (V, . . .) is an S-graph and i ∈ V }. We do not distinguish between isomorphic structures so that B-Spheres S is finite.

Theorem 2 (cf. [START_REF] Bollig | An optimal construction of Hanf sentences[END_REF][START_REF] Hanf | Model-theoretic methods in the study of elementary logic[END_REF]). Let ϕ ∈ rFO(S). One can compute, in elementary time, B ∈ N and a boolean formula β over { 'S ≤ N ' | S ∈ B-Spheres S and N ∈ N} such that L(ϕ) is the set of data words that satisfy β. Here, we say that w = w 1 . . . w n satisfies atom S ≤ N iff |{i ∈ [n] | B-Sph w (i) ∼ = S}| ≤ N . The radius B and the size of β and its constants N are elementary in |ϕ| and |S|.

Proof. A simple but crucial observation is that there exists a first-order sentence that is equivalent to ϕ but talks about G(w) rather than w. We simply write λ(x) = a instead of ℓ(x) = a, and η∈P ν(x) = η instead of d k (x) = d l (x) where P ⊆ Part (m) is the set of partitions of [m] such that k and l occur in the same set. As rMSO(S)-formulas cannot distinguish between data words that induce the same graph, the boolean formula β in normal form exists due to [START_REF] Hanf | Model-theoretic methods in the study of elementary logic[END_REF]. Actually, β can be computed in triply exponential time [START_REF] Bollig | An optimal construction of Hanf sentences[END_REF].

⊓ ⊔

By Theorem 2, it will be useful to have a class register automaton that, when reading a position i of data word w, outputs the sphere of w around i. Its construction is actually the main difficulty in the proof of Theorem 1, as spheres have to be computed "in one go", i.e., reading the word from left to right, while accessing only certain configurations from the past. Proposition 1. Let B ∈ N. One can compute, in elementary time, a class register automaton A B = (Q, R, ∆, (F ⊳ ) ⊳∈S , true) over S, as well as a mapping π : Q → B-Spheres S such that L(A B ) = (Σ × D m ) * and, for every data word w = w 1 . . . w n , every accepting run (q 1 , ρ 1 ) . . . (q n , ρ n ) of A B on w, and every i ∈ [n], π(q i ) ∼ = B-Sph w (i). Moreover, |Q| and |R| are elementary in B and |S|.

The proposition is proved below. Let us first show how we can use it, together with Theorem 2, to translate an rEMSO formula into a class register automaton.

Proof (of Theorem 1). Let ϕ = ∃X 1 . . . ∃X n ψ ∈ rEMSO(S) be a sentence with ψ ∈ rFO(S) (we also assume n ≥ 1). Since Theorem 2 applies to first-order formulas only, we extend Σ to Σ × Γ where Γ = 2 {1,...,n} . Consider the extended signature S Γ (cf. Section 4). From ψ, we obtain a formula ψ Γ ∈ rFO(S Γ ) by replacing ℓ(x) = a with M∈Γ ℓ(x) = (a, M ) and x ∈ X j with a∈Σ, M∈Γ ℓ(x) = (a, M ∪ {j}). Consider the radius B ∈ N and the normal form β Γ for ψ Γ due to Theorem 2. Let A B = (Q, R, ∆, (F ⊳ ) ⊳∈SΓ , true) be the class register automaton over S Γ from Proposition 1 and π be the associated mapping. The global acceptance condition of A B is obtained from β Γ by replacing every atom S ≤ N with π -1 (S) ≤ N (which can be expressed as a suitable boolean formula). We hold A ′ B , a class register automaton satisfying L(A ′ B ) = L(ψ Γ ). Exploiting closure under projection (Lemma 2), we obtain a class register automaton over S that recognizes L(ϕ) = proj Σ (L(ψ Γ )).

⊓ ⊔

The Sphere Automaton. In the remainder of this section, we construct the class register automaton A B = (Q, R, ∆, (F ⊳ ) ⊳∈S , true) from Proposition 1, together with π : Q → B-Spheres S . The idea is that, at each position i in the data word w at hand, A B guesses the B-sphere S of w around i. To verify that the guess is correct, i.e., S ∼ = B-Sph w (i), S is passed to each position that is connected to i by an edge in G(w). That new position locally checks label and data equalities imposed by S, then also forwards S to its neighbors, and so on. Thus, at any time, several local patterns have to be validated simultaneously so that a state q ∈ Q is actually a set of spheres. In fact, we consider extended spheres E = (S, α, col ) where S = (U, (⊳ E ) ⊳∈S , λ, ν, γ) is a sphere (with universe U and sphere center γ), α ∈ U is the active node, and col is a color from a finite set, which will be specified later. The active node α indicates the current context, i.e., it corresponds to the position currently read.

Let B-eSpheres S denote the set of extended spheres, which is finite up to isomorphism. For E = (S, α, col ) ∈ B-eSpheres S , S = (U, (⊳ E ) ⊳∈S , λ, ν, γ), and j ∈ U , we let E[j] refer to the extended sphere (S, j, col ) where the active node α has been replaced with j. Now suppose that the state q of A B that is reached after reading position i of data word w contains E = (S, α, col ). Roughly speaking, this means that the neighborhood of i in w shall look like the neighborhood of α in S. Thus, if S contains j ′ such that α ⊳ E j ′ , then we must find i ′ such that i ⊳ w i ′ in the data word. Local final states will guarantee that i ′ indeed exists. Moreover, the state assigned to i ′ in a run of A B will contain the new proof obligation E[j ′ ] and so forth. Similarly, an edge in (the graph of) w has to be present in spheres, unless it is beyond their scope, which is limited by B. All this is reflected below, in conditions T2-T6 of a transition.

We are still facing two major difficulties. Several isomorphic spheres have to be verified simultaneously, i.e., a state must be allowed to include isomorphic spheres in different contexts. A solution to this problem is provided by the additional coloring col . It makes sure that centers of overlapping isomorphic spheres with different colors refer to distinct nodes in the input word. To put it differently, for a given position i in data word w, there may be i ′ such that 0 < dist w (i, i ′ ) ≤ 2B +1 and B-Sph w (i) ∼ = B-Sph w (i ′ ). Fortunately, there cannot be more than (2|S| + 1) • maxSize 2 such positions. As a consequence, the coloring col can be restricted to the set {1, . . . , (2|S| + 1) • maxSize 2 + 1}.

Implementing these ideas alone would do without registers and yield a class memory automaton. But this cannot work due to Lemma 1. Indeed, a faithful simulation of cycles in spheres has to make use of data values. They need to be anticipated, stored in registers, and locally compared with current data values from the input word. We introduce a register (E, k) for every extended sphere E and k ∈ [m]. To get the idea behind this, consider a run (q 1 , ρ 1 ) . . . (q n , ρ n ) of A B on w = (a 1 , d 1 ) . . . (a n , d n ). Pick a position i of w and suppose that E = (U, (⊳ E ) ⊳∈S , λ, ν, γ, α, col ) ∈ q i . If α is minimal in E, then there is no pending requirement to check. Now, as α shall correspond to the current position i of w, we write, for every k ∈ [m], d k i into register (E, k) (first case of T8 below). For all j ∈ U \ {α}, on the other hand, we anticipate data values and store them in (E[j], k) (also first case of T8). They will be forwarded (second case of T8) and checked later against both the guesses made at other minimal nodes of E (guard g 3 of T7) and the actual data values in w (guard g 2 ). This procedure makes sure that the values that we carry along within an accepting run agree with the actual data values of w.

Now, as prev w

⊳ and next w ⊳ are monotone wrt. positions with identical labels and data values, two isomorphic cycles cannot be "merged" into one larger one, unlike in non-guessing class register automata where different parts may act erroneously on the assumption of inconsistent data values (cf. Lemma 1). As a consequence, spheres are correctly simulated by the input word.

Let us formalize A B = (Q, R, ∆, (F ⊳ ) ⊳∈S , true) and the mapping π : Q → B-Spheres S , following the above ideas. The set of registers is R = B-eSpheres S × [m]. A state from Q is a non-empty set q ⊆ B-eSpheres S such that (i) there is a unique E = (U, (⊳ E ) ⊳∈S , λ, ν, γ, α, col ) ∈ q such that γ = α (we set π(q) = (U, (⊳ E ) ⊳∈S , λ, ν, γ) to obtain the mapping required by Prop. 1), (ii) there are a ∈ Σ and η ∈ Part (m) such that, for all E = (. . . , λ, ν, . . .) ∈ q, we have λ(α) = a and ν(α) = η (we let label (q) = a and data(q) = η), and (iii) for every (S, α, col ), (S, α ′ , col ) ∈ q, we have α = α ′ .

Before we turn to the transitions, we introduce some notation. Below, E will always denote (S, α, col ) with S = (U, (⊳ E ) ⊳∈S , λ, ν, γ); in particular, α refers to the active node of E. The mappings next E ⊳ , prev E ⊳ , and dist E are defined for extended spheres in the obvious manner. For j ∈ U , we set type

-(j) = {⊳ ∈ S | prev E ⊳ (j) is defined}. Let us fix, for all E ∈ B-eSpheres S such that type -(α) = ∅, some arbitrary ⊳ E ∈ type -(α). Finally, for state q and k 1 , k 2 ∈ [m], we write k 1 ∼ q k 2 if there is K ∈ data(q) such that {k 1 , k 2 } ⊆ K.
We have a transition (p, g) a -→ (q, f ) iff the following hold:

T1 label (q) = a T2 for all ⊳ ∈ S, E ∈ q : ⊳ ∈ dom(p) =⇒ prev E ⊳ (α) is undefined T3 for all ⊳ ∈ dom(p), E ∈ q, j ∈ U : j ⊳ E α ⇐⇒ E[j] ∈ p ⊳ T4 for all ⊳ ∈ dom(p), E ∈ p ⊳ , j ∈ U : α ⊳ E j ⇐⇒ E[j] ∈ q T5 for all ⊳ ∈ dom(p), E ∈ q : prev E ⊳ (α) undefined =⇒ dist E (γ, α) = B T6 for all ⊳ ∈ dom(p), E ∈ p ⊳ : next E ⊳ (α) undefined =⇒ dist E (γ, α) = B T7 g = g 1 ∧ g 2 ∧ g 3 where g 1 = k1,k2∈[m] k1 ∼q k2 k 1 = k 2 ∧ k1,k2∈[m] k1 ∼q k2 ¬ (k 1 = k 2 ) g 2 = k∈[m] E ∈ q ⊳∈type -(α) k = (⊳, (E, k)) g 3 = k∈[m] E ∈ q j ∈ U ⊳1,⊳2∈type -(α) (⊳ 1 , (E[j], k)) = (⊳ 2 , (E[j], k))
T8 for all k ∈ [m] and E ∈ B-eSpheres S :

f ((E, k)) =    (k, dist E (j, α)) if ∃j ∈ U : E[j] ∈ q and type -(j) = ∅ (⊳ E[j] , (E, k)) if ∃j ∈ U : E[j] ∈ q and type -(j) = ∅ undefined otherwise
For every ⊳ ∈ S, the local acceptance condition is given by

F ⊳ = {q ∈ Q | for all E ∈ q, next E ⊳ (α) is undefined}.
Recall that the global one is true. As the maximal size of a sphere is exponential in B and polynomial in |S|, the numbers |Q| and |R| are elementary in B and |S|. Note that A B can actually be constructed in elementary time.

In the appendix, we show that the construction of A B and π is correct in the sense of Proposition 1.

From Automata to Logic

Next, we give translations from automata back to logic. Note that rEMSO(S 1 +1 ) CRA(S 1 +1 ), as rEMSO(S 1 +1 ) cannot reason about data values. However, we show that the behavior of a class register automaton is always MSO definable and, in a sense, "regular". There are natural finite-state automata that do not share this property: two-way register automata (even deterministic ones) over onedimensional data words are incomparable to MSO(S 1 +1,∼ ) [START_REF] Neven | Finite state machines for strings over infinite alphabets[END_REF].

Theorem 3. For every signature S, we have CRA(S) ⊆ MSO(S).

Proof. As usual, second-order variables are used to encode an assignment of positions to transitions, which is then checked for being an accepting run. To simulate register contents, we extend a technique from [START_REF] Neven | Finite state machines for strings over infinite alphabets[END_REF]. Let us describe how a class register automaton A = (Q, R, ∆, (F ⊳ ) ⊳∈S , Φ) over S is translated into an MSO(S)-sentence ϕ A such that L(ϕ A ) = L(A). Suppose B is the maximum of all B for which there is a transition (p, g) a -→ (q, f ) ∈ ∆ with f (r) = (k, B), for some r and k.

We assume a second-order variable X δ for every transition δ ∈ ∆. Moreover, we assume a variable X β r,B for each r ∈ R, B ∈ {1, . . . , B}, and each formula β(x u , x v ) ∈ rFO(S), with free variables x u and x v , that is of the form

β(x u , x v ) = ∃x 1 , . . . , x B (x u ⊲⊳ 1 x 1 ⊲⊳ 2 . . . ⊲⊳ B x B = x v )
where ⊲⊳ i ∈ { = , ⊳ , ⊳ -1 | ⊳ ∈ S}. The intuition of these variables is as follows. If a position x is contained in X δ with δ = (p, g) a -→ (q, f ) and f (r) = (k, B), then x will also be contained in some X β r,B , meaning that x executes δ and the new data value of r is the k-th data value at the unique y such that β(x, y) is satisfied.

The formula ϕ A will be of the form

∃(X δ ) δ ∃(X β r,B ) r,B,β (ψ 1 ∧ ψ 2 ).
Here, ψ 1 ∈ rFO(S) checks whether the following hold:

each position x is contained in exactly one set X δ for all x and r ∈ R, x is contained in at most one set of the form

X β r,B -if x ∈ X δ with δ = (p, g) a -→ (q, f ) and f (r) = (k, B), then x ∈ X β
r,B for some β the label at position x ∈ X δ corresponds to the label of δ conditions (1) and (2) in the definition of a run are met

MSO(S 1 +1,∼ ) = rMSO(S 1 +1,∼ ) CRA(S 1 +1,∼ ) CRA -(S 1 +1,∼ ) EMSO(S 1 +1,∼ ) rEMSO(S 1 +1,∼ ) EMSO 2 (S 1 +1,∼ ∪ {<}) = CMA(S 1 +1,∼ ) CRA(S 1 +1 ) = CRA -(S 1 +1 ) Thm. 1 [2] [2, 5]
Fig. 6. A hierarchy of automata and logics over one-dimensional data words the (potential) run is accepting, i.e., F ⊳ and Φ are respected It remains to define ψ 2 ∈ MSO(S) to check property (3) of a run. This can be done by means of formulas ψ g (x), one for each atomic guard

g ∈ { θ 1 = θ 2 | θ 1 , θ 2 ∈ [m] ∪ (S × R)}.
We restrict here to g = ((⊳, r) = l) with l ∈ [m]. The other cases are similar. Formula ψ g (x) checks if the contents of r at position prev ⊳ (x) equals the l-th data value at x. It will be of the form ∃X ∃(X r ) r∈R χ g . The idea is that the positions in X describe a path x 1 ⊳ 1 x 2 ⊳ 2 . . . ⊳ n-1 x n ⊳ x that "transports" the data value d l (x). We suppose that every position x i is contained in precisely one set X ri meaning that register r i is updated by the contents of r i-1 at position x i-1 . More precisely, we require that, for all i ∈ {2, . . . , n}, there is a transition δ with register-update mapping f such that x i ∈ X δ and f (r i ) = (⊳ i-1 , r i-1 ). The last update should concern r, i.e., we require x n ∈ X r . So suppose x 1 ∈ X r1 . It remains to ensure that register r 1 , at x 1 , obtains the value d l (x). More precisely, there should be a transition δ with update mapping f , as well as k, B, β and a position x 0 such that β(x 1 , x 0 ) holds, f (r 1 ) = (k, B), x 1 ∈ X δ ∩ X β r1,B and d k (x 0 ) = d l (x). Note that χ g can be defined as an FO(S)-formula and ψ g (x) holds iff the register contents of r at prev ⊳ (x) equals d l (x).

⊓ ⊔

In the proof, the non-local predicate d k (x) = d l (y) is indeed essential to simulate register assignments, as we need to compare data values at positions where registers are updated. For one-dimensional data words, however, the predicate can be easily defined in rMSO(S 1 +1,∼ ). The following theorem is dedicated to this classical setting over S 1 +1,∼ .

Theorem 4. We have the inclusions depicted in Figure 6. Here, -→ means 'strictly included' and means 'included'.

Proof. The inclusion rEMSO(S 1 +1,∼ ) ⊆ CRA(S 1 +1,∼ ) is due to Theorem 1, and

CRA(S 1 +1,∼ ) ⊆ MSO(S 1 +1,∼ ) is due to Theorem 3. The equality MSO(S 1 +1,∼ ) = rMSO(S 1 +1,∼ ) is obvious.
CMA(S1 +1,∼ ) rEMSO(S 1 +1,∼ ) : Consider a class memory automaton A. As A is completely state-based and does not make use of any register, it is standard to define a sentence ψ ∈ rEMSO(S 1 +1,∼ ) such that L(ψ) = L(A). It remains to show strictness of the inclusion. 1 Suppose Σ = {r, a} and D = N,

and let L = [{(r, 1) . . . (r, n)(a, 1) . . . (a, n) | n ≥ 1}] S 1
+1,∼ (note that the proof also works if Σ is a singleton). Towards a contradiction, suppose L is recognized by class memory automaton A. As A has no access to registers, a run of A on (r, 1) . . . (r, n)(a, 1) . . . (a, n) is actually a sequence of states q 1 . . . q 2n . If n is large enough, there are positions 1 ≤ i < j ≤ n such that q i = q j . Now, we can simply exchange the data values at positions i and j without affecting acceptance. More precisely, q 1 . . . q 2n is also an accepting run on the data word (r, 1) . . . (r, i-1)(r, j)(r, i+1) . . . (r, j-1)(r, i)(r, j+1) . . . (r, n)(a, 1) . . . (a, n), which is not contained in L, a contradiction. On the other hand, L is the conjunction ϕ 1 ∧ ϕ 2 of the following rFO(S 1 +1,∼ )-sentences:

-

ϕ 1 = ∃x true ∧ ∀x ∃ =1 y x ≺ ∼ y ∧ ℓ(x) = r ∧ ℓ(y) = a ∨ y ≺ ∼ x ∧ ℓ(y) = r ∧ ℓ(x) = a -ϕ 2 = ∀x, y   x ≺ +1 y ∧ ¬(ℓ(x) = r ∧ ℓ(y) = a) → ∃x ′ , y ′ x ≺ ∼ x ′ ≺ +1 y ′ ∧ y ≺ ∼ y ′ ∨ x ′ ≺ +1 y ′ ≺ ∼ y ∧ x ′ ≺ ∼ x  
The first formula expresses that the word has positive length and each ∼ equivalence class has size two. The second formula ensures the FIFO structure of a data word.

CMA(S 1

+1,∼ ) CRA -(S 1 +1,∼ ) : Consider the language L from the previous paragraph. It is not in CMA(S 1 +1,∼ ). However, Example 5 demonstrates that there is a non-guessing class register automaton recognizing L. rMSO(S 1 +1,∼ ) ⊆ CRA(S 1 +1,∼ ) : We encode grids into data words. An (i, j)grid is a graph that has a height i ∈ N and a width j ∈ N meaning that it has i rows and j columns that are connected by a horizontal and a vertical immediate successor relation. Nodes are labeled by elements from Σ = {a, b, c}. We encode an (i, j)-grid as the data word (a 11 , 1) . . . (a i1 , i)(a 12 , 1) . . . (a i2 , i) . . . . . . (a 1j , 1) . . . (a ij , i) where a kl ∈ Σ is the labeling of the grid node (k, l). Hereby, each subword (a 1k , 1) . . . (a ik , i) constitutes a column. Then, moving down in the grid corresponds to a ≺ +1 -step in the data word, moving right corresponds to a ≺ ∼ -step. These steps are rFO(S 1 +1,∼ )-definable. Consider the set L of grids of the form H 1 .C.H 2 where C is a single column of c-labeled nodes, and H 1 and H 2 are grids with labels from {a, b} such that the sets of different column words (over {a, b}) in H 1 and H 2 coincide. We know that L is MSO-definable in the signature of a grid. Therefore, the encoding L of L into data words is rMSO(S 1 +1,∼ )-definable. Using an argument from [START_REF] Thomas | Elements of an automata theory over partial orders[END_REF], we show that L ∈ CRA(S 1 +1,∼ ). First observe that the number of distinct sets of columns words over {a, b} of length n is 2 2 n . Suppose, towards a contradiction, that there is a class register automaton A = (Q, R, ∆, (F ⊳ ) ⊳∈S , Φ) such that L(A) = L. Without loss of generality, we assume that Φ is given in terms of a simple set of global final states. In a run of A on the data-word encoding of grid H 1 .C.H 2 of height n, all the information that A has about H 1 must be encoded in the n configurations that are taken while reading the c-labeled positions. The number of tuples of n configurations that A can distinguish is bounded by

N = |Q| n • 2 (|R|•n) 2 • (n + 1) |R|•n .
Here, the second factor is an upper bound on the number of equivalence classes on the set {1, . . . , |R| • n}, which captures guessed values, and the third factor is the number of registers assignments. Now, as Q and R are fixed, N does not grow sufficiently fast so that A will accept a data word outside L.

CRA(S 1

+1 ) ⊆ CRA -(S 1 +1 ) : Note first that class register automata over S 1

+1

are a variant of the register automata with non-deterministic reassignment from [START_REF] Kaminski | Finite-memory automata with non-deterministic reassignment[END_REF]. The crucial difference is that the "look-ahead" of CRA(S 1 +1 ) is bounded, while the automata from [START_REF] Kaminski | Finite-memory automata with non-deterministic reassignment[END_REF] can guess any arbitrary data value. As a consequence, the latter capture the set of data words such that all data values (except the last one) are different from the last data value. We will show that, on the other hand, class register automata over S 1 +1 are no more expressive than classical register automata, which cannot recognize that language.

Let A = (Q, R, ∆, (F ⊳ ) ⊳∈S , Φ) be a class register automaton over S 1 +1 . We sketch the construction of a non-guessing class register automaton

A ′ = (Q ′ , R ′ , ∆ ′ , (F ′ ⊳ ) ⊳∈S , Φ ′ ) over S 1 +1 such that L(A) = L(A ′ ).
Let B be the maximal value B such that an update of A is of the form f (r) = (k, B). Without loss of generality, we assume that B ≥ 1 exists. The idea is that A ′ keeps track of the register contents of the last B positions, and of the last B data values read. To this aim, we set R ′ = {-B, . . . , -1} × (R ⊎ {current}). Register (-i, current) contains the i-th last input data value (wrt. the next position to read), and register (-i, r) simulates register assignments of A for r. In particular, this allows us to access every input data value from the last B ≤ B positions. In order to anticipate data values, a state of A ′ contains, apart from a state of A, an equivalence relation over both the new set of registers R ′ and the next B positions. Thus, a state of A ′ is a pair (q, ∼) where q ∈ Q and ∼ is an equivalence relation over R ′ × {1, . . . , B}.

To simulate an update f (r) = (k, B) of A with B ≥ 1, A ′ either writes the current value or one of the values stored in (-B, current), . . . , (-1, current) into r, or goes into a state in which r and at least one of the next B positions are considered equivalent. Of course, the equivalence has to be globally consistent and locally consistent meaning that two equivalent registers should contain the same data value. Moreover, when A ′ is in a state where the next position and a defined register r are considered equivalent, then the next symbol to read is the contents of r. If, in contrast, the next position is not equivalent to some defined register, then A ′ should read a data value that is currently not stored, and store it in r (unless another update for r applies). This finally ensures that a suitable data value in terms of an equivalence relation has been guessed when performing an update of the form f (r) = (k, B).

⊓ ⊔

The remaining (strict) inclusions are left open. When there are no data values, we have expressive equivalence of EMSO logic and class register automata (which then reduce to class memory automata). The translation from automata to logic follows the standard approach. The following theorem is a proper generalization of the main result of [START_REF] Bollig | Message-passing automata are expressively equivalent to EMSO logic[END_REF].

Theorem 5. Suppose m = 0. For every signature S, EMSO(S) = CRA(S).

Infinite Data Words

In the realm of reactive systems, it is appropriate to consider infinite data words, i.e., sequences from the set (Σ × D m ) ω . Note that all the notions that we introduced in Section 2 carry over to the new domain. In particular, a formula from rMSO(S) is interpreted over an infinite word w without modifying the definition. However, its fragment rEMSO(S) now appears limited. In terms of S 2 dyn , one cannot express "some process sends infinitely many messages during an execution", as can be shown using Hanf's Theorem. We therefore introduce a first-order quantifier ∃ ∞ . Formula ∃ ∞ x ϕ is satisfied by w = w 1 w 2 . . . ∈ (Σ × D m ) ω if there are infinitely many positions i ≥ 1 such that ϕ is satisfied when x is interpreted as i. We obtain the logics rFO ∞ (S) and rEMSO ∞ (S) as well as the language class rEMSO ∞ (S). Now, a translation from logic into automata requires an extension of class register automata. We define an ω-class register automaton (over S) to be a tuple A = (Q, R, ∆, (F ⊳ ) ⊳∈S , Φ) where Q, R, ∆, (F ⊳ ) ⊳∈S are as in class register automata, and Φ is henceforth a boolean formula over { 'q = ∞' | q ∈ Q} ∪ { 'q ≤ N ' | q ∈ Q and N ∈ N}. Infnite runs (q 1 , ρ 1 )(q 2 , ρ 2 ) . . . and satisfaction of the new global acceptance condition are defined as one would expect. In particular, atom q = ∞ is satisfied if |{i ≥ 1 | q i = q}| = ∞. The class of languages recognized by ω-class register automata is denoted by ω-CRA(S). Theorems 1 and 5 extend to infinite words. Theorem 6. For all S, we have rEMSO ∞ (S) ⊆ ω-CRA(S). The size of the automaton is elementary in the size of the formula and |S|. If m = 0, then rEMSO ∞ (S) = ω-CRA(S).

Proof. The crucial observation is that Proposition 1 still holds. We actually take the same automaton A B and run it on infinite words. The argument that makes the construction work relies on the fact that the past of any word position is finite. Moreover, it was shown in [START_REF] Bollig | Muller message-passing automata and logics[END_REF] that Theorem 2 has a counterpart for formulas with infinity quantifier. The proof is based on Vinner's extension of Ehrenfeucht-Fraïssé games [START_REF] Vinner | A generalization of Ehrenfeucht's game and some applications[END_REF]. Thus, for ϕ ∈ rFO ∞ (S), there are B ∈ N and a boolean formula β over {'S = ∞' , 'S ≤ N ' | S ∈ B-Spheres S and N ∈ N} such that L(ϕ) is the set of data words that satisfy β. With this, the constructions from Section 5 can be adapted to translate an rEMSO ∞ (S)-sentence into an ω-class register automaton over S.

⊓ ⊔

We remark that the proof of Theorem 6 is not effective. Unlike the proof of Theorem 1, it does not rely on [START_REF] Bollig | An optimal construction of Hanf sentences[END_REF][START_REF] Hanf | Model-theoretic methods in the study of elementary logic[END_REF]. We do not know if there is an effective alternative.

Conclusion

We studied the realizability problem for data-word languages. A particular case of this general framework constitutes a first step towards a logically motivated automata theory for dynamic message-passing systems. In light of this, it would be desirable to synthesize smaller and deadlock-free automata from logical or algebraic specifications. A good starting point for those studies may be temporal logic [START_REF] Demri | LTL with the freeze quantifier and register automata[END_REF][START_REF] Kara | Temporal logics on words with multiple data values[END_REF].

Our approach to modeling systems over infinite alphabets may also lead to meaningful model-checking questions. It would be interesting to extend [START_REF] Leucker | Dynamic message sequence charts[END_REF], whose logic corresponds to ours in the case of S 2 dyn , to general data words.

Next, we define a tuple t i = (p i , g i ) ai -→ (q i , f i ) for all i ∈ [n]. We let (p i ) ⊳ = q prev w ⊳ (i) (which might be undefined). Moreover, let g i and f i be uniquely given by conditions T7 and T8 where we replace q with q i . Before we check that conditions (1)-( 4) of a run are satisfied, we verify that t i is indeed a transition. In the following, we let E always refer to E = (S, α, col ) with S = (U, (⊳ E ) ⊳∈S , λ, ν, γ).

T1 Obviously, we have label

(q i ) = a i . T2 Let ⊳ ∈ S\dom(p i ) (which implies that prev w ⊳ (i) is undefined) and E ∈ q i . We have (S, α) ∼ = (B-Sph w (i c ), i) for some i c with dist w (i c , i) ≤ B. As prev w ⊳ (i) is undefined, we conclude that prev E ⊳ (α) is undefined, too. T3 Let ⊳ ∈ dom(p i ), E ∈ q i , j ∈ U , and i ⊳ = prev w ⊳ (i). Suppose j ⊳ E α. We need to show E[j] ∈ q i⊳ . As E ∈ q i , there is i c ∈ [n] such that dist w (i c , i) ≤ B, (S, α) ∼ = (B-Sph w (i c ), i), and col = Φ(i c ). Since dist E (γ, j) ≤ B implies dist w (i c , i ⊳ ) ≤ B, and since (S, j) ∼ = (B-Sph w (i c ), i ⊳ ) and col = Φ(i c ), we deduce E[j] = (S, j, col ) ∈ q i⊳ . Conversely, suppose E[j] ∈ q i⊳ . We shall show j ⊳ E α. There are positions i c , i ′ c ∈ [n] such that we have dist w (i c , i) ≤ B, dist w (i ′ c , i ⊳ ) ≤ B, (S, α) ∼ = (B-Sph w (i c ), i), (S, j) ∼ = (B-Sph w (i ′ c ), i ⊳ ), and col = Φ(i c ) = Φ(i ′ c ). Note that i c and i ′ c have a B-overlap. By Lemma 3, i c = i ′ c . As, then, (S, j) ∼ = (B-Sph w (i ′ c ), i ⊳ ), (S, α) ∼ = (B-Sph w (i ′ c ), i), and i ⊳ ⊳ w i, we can deduce j⊳ E α. T4 is shown similarly to T3. T5 Let ⊳ ∈ dom(p i ) and E ∈ q i such that prev E ⊳ (α) is undefined. There is i c ∈ [n] such that dist w (i c , i) ≤ B and (S, α) ∼ = (B-Sph w (i c ), i). Now, suppose dist E (γ, α) < B.
But then, we also have dist w (i c , i) < B and prev E ⊳ (α) is defined, a contradiction. We deduce that dist E (γ, α) = B. T6 is shown similarly to T5. T7 and T8 are immediate.

So far, we know that t i is a transition. Now, let us check the run conditions.

(1) and ( 2) are readily verified.

(3) Consider guard g i = g 1 ∧ g 2 ∧ g 3 . We first check subformula g 1 . For k 1 , k 2 ∈

[m], by the definition of ∼ qi and G(w), k 1 ∼ qi k 2 iff d k1 i = d k2 i . Now, consider g 2 and an atomic subformula k = (⊳, (E, k)) where k ∈ [m], E ∈ q, and ⊳ ∈ type -(α). Set i ⊳ = prev w ⊳ (i), which must indeed exist (by T2). As E ∈ q i , there is i c ∈ [n] such that dist w (i c , i) ≤ B, (S, α) ∼ = (B-Sph w (i c ), i), and col = Φ(i c ). This implies dist w (i c , i ⊳ ) ≤ B, and we obtain ρ i⊳ ((E, k)) = d k i so that g 2 also holds. Finally, we have to check g 3 . Consider its subformula

(⊳ 1 , (E[j], k)) = (⊳ 2 , (E[j], k)) where k ∈ [m], E ∈ q i , j ∈ U , and ⊳ 1 , ⊳ 2 ∈ type -(α). Let i 1 = prev w ⊳1 (i) and i 2 = prev w ⊳2 (i) (they both exist). Moreover, let j 1 = prev E ⊳1 (α) and j 2 = prev E ⊳2 (α). As E ∈ q i , there is i c ∈ [n] such that dist w (i c , i) ≤ B, (S, α) ∼ = (B-Sph w (i c ), i), and col = Φ(i c ). Due to the isomorphism, there is a unique i ′ ∈ [n] such that dist w (i c , i ′ ) ≤ B and (S, j) ∼ = (B-Sph w (i c ), i ′ ). Moreover, we have (S, j 1 ) ∼ = (B-Sph w (i c ), i 1 ) and (S, j 2 ) ∼ = (B-Sph w (i c ), i 2 ). In particular, dist w (i c , i 1 ) ≤ B and dist w (i c , i 2 ) ≤ B. We deduce ρ i1 ((E[j], k)) = ρ i2 ((E[j], k)) = d k i ′ .
Thus, g 3 is satisfied.

(4) Let (E, k) ∈ R. We distinguish three cases.

• If there is j ∈ U such that E[j] ∈ q i , and type -(j) = ∅, then we have

f i ((E, k)) = (⊳, (E, k)) with ⊳ = ⊳ E[j] . Since E[j] ∈ q i , there is a position i c ∈ [n] such that dist w (i c , i) ≤ B, (S, j) ∼ = (B-Sph w (i c ), i), and col = Φ(i c ). Moreover, there is a unique position i ′ ∈ [n] such that dist w (i c , i ′ ) ≤ B and (S, α) ∼ = (B-Sph w (i c ), i ′ ). As j ⊳ = prev E ⊳ (j) is de- fined, i ⊳ = prev w ⊳ (i)
is defined, too. Note that (S, j ⊳ ) ∼ = (B-Sph w (i c ), i ⊳ ) and dist w (i c , i ⊳ ) ≤ B. We obtain ρ i ((E, k)) = d k i ′ = ρ i⊳ ((E, k)). • If there is j ∈ U such that E[j] ∈ q i and type -(j) = ∅, then f i ((E, k)) = (k, dist E (α, j)). We show ρ i ((E, k)) ∈ D k B ′ (i) where B ′ = dist E (α, j). As E[j] ∈ q i , there is i c ∈ [n] such that dist w (i c , i) ≤ B, (S, j) ∼ = (B-Sph w (i c ), i), and col = Φ(i c ). Thus, there is a unique position i ′ ∈

[n] such that dist w (i c , i ′ ) ≤ B and (S, α) ∼ = (B-Sph w (i c ), i ′ ). We have dist w (i ′ , i) ≤ dist E (α, j), and we can deduce ρ i ((E, k)) = d k i ′ ∈ D k B ′ (i). • If there is no j ∈ U such that E[j] ∈ q i , then f i ((E, k)) is undefined.

Therefore, ρ i ((E, k)) should be undefined, too. Suppose, towards a contradiction, that ρ i ((E, k)) ∈ D. Then, there are i c , i ′ ∈ [n] such that we have dist w (i c , i) ≤ B, dist w (i c , i ′ ) ≤ B, (S, α) ∼ = (B-Sph w (i c ), i ′ ), and col = Φ(i c ), But then, there is a unique j ∈ U such that (S, j) ∼ = (B-Sph w (i c ), i) so that E[j] ∈ q i , which is a contradiction.

We conclude that ξ is a run. Let us quickly verify that it is accepting. Trivially, Φ = true is satisfied. Now suppose ⊳ ∈ S and consider any position i ∈ [n] such that next w ⊳ (i) is undefined. We have to show that q i is contained in F ⊳ , i.e., next E ⊳ (α) is undefined for all E ∈ q i . So suppose E ∈ q i . There is i c ∈ [n] such that dist w (i c , i) ≤ B and (S, α) ∼ = (B-Sph w (i c ), i). As next w ⊳ (i) is undefined, next E ⊳ (α) must be undefined, too.

Every run keeps track of spheres. In this part of the proof, we show that we can infer, from every accepting run of A B on data word w, the spheres that occur in G(w).

Let w = (a 1 , d 1 ) . . . (a n , d n ) ∈ (Σ × D m ) * be a data word and G(w) = ([n], (⊳ w ) ⊳∈S , λ, ν) its graph. Suppose ξ = (q 1 , ρ 1 ) . . . (q n , ρ n ) is an accepting run of A B on w with corresponding transitions t 1 , . . . , t n where t i = (p i , g i ) ai -→ (q i , f i ).

The following claim states that an arbitrarily long path of an extended sphere E that starts in its active node is faithfully simulated by w. It will turn out to be crucial that, hereby, the data values in registers of the form (E[j], k) are invariant during that simulation. Lemma 4. Let i ∈ [n] be some position, e ≥ 0, and E = (S, α, col ) ∈ q i with S = (U, (⊳ E ) ⊳∈S , λ, ν, γ). Suppose there are j 0 , . . . , j e ∈ U and ⊳ 1 . . . , ⊳ e ∈ S such that α = j 0 and, for all z ∈ {0, . . . , e -1}, j z ⊳ E z+1 j z+1 or j z+1 ⊳ E z+1 j z . Then, there is a unique sequence i = i 0 , . . . , i e ∈ [n] such that the following hold:

for each z ∈ {0, . . . , e -1}, j z ⊳ E z+1 j z+1 implies i z ⊳ w z+1 i z+1 and j z+1 ⊳ E z+1 j z implies i z+1 ⊳ w z+1 i z for each z ∈ {0, . . . , e}, we have E[j z ] ∈ q iz , λ(j z ) = a iz , and ν(j z ) = ν(i z ) -for each z ∈ {1, . i is due to the update f i ((E, k)) = (k, 0) (T8). So let e ≥ 0, j 0 , . . . , j e , j e+1 ∈ U , and ⊳ 1 , . . . , ⊳ e , ⊳ e+1 ∈ S such that α = j 0 and, for every z ∈ {0, . . . , e}, j z ⊳ E z+1 j z+1 or j z+1 ⊳ E z+1 j z . Let i 0 , . . . , i e ∈ [n] be the unique corresponding sequence with the required properties. We consider two cases:

-Assume j e ⊳ E e+1 j e+1 . Then, q ie ∈ F ⊳e+1 so that next w ⊳e+1 (i e ) is defined. We set i e+1 = next w ⊳e+1 (i e ). Due to T4, we have E[j e+1 ] ∈ q ie+1 . By T1 and guard g 1 of T7, we obtain λ(j e+1 ) = a ie+1 , and ν(j e+1 ) = ν(i e+1 ). Let k ∈ [m] and j ∈ U . Due to condition T8, E[j e+1 ] ∈ q ie+1 implies that f ie+1 ((E[j], k)) = (⊳, (E[j], k)) for some ⊳ ∈ S. Due to guard g 3 of condition T7, we have ρ prev -Assume j e+1 ⊳ E e+1 j e . By T2, ⊳ e+1 ∈ dom(p i ). Thus, there is (a unique) i e+1 such that i e+1 ⊳ w e+1 i e . By T3, we have E[j e+1 ] ∈ q ie+1 . Moreover, λ(j e+1 ) = a ie+1 , and ν(j e+1 ) = ν(i e+1 ). Let k ∈ [m] and j ∈ U . By condition T8, we have E[j e ] ∈ q ie implies f ie ((E[j], k)) = (⊳, (E[j], k)) for some ⊳ ∈ S. Due to guard g 3 of condition T7, we have ρ prev w ⊳ (ie) ((E[j], k)) = ρ ie+1 ((E[j], k)). We deduce ρ ie ((E[j], k)) = ρ ie+1 ((E[j], k)).

⊓ ⊔

By means of Lemma 4, we will show that spheres that are contained in states indeed occur in a data word. It will be used in combination with the following simple monotonicity fact, which follows easily from the definitions.

3

 3

Fig. 1 . 1 +1Fig. 2 . 2 dyn 1 .

 11221 Fig. 1. Data word over S 1 +1,∼

Example 2 .

 2 depicts a data word over Σ = {r, a} (request/acknowledgment) and D = N as well as the relations ≺ +1 (straight arrows) and ≺ ∼ (curved arrows) imposed by S 1 +1,∼ . ♦ We develop a framework for message-passing systems with dynamic process creation. Each process has a unique identifier from D = N. Process c ∈ N can execute an action f(c, d), which forks a new process with identity d. This action is eventually followed by n(d, c), indicating that d is new (created by c) and begins its execution. Processes can exchange messages. When c executes !(c, d), it sends a message through an unbounded first-in-first-out (FIFO) channel c → d. Process d may execute ?(

  . . , e}, k ∈ [m], and j ∈ U , we haveρ i0 ((E[j], k)) = ρ iz ((E[j], k)) -for each z ∈ {0, . . . , e} and k ∈ [m], we have that ρ iz ((E[j z ], k)) = d k izProof. We proceed by induction on e. Suppose e = 0. By T1 and guard g 1 of T7, λ(α) = a i and ν(α) = ν(i). Let k ∈ [m] and suppose type -(α) = ∅. Then, f i ((E, k)) = (⊳, (E, k)) where we let ⊳ = ⊳ E . Thus, ρ i ((E, k)) = ρ prev w ⊳ (i) ((E, k)). By guard g 2 of T7, we have ρ i ((E, k)) = d k i . If type -(α) = ∅, then ρ i ((E, k)) = d k

  w ⊳ (ie+1) ((E[j], k)) = ρ ie ((E[j], k)). We can now deduce ρ ie ((E[j], k)) = ρ ie+1 ((E[j], k)). Finally, let k ∈ [m]. We have f ie+1 ((E[j e+1 ], k)) = (⊳, (E[j e+1 ], k)) where we let ⊳ = ⊳ E[je+1] . Thus, ρ ie+1 ((E[j e+1 ], k)) = ρ prev w ⊳ (ie+1) ((E[j e+1 ], k)). By guard g 2 of T7, we obtain ρ ie+1 ((E[j e+1 ], k)) = d k ie+1 .

  Finally, let k ∈ [m]. We distinguish two cases. Suppose type -(j e+1 ) = ∅. Then, f ie+1 ((E[j e+1 ], k)) = (⊳, (E[j e+1 ], k)) where we let ⊳ = ⊳ E[je+1] . Thus, ρ ie+1 ((E[j e+1 ], k)) = ρ prev w ⊳ (ie+1) ((E[j e+1 ], k)). By guard g 2 of T7, we have ρ ie+1 ((E[j e+1 ], k)) = d k ie+1 . If type -(j e+1 ) = ∅, then ρ ie+1 ((E[j e+1 ], k)) = d k ie+1 is due to the update f ie+1 ((E[j e+1 ], k)) = (k, 0) (T8). This concludes the proof of Lemma 4.

The proof of Lemma 1 can be adapted to show rFO(S 2 dyn ) ⊆ CRA -(S 2 dyn ). It reveals that non-guessing class register automata can in general not detect cycles. However, this is needed to capture rFO logic[START_REF] Hanf | Model-theoretic methods in the study of elementary logic[END_REF]. In Section 5, we show that full class register automata capture rFO and, as they are closed under projection, also rEMSO logic. Closure under projection is meant in the following sense. Let Γ be a non-empty finite alphabet. Given S = (σ, I), we define another signature S Γ for data words over (Σ ×Γ )×D m . Its set of relation symbols is {⊳ Γ | ⊳ ∈ S}. For w ∈ ((Σ × Γ ) × D m ) * , we set i ⊳ w Γ j iff i ⊳ proj Σ (w) j. Hereby, the projection

Note that satisfiability of rEMSO(S 1 +1,∼ ) is undecidable, whereas emptiness of class memory automata over S 1 +1,∼ is decidable[START_REF] Bojańczyk | Twovariable logic on words with data[END_REF]. This already implies that there is no effective translation of automata into formulas.

A. Correctness of sphere automaton

We will show that the class register automaton A B = (Q, R, ∆, (F ⊳ ) ⊳∈S , Φ) over S and the mapping π : Q → B-Spheres S are correct in the sense of Proposition 1: L(A B ) = (Σ × D m ) * and, for every data word w = w 1 . . . w n (where w i = (a i , d i )), every accepting run (q 1 , ρ 1 ) . . . (q n , ρ n ) of A B on w, and every position i ∈ [n], π(q i ) ∼ = B-Sph w (i).

Every data word is accepted. Let us first show L(A B ) = (Σ × D m ) * , i.e., that every data word is accepted by A B . Let w = (a 1 , d 1 ) . . . (a n , d n ) ∈ (Σ × D m ) * be any data word and let G(w) = ([n], (⊳ w ) ⊳∈S , λ, ν) be its associated graph. We have to show w ∈ L(A B ). A key issue is the assignment of colors to word positions in w such that overlapping spheres can be verified simultaneously.

Lemma 3. There is a mapping Φ : [n] → {1, . . . , (2|S| + 1) • maxSize 2 + 1} such that Φ(i) = Φ(i ′ ) whenever i and i ′ are distinct and have a B-overlap.

Proof. We obtain Φ as a coloring of the undirected graph ([n], Arcs) where two nodes are connected iff they are distinct and have a B-overlap. The graph has degree at most (2|S| + 1) • maxSize 2 so that it can be ((2|S| + 1) • maxSize 2 + 1)colored by some mapping Φ, i.e., Φ(i) = Φ(i ′ ) for every edge {i, i ′ }.

⊓ ⊔

We now define a sequence ξ = (q 1 , ρ 1 ) . . . (q n , ρ n ) of configurations of A B and show that ξ is an accepting run of A B on w. Let i ∈ [n]. We set

Suppose E = (S, α, col ), S = (U, (⊳ E ) ⊳∈S , λ, ν, γ), and k ∈ [m]. We define ρ i ((E, k)) as follows. If there are positions i c , i ′ ∈ [n] such that dist w (i c , i) ≤ B, dist w (i c , i ′ ) ≤ B, (S, α) ∼ = (B-Sph w (i c ), i ′ ), and col = Φ(i c ), then we set ρ i ((E, k)) = d k (i ′ ). Otherwise, we let ρ i ((E, k)) be undefined. Note that ρ i ((E, k)) is well defined, as there is at most one pair i c , i ′ satisfying the above properties.

We check that q i is a state. Let E = (S, α, col ) ∈ q i and E

(iii) Suppose S ∼ = S ′ (S = S ′ , for simplicity) and col = col ′ . According to the definition of q i , there are positions

As i 1 and i 2 have a B-overlap, we also have, by Lemma 3, i 1 = i 2 . We deduce α = α ′ .

Next, we show that a sphere correctly simulates w and vice versa, which concludes the correctness proof for A B .

For

be the unique extended sphere from q i such that γ i = α i . In particular, S i = π(q i ).

Proof. For e ∈ {0, . . . , B}, let e-S i denote the e-sphere of (U i , (⊳ Ei ) ⊳∈S , λ i , ν i ) around γ i , which is defined in the canonical manner. We show, by induction, the following more general statement:

For every e ∈ {0, . . . , B}, there is an isomorphism h : e-Sph w (i) → e-S i such that, for each i

We easily verify that (*) holds for e = 0. Now suppose there is an isomorphism h : e-Sph w (i) → e-S i with e < B. We extend the domain of h to elements i ′ with dist w (i, i ′ ) = e + 1 as follows. Let i 1 , i 2 ∈ [n] such that dist w (i, i 1 ) = e and dist w (i, i 2 ) = e + 1. Let ⊳ ∈ S. We distinguish several cases:

, we obtain, by T1, T4, and T7,

, and

Similarly, due to dist w (i, i 1 ) < B and T5, there is j 2 ∈ U i such that j 2 ⊳ Ei h(i 1 ). Using T1, T3, and T7, we obtain

, and

We set h(i 2 ) = j 2 and h(i ′ ) = h(i ′ ) for all positions i ′ in e-Sph w (i). In doing so, we extend the domain of h to elements with distance e + 1 from i. Note that this extension h : (e + 1)-Sph w (i) → (e + 1)-S i is well defined, i.e., j 2 is uniquely determined by i 2 and does not depend on the choice of i 1 or ⊳: if, for i 2 , we obtained distinct elements j 2 and j ′ 2 , then E i [j 2 ] ∈ q i2 and E i [j ′ 2 ] ∈ q i2 , which contradicts the definition of a state.

We show that we obtain a homomorphism h : (e + 1)-Sph w (i)

Next, we show that h is surjective. Let j 1 , j 2 ∈ U i and ⊳ ∈ S such that dist Ei (γ i , j 1 ) = e, dist Ei (γ i , j 1 ) = e + 1, and j 1 ⊳ Ei j 2 (the case j 2 ⊳ Ei j 1 is similar). We have

We show that, then, h(i 1 ) = h(i 2 ). Let j 1 = h(i 1 ) and j 2 = h(i 2 ). Assume, towards a contradiction, that j 1 = j 2 . Furthermore, assume i 1 < i 2 (the other case is symmetric). In E i , there are paths from j 1 to α and from α to j 1 that are simulated, in w, by paths from i 2 to i and from i to i 1 , respectively. By Lemma 4 and monotonicity of a signature, we can simulate these paths of E i arbitrarily often in w. This yields an infinite

But this is a contradiction, as every word position has only finitely many smaller positions. The procedure is illustrated in Figure 7. Finally, we show that h : (e + 1)-Sph w (i) → (e + 1)-S i is actually an isomorphism. Let j 1 , j 2 ∈ U i and ⊳ ∈ S such that dist Ei (γ, j 1 ) = dist Ei (γ, j 2 ) = e + 1 and j 1 ⊳ Ei j 2 . We show that this implies h-1 (j 1 ) ⊳ w h-1 (j 2 ). Set i 1 = h-1 (j 1 ) and i 2 = h-1 (i 2 ). Assume, towards a contradiction, that i 1 ⊳ w i 2 . We have

, and E i [j 2 ] ∈ q i2 . Due to the definition of the set of states of A B , this implies i 1 = i 2 . Suppose next w ⊳ (i 1 ) < i 2 (the other case is similar). Again, by Lemma 4 and monotonicity of ⊳ w , we can build an infinite descending chain . . . < i 2 1 < i 1 1 < i 1 < i 2 such that E[j 1 ] ∈ q i l 1 for all l ≥ 1 (cf. Figure 8). This is a contradiction. ⊓ ⊔

B. Comparison with Class Automata

We compare class register automata to class automata [START_REF] Bojańczyk | An extension of data automata that captures XPath[END_REF], which have been shown to capture all (extended) XPath queries. Class automata are a smooth (undecidable) extension of data automata and, therefore, of class memory automata. A class automaton is suitable to work over words (even trees) with multiple data values. It consists in a pair (A, B) where A is a non-deterministic letterto-letter transducer from the label alphabet Σ to some working alphabet Γ , and B is a finite automaton over Γ × {0, 1} m . A data word (a 1 , d 1 ) . . .

28

We will show that, for m = 2, class automata capture neither EMSO logic nor non-guessing class register automata. Note that class automata do not depend on a signature. To allow for a fair comparison, we choose the simple signature

Theorem 7. There is L ∈ rEMSO(S 2 +1,∼ ) ∩ CRA -(S 2 +1,∼ ) such that L cannot be recognized by any class automaton.

Proof. Let Σ = {a} and D = N. Using [START_REF] Bojańczyk | An extension of data automata that captures XPath[END_REF], one can show that there is no class automaton that recognizes L = [{(a, 1, 1) . . . (a, n, n)(a, 1, 1) . . . (a, n, n) | n ≥ 1}] S 2 +1,∼ . It is, however, easy to define an rEMSO(S 2 +1,∼ )-sentence for L. We restrict to the construction of a non-guessing class register automaton, which is very similar to the automaton from Example 5. Here, we will need four registers, r k 1 and r k 2 for k = 1, 2. The crucial difference is in the second phase, where we encounter a data value for the second time. We henceforth require that, at position n + i, the k-th data value d k n+i is contained in register r k 1 at prev ≺ k ∼ (n + i) = i. The value d k n+i is henceforth stored in r k 1 and has to coincide, at position n + i + 1, with the contents of r k 2 at position prev ≺ k ∼ (n + i + 1) = i + 1. ⊓ ⊔