Abstract 1 Introduction 2 Constraint LTL and automata over data words 3 Register-bounded synthesis problem from CLTL 4 Data domains with 𝝎-regular satisfiability 5 𝝎-Regularly approximable data domains 6 CLTL register-bounded synthesis with partial observation 7 Conclusion References

Register-Bounded Synthesis from Constraint LTL

Nino Dauvier Aix Marseille Univ, CNRS, LIS, Marseille, France Emmanuel Filiot ORCID Université libre de Bruxelles, Belgium Pierre-Alain Reynier Aix Marseille Univ, CNRS, LIS, Marseille, France
Abstract

We consider synthesis problems from logical specifications over infinite data domains, expressed in the logic constraint LTL (CLTL), which extends LTL with predicates over an infinite set of data values. We consider register-bounded synthesis, where the goal is to automatically generate, if it exists, a transducer with r registers that realizes a given CLTL formula, where r is also given as input. We prove that CLTL register-bounded synthesis is 2ExpTime-c for various data domains such as any infinite set with equality, (,<), and (,<). For the latter domain, this contrasts with known undecidability results of (unbounded) register CLTL synthesis, by Bhaskar and Praveen. Lastly, we consider synthesis in a partial observation setting by extending CLTL with invisible variables.

Keywords and phrases:
Synthesis, Data words, Constraint linear time logic, Register transducer
Funding:
Emmanuel Filiot: E. Filiot is research director at F.R.S.-FNRS. This work was partially funded by the FNRS/FWO Weave project T011724F.
Pierre-Alain Reynier: This work was partially funded by ANR project QuaSy (ANR-23-CE48-0008).
Copyright and License:
[Uncaptioned image] © Nino Dauvier, Emmanuel Filiot, and Pierre-Alain Reynier; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Automata over infinite objects
; Theory of computation Modal and temporal logics
Editors:
Stefano Guerrini and Barbara König

1 Introduction

Boolean reactive synthesis.

Program synthesis – the automatic generation of programs from high-level specifications – has emerged as a promising avenue to improve software reliability by producing programs that are correct by construction.

A particularly rich and well-studied area within the field of program synthesis is reactive synthesis [3], which focuses on the design of algorithmic methods for the automatic construction of reactive systems, i.e. systems that maintain ongoing interactions with their environments. Over the past fifteen years, there has been remarkable progress in the synthesis of reactive systems modeled as finite state machines (Mealy machines), from specifications expressed in linear-time temporal logic (LTL). These developments have led to the creation of powerful tools and solvers, whose performance is continuously evaluated through the annual Reactive Synthesis Competition [15].

Beyond the Booleans.

Classical reactive synthesis methods focus on complex control aspects and typically assume that reactive systems process a finite set of Boolean signals, while ignoring data. More recent research has considered extensions of this purely Boolean setting to data-aware reactive systems. In particular, there is a line of work on the synthesis of infinite-state systems modeled as transducers with registers. In this setting, programs targeted by synthesis algorithms are modeled as a Mealy machine extended with registers that allow storing and comparing incoming data to produce data. In turn, the synthesis problem is parameterized by a data domain, i.e. an infinite set of data values and a finite set of predicates over those data values.

A natural candidate for expressing temporal specifications over data domains is constraint LTL (CLTL), which extends LTL with constraints over data values [9]. CLTL formulas are built over a finite set of variables X, which is extended by considering for any variable xX, k+1 copies x(0),,x(k) of x. The intended meaning of x(i) is to denote the content of x in i steps. The syntax of CLTL formulas is defined as for LTL, except that atomic formulas are predicates over the (copied) variables. As an example, the CLTL formula G(x(0)=y(2)) is satisfied if, at any instant t, x holds the same data value as y at instant t+2. Over a set of data values 𝔻, models of CLTL formulas are sequences of valuations (X𝔻)ω. It is worth noting that the satisfiability of a CLTL formula depends on the data domain. For instance, G(x(0)>x(1)) is satisfiable in but not in . The formula G(x0<x(1)y(0)=y(1)) is satisfiable in but not in .

In an attempt to classify data domains, the completion property has been considered in the literature [9]. For a data domain 𝒟, it asks that for any satisfiable constraint C (defined as a conjunction of predicates over 𝒟), any partial valuation satisfying a sub-constraint of C can be extended to a (total) valuation satisfying C. For example, the constraint C0=x<y<z is satisfiable in , and any valuation of x,z satisfying x<z can be extended to a valuation of x,y,z satisfying C0, e.g. by taking y=(x+z)/2. While any domain (𝔻,=) and the domain (,<) satisfy the completion property, important data domains such as (,<) and (,<) do not. As an example, the partial valuation x=0,z=1, which satisfies x<z, cannot be extended to a valuation that satisfies C0.

While the satisfiability problem for CLTL (over various data domains) has been quite studied in the literature [5, 9] (see also the survey [7] and the references therein), not much is known about the synthesis problem. In this context, the set of variables is further divided into variables 𝕀 controlled by the environment (input variables) and variables 𝕆 controlled by the system (output variables). The synthesis problem from specifications expressed in CLTL has been studied in [2]. It consists in deciding whether there exists a strategy that, at each step, reads data values of 𝕀, and outputs data values for 𝕆, resulting in an infinite data word over 𝕀𝕆 that satisfies the CLTL formula. It is shown that over data domains with the completion property, CLTL synthesis is decidable. However, synthesis is shown to be undecidable for (,<). To recover decidability, the authors of [2] consider some restriction, called single-sidedness, in which the power of the environment is restricted. In this paper, we take an orthogonal route to recover decidability.

Register-bounded reactive synthesis.

While [2] considers arbitrary strategies, we focus on strategies represented by register transducers. A register transducer successively receives as input a valuation (𝕀𝒟), compares it with the data values stored in its registers, assigns some of the input values to its registers (or none), and finally produces some output valuation (𝕆𝒟) by assigning to each variable in 𝕆 the content of some register. These strategies are more amenable to implementations, as they are close to real programs. We consider the register-bounded synthesis problem from 𝖢𝖫𝖳𝖫, defined as the problem of deciding, given as input a 𝖢𝖫𝖳𝖫 formula Φ over 𝒟 and some integer r, whether there exists a transducer with r registers which realizes Φ (and in that case output it). As we show, bounding the number of registers (but not the number of states) allows to recover decidability for CLTL synthesis over data domains such as (,<). Register-bounded synthesis is also desirable for synthesizing systems with a minimal number of registers. As registers represent some auxiliary memory, this is particularly relevant in contexts where resources are limited.

Contributions.

Our objective is to develop general techniques that allow us to show decidability results for families of data domains. To that end, we develop reductions from the register-bounded synthesis problem to a realizability problem over a finite alphabet. The key in this approach is the analysis of the set 𝒮𝒟 of infinite constraint sequences over 𝒟 that are satisfiable. Our contributions are as follows.

  1. 1.

    We first show that if 𝒮𝒟 is an ω-regular language, then the register-bounded synthesis problem from 𝖢𝖫𝖳𝖫 is decidable (Theorem 10). In particular, if a data domain 𝒟 meets the completion property, then 𝒮𝒟 is ω-regular. This allows us to prove that the register-bounded synthesis problem from CLTL is 2ExpTime-c over any domain (𝔻,=) for an infinite set 𝔻, and over the domain (,<) (Corollary 19).

  2. 2.

    Yet, 𝒮(,<) is not ω-regular (see [10]), which reflects the undecidability result mentioned earlier. As a remedy, we show that if 𝒮𝒟 can be over-approximated by an ω-regular language which coincides with 𝒮𝒟 on lasso words, then the register-bounded synthesis problem from 𝖢𝖫𝖳𝖫 is decidable (Theorem 22). We show that this is the case for numerous data domains including (,<), (,<), (Σ,pref) for Σ any finite alphabet and pref the prefix relation, as well as (k,<k) for any k and <k the partial order on tuples (pairwise comparison), using a reduction to [16]. This implies that the register-bounded synthesis problem from CLTL is 2ExpTime-c for all these data domains (Corollary 28).

  3. 3.

    Lastly, we consider a partial-observation generalization in which the CLTL formula has private and public input variables, but the system only has access to public ones. We show that our approach can be leveraged to this setting, yielding that the problem is 2ExpTime-c for any domain (𝔻,=), and over the domain (,<) (Corollary 32).

Related work.

Synthesis problems of register transducers over data domains have already been considered in the literature, but mostly when the specification is already given as an automaton, and in particular a register automaton, see [18, 11, 17, 12]. Beyond specifications given by deterministic register automata, synthesis quickly turns into undecidability. That is the case, for instance, for specifications given by non-deterministic or universal register automata [17, 11], which are strictly more expressive than their deterministic restrictions. When considering the data domains (,<) and (,<), synthesis is already undecidable for specifications given by deterministic register automata [10].

Register-bounded synthesis has been considered for specifications given as register automata [17, 11, 16]. In particular, for specifications given as universal register automata over (,=) and (,<), register-bounded synthesis has been shown to be decidable [17, 12, 16]. A legitimate question is whether register-bounded synthesis from CLTL could be reduced to register-bounded synthesis from register automata and directly apply the results of [17, 12, 16]. We do not know of any reduction that would preserve the number of registers needed to realize the specification. Indeed, even though CLTL formulas can be converted into deterministic register automata, this conversion is however modulo some model encoding: CLTL formulas are interpreted over (XD)ω while register automata are executed on words in Dω, and so tuples need to be encoded as chunks of d=|X| consecutive data. Having access to d data at once allows for register succinctness. This is because register transducers in [17, 12, 16] have access to only one data at a time, while the register transducers of this paper receive as input a tuple of data, to match the semantics of CLTL formulas. For example, a CLTL specification might require to output an input value only if it appears twice in a tuple. To check the latter property, a register transducer in [17, 12, 16] would need d1 additional registers.

On top of the related papers already cited before, we would like to mention the work on constraint (infinite) tree automata over (,<), whose emptiness problem is proved to be decidable in [8]. Whereas the connection between tree automata and synthesis is well-known in the boolean setting (see for instance [20]), it is not clear how register-bounded synthesis from constraint LTL could be reduced to the emptiness problem of the constraint tree automata of [8].

2 Constraint LTL and automata over data words

Finite and infinite words.

Given an alphabet Σ finite or not, let Σ (resp. Σω) be the set of finite (resp. infinite) sequences, called words, over Σ. In this paper, we denote finite words as u¯=u1u2un where uiΣ for all i{1,,n}. We let |u¯|=n denote its length and for 1ij|u¯|, we let u¯[i,j]=uiui+1uj. Similarly, if u¯=u1u2 is an infinite word, we let u¯[i,+]=uiui+1 be the infinite suffix starting at position i.

Data.

We define a data domain 𝒟 as a tuple (𝔻,P,d0), where 𝔻 is an infinite set whose elements are called data, P is a finite set of predicates (relations over 𝔻 of any arity) and d0𝔻 is a constant. It is also required that the set of predicates always contains the equality predicate, in order to be able to distinguish data values. In this paper, we will mostly use the data domains (𝔻,=,d0) (where 𝔻 is arbitrary), (,<,0) and (,<,0). Note that (,<,0) does not contain equality, but x=y can be expressed as ¬(x<y)¬(y<x). In general, data domains are defined as interpretations of a set of predicate symbols; however, to simplify the presentation, in this paper we confuse symbols with their (intuitive) semantics. Lastly, we say that a data domain is decidable if its existential first-order theory is decidable.

Constraints.

Let V be a finite set of variables, and let 𝒟=(𝔻,P,d0) be a data domain. A valuation from V to 𝔻 is a (total) mapping ν from V to 𝔻. We extend it to V{d0} by letting ν(d0)=d0. We denote by ValV,𝔻 the set of valuations from V to 𝔻. Given two valuations ν1,ν2 defined over two distinct subsets A1,A2 of V, we let ν1ν2 be the valuation defined on A1A2 by ν1ν2(x)=νi(x) if xAi.

A literal over V is a term of the form p(x1,,xk) or its negation ¬p(x1,,xk), with pP of arity k and x1,,xkV{d0}. It is satisfied by a valuation wValV,𝔻, written w, if (w(x1),,w(xk))p if =p(x1,,xk) (and (w(x1),,w(xk))p for a negative literal). A constraint C over V is a conjunction of literals over V. We often view C as the set of its conjuncts. We denote by 𝒞V the set111Note that constraints may also use the constant symbol d0. This is left implicit in the notation 𝒞V, for the sake of readability. of constraints over V. We say that a constraint C𝒞V is satisfiable if there exists a valuation wValV,𝔻 such that w for all literals C. We write wC when this holds.

A constraint C is consistent if it does not contain a literal and its negation. It is maximally consistent if it is consistent and for all predicates p of arity k and for all (x1,,xk)(V{d0})k, either p(x1,,xk) or its negation occurs in C. For example over (,<,0), the constraint C0=(x<y)(0<x)(0<y)¬(y<x)¬(x<0)¬(y<0) is not maximally consistent, but C1=C0¬(x<x)¬(y<y)¬(0<0) is. We denote by 𝒞V the set of maximally consistent constraints over V.

Completion property.

For VV, we define the restriction C|V of a constraint C, as the subset of literals of C that use only variables in V. A satisfiable constraint C is completable if for any VV, for all wValV,𝔻 such that wC|V, there exists wValV,𝔻 such that w(x)=w(x) for all xV and wC.

A data domain has completion property (we also say it is completable) if all satisfiable and maximally consistent constraints are completable. For example, (,<,0) does not meet the completion property: if we consider the constraint C1 defined before, it is satisfiable and maximally consistent. However, the valuation w such that w(y)=1 satisfies C1|{y}, but we cannot find a value d to map to x such that (0<d)(d<w(y)). However, a slight generalization of Corollary 5.4 in [9] to handle constants yields:

Lemma 1 ([9]).

Data domains (𝔻,=,d0) and (,<,0) are completable.

Data valuation words.

Let V be a finite set of variables and 𝒟=(𝔻,P,d0) be a data domain. A data valuation word is a sequence w¯=w1w2(ValV,𝔻)ω where each wi is a valuation. Data valuation words are used to model the traces of the systems that we want to synthesize. As CLTL allows us to compare valuations that occur at different time points, we also introduce another notion of valuation word. Let k, and define the set of k-future variables as V(k)={x(i)xV,0ik}. A k-extended valuation word is a sequence ν¯=ν1ν2(ValV(k),𝔻)ω. Intuitively, νi(x(j)) is intended to be the value of x at time i+j, and therefore it is required that νi(x(j))=νi+j(x). This condition is enforced by the notion of compatible extended valuation words, defined as the sequences ν¯(ValV(k),𝔻)ω such that

i>0,0<jk,xV,νi(x(j))=νi+j(x)

We define a bijection between valuation words and their compatible k-extended form, via the function extendk:(ValV,𝔻)ω(ValV(k),𝔻)ω defined by extendk(w¯)=ν¯ where for all j1 and all x(i)V(k), νj(x(i))=wj+i(x). One can show that extendk is a bijection between valuation words and compatible k-extended valuation words, and we denote by compress its inverse. Last, we lift from valuations to valuation words in the obvious way.

Example 2.

Let V={x,y} and 𝒟=(,<,0). We consider w¯(ValV,𝔻)ω given by wi(x)=i and wi(y)=i+1 for all i1. Then ν¯=extend1(w¯) is given by νi(x(0))=i,νi(x(1))=νi(y(0))=i+1,νi(y(1))=i+2 for all i1.

Constraint words.

A constraint word is a sequence c¯=C1C2(𝒞V)ω of constraints over V. A valuation word w¯(ValV,𝔻)ω satisfies c¯, written w¯c¯, if for all i1,wiCi. We let c¯={w¯(ValV,𝔻)ωw¯c¯}. Given c¯(𝒞V)ω, we write c¯c¯ whenever for all i1, CiCi (seen as sets of literals). In particular, c¯c¯ implies c¯c¯.

For clarity purposes, we write 𝒞V(k) for the set of constraints over V(k) instead of 𝒞V(k), the same goes for 𝒞V(k). Constraint words in 𝒞V(k) are said to be of rank k. The satisfiability notion is extended to constraint words c¯(𝒞V(k))ω of rank k via the function extendk. Formally, w¯(ValV,𝔻)ω satisfies c¯ if extendk(w¯) satisfies c¯, and c¯={w¯(ValV,𝔻)ωw¯c¯}.

CLTL.

Fix a data domain 𝒟=(𝔻,P,d0) and a finite set of variables V. 𝖢𝖫𝖳𝖫(𝒟)-formulas over V are defined inductively as follows. The atomic formulas of rank k0 are terms of the form p(x1,,x), where pP is a predicate of arity and (x1,,x)(V(k){d0}). We denote this set by Atomk. 𝖢𝖫𝖳𝖫-formulas of rank k are inductively defined as:

Φ::=Φ1UΦ2Φ1Φ2¬ΦXΦaAtomk.

A 𝖢𝖫𝖳𝖫-formula is a 𝖢𝖫𝖳𝖫-formula of rank k for some k. As usual, the Boolean connectives and can be defined from and ¬, and we let =a¬a (for some atomic formula a) and =¬. Moreover, as for LTL formulas, we define the temporal operators globally (G) and eventually (F) by FΦ=UΦ and GΦ=¬F¬Φ. Finally, we may write x instead of x(0), and just 𝖢𝖫𝖳𝖫 instead of 𝖢𝖫𝖳𝖫 when 𝒟 is irrelevant.

The size |Φ| of a formula Φ is defined as the number of symbols in Φ, with the exception of variables x(i) that are defined to be of size i.

Semantics.

We define the semantics of 𝖢𝖫𝖳𝖫 by induction on formulas. Let Φ be a 𝖢𝖫𝖳𝖫 formula over V of rank k, and ν¯(ValV(k),𝔻)ω. We say that ν¯ satisfies Φ, written ν¯Φ, if the following holds (inductively):

  • if Φ=p(x) then ν1p(x)

  • if Φ=¬Ψ then ν¯⊧̸Ψ

  • if Φ=Ψ1Ψ2 then ν¯⊧̸Ψ1 or ν¯Ψ2

  • if Φ=XΨ then ν[2,+]Ψ

  • if Φ=Ψ1UΨ2 then n1 such that 1i<n, ν¯[i,+]Ψ1 and ν¯[n,+]Ψ2

Given a valuation word w¯(ValV,𝔻)ω, we say that w¯ satisfies Φ, also written w¯Φ, if extendk(w¯)Φ holds. We let L(Φ)={w¯(ValV,𝔻)ωw¯Φ}.

Example 3 (Example 2 continued).

Consider Φ=G(xyyy(1))𝖢𝖫𝖳𝖫. One can easily check that w¯Φ holds. The same holds for G(y<x(2)¬(y<x(1))).

Definition 4.

A constraint automaton (CA) 𝒜 over 𝒟 is a tuple (Q,Δ,I,χ,k) where Q is a finite set of states, k is the maximal rank for the constraints, ΔQ×𝒞V(k)×Q is a transition relation, IQ is a set of initial states and χValQ, a coloring of the states.

A run of a CA over a valuation word w¯(ValV,𝔻)ω is a sequence of transitions t¯Δω such that for all i1, ti=(qi1,Ci,qi), with wiCi and q0I. A run is accepting if the highest color seen infinitely often along the run is even. Under the non-deterministic semantics, the word w¯ is accepted if there exists an accepting run. This yields the model of non-deterministic parity CA. The number of priorities of 𝒜 is the size of χ(Q). We will also consider a universal semantics: in this case, a word w¯ is accepted if all runs on w¯ are accepting. An automaton is deterministic if for any two transitions of the form (q,C1,p1) and (q,C2,p2) such that p1p2, for all valuation wValV,𝔻, either w⊧̸C1 or w⊧̸C2. We also consider subclasses of CA: we say that an automaton has a Büchi acceptance condition (resp co-Büchi) if all its states have color 1 or 2, that is, χ(Q){1,2} (resp χ(Q){0,1}). It has a reachability (resp safety) acceptance condition if it has a Büchi (resp co-Büchi) acceptance condition and there exists no transition from a state colored 2 to a 1 (resp from 1 to 0). Last, the language of a CA 𝒜 is the set of accepted words, and is denoted L(𝒜).

We call syntactic automaton 𝒜stx the automaton 𝒜 seen as a finite automaton over the finite alphabet 𝒞V(k) of constraints of rank k and let Lstx(𝒜)=L(𝒜stx) denote its language.

From CLTL to constraint automata.

It is well-known any LTL sentence can be converted into a Büchi automaton. This result carries over to 𝖢𝖫𝖳𝖫 and constraint automata.

Proposition 5.

Let Φ be a 𝖢𝖫𝖳𝖫 formula. One can construct in ExpTime a universal co-Büchi CA 𝒜 such that L(Φ)=L(𝒜) whose size is exponential in the size of Φ.

Proof.

The logic 𝖢𝖫𝖳𝖫 can be seen as LTL over the finite alphabet 𝒞V(k). As such we can use the classical exponential procedure that converts any LTL formula into an equivalent non-deterministic Büchi automaton, to build a non-deterministic Büchi constraint automaton equivalent to the 𝖢𝖫𝖳𝖫 formula (see Section 3.2 in [7]). The result follows by applying the latter construction on the negation of the formula and interpreting the resulting automaton with a universal co-Büchi condition.

Example 6 (Example 3 continued).

A constraint automaton equivalent to the 𝖢𝖫𝖳𝖫 formula Φ of Example 3 is depicted in Figure 1(a).

(a) A universal co-Büchi CA. The colors are indicated in the states.
(b) A register transducer.
Figure 1: A constraint automaton and a register transducer.

3 Register-bounded synthesis problem from CLTL

3.1 Synthesis problem over finite alphabets

We first recall the synthesis problem for ω-regular specifications over a finite alphabet. In this setting, the goal is to synthesize (if it exists) a finite transducer over a finite input alphabet Σin and a finite output alphabet Σout that realizes a specification S(ΣinΣout)ω, given, for example, as a non-deterministic Büchi automaton. Let us formally define this problem. A finite transducer (FT for short) is a tuple T=(Σin,Σout,Q,q0,δ) such that Q is a finite set of states with initial state q0Q, and δ:Q×ΣinΣout×Q is a (total) transition function. The semantics of T is a language, denoted L(T)(ΣinΣout)ω, defined as the set of words i1o1i2o2(ΣinΣout)ω such that there exists a sequence of states p0p1Qω with p0=q0 and for all j1, δ(qj,ij)=(oj,qj+1).

A specification S(ΣinΣout)ω is said to be realizable if there exists a finite transducer T such that L(T)S. Büchi-Landweber’s Theorem states that when S is ω-regular, the realizability problem is decidable [4]. More precisely, this problem can be solved in ExpTime when S is given as a universal co-büchi automaton [20], and is 2ExpTime-c when S is given as an LTL formula over some sets of input and output atomic propositions [21].

3.2 Register transducers over data words

We now extend synthesis to infinite alphabets and 𝖢𝖫𝖳𝖫 specifications. We need to adapt the model of implementation, i.e. transducers. To this end, we first extend the notion of finite transducer to transducers over infinite alphabets that act over a finite set of registers, formally defined via the notion of actions below.

Action words.

Let 𝒟=(𝔻,P,d0) be a data domain and V=𝕀𝕆 be a finite set of variables partitioned into 𝕀 (input variables) and 𝕆 (output variables). They are also called system and environment variables in the context of synthesis. Let R be a finite set of elements called registers. An action over R and V is a tuple in Test𝕀,R×Assign𝕀,R×Output𝕆,R where:

  • Test𝕀,R=𝒞𝕀R is the set of maximally consistent constraints over 𝕀R.

  • Assign𝕀,R is the set of partial functions ρass:R𝕀 from R to 𝕀.

  • Output𝕆,R=Val𝕆,R is the set of (total) functions ρout:𝕆R from 𝕆 to R.

Assignments are to be understood as a way to store data received as input, to be able to compare them later to new incoming data, or to output them. The output functions specify for each variable, which register should be used to obtain the value that must be produced at each step. We denote by Act𝕀,𝕆,R the set of actions. An action word is an infinite word a¯(Act𝕀,𝕆,R)ω. We denote by (Act𝕀,𝕆,R)ω the set of action words.

The semantics of an action word a¯=(C1,ρ1ass,ρ1out)(C2,ρ2ass,ρ2out) is a language a¯(ValV,𝔻)ω that we now define. Assume w¯=(w1V=w1𝕀w1𝕆)(w2V=w2𝕀w2𝕆) be a sequence of valuations. We “execute” the action word a¯ on w¯. Registers are used to store data from the input valuations in w¯, and the actions on registers (tests and assignments) are dictated by a¯. Registers in R are all initialized with the value d0 (valuation w1R). Then, test C1 is performed on w1𝕀w1R. If it succeeds, registers are updated according to ρ1ass (giving valuation w2R), and the valuation w1𝕆=w2Rρ1out is output. The execution proceeds with the new action (C2,ρ2ass,ρ2out) and register valuation w2R. This is formally captured by the following compatibility notion.

We say that a valuation word w¯=(w1=w1𝕀w1𝕆)(w2=w2𝕀w2𝕆)(ValV,𝔻)ω is compatible with an action word a¯(Act𝕀,𝕆,R)ω if there exists a register valuation word wR¯=w1Rw2R(ValR,𝔻)ω such that w1R(r)=d0 for all rR and for all i>0:

  • wi𝕀wiRCi;

  • wi+1R(r)=wi𝕀ρiass(r) if ρiass(r) is defined, otherwise wi+1R(r)=wiR(r);

  • wi𝕆=wi+1Rρiout.

The language of an action word a¯ is the set a¯(ValV,𝔻)ω of valuation words compatible with a¯. We write w¯a¯ whenever w¯a¯. It is worth observing that if w¯a¯, then the associated register valuation word wR¯ is unique.

Definition 7 (Register transducer).

A register transducer (RT for short) over 𝒟 is a tuple 𝕋=(Q,q0,R,V,δ) where:

  • R is a finite set of registers,

  • V=𝕀𝕆 is a finite set of variables partitioned into input variables and output variables such that VR=,

  • (Test𝕀,R,Assign𝕀,R×Output𝕆,R,Q,q0,δ) is a finite transducer, denoted 𝕋stx.

Observe that, as we consider tests defined by maximally consistent constraints, the transducers we consider are deterministic and complete w.r.t. their input.

We define two semantics for T. The first is more syntactic and is useful to define finite abstractions of languages defined by register transducers, and is simply defined as Lstx(𝕋)=L(𝕋stx). The second one, over valuations of V, is defined as L(𝕋)=a¯Lstx(𝕋)a¯.

3.3 Synthesis problem over data domains

When moving from a finite alphabet to data words over some data domain 𝒟, we lift specifications from ω-regular languages over a finite alphabet to languages L(ValV,𝔻)ω, for some set of variables V. Such a specification can, of course, be described by a constraint automaton, as well as by a 𝖢𝖫𝖳𝖫 formula, which is the purpose of this work. Regarding implementations, we consider register transducers, leading to the following problem:

Register-bounded Synthesis Problem from 𝖢𝖫𝖳𝖫
Input
: A 𝖢𝖫𝖳𝖫(𝒟) formula Φ over V=𝕀𝕆 and an integer r
Output: A register transducer T over V and with r registers, if it exists, which realizes Φ, i.e. such that L(T)L(Φ).

The decision problem associated with the synthesis problem is called the realizability problem, and only asks whether such a transducer T exists. In this paper, when stating hardness results with respect to the complexity of the synthesis problem, they refer to the realizability problem. Moreover, when stating upper-bounds, they also include the cost of constructing a solution (a register transducer).

We assume that r is given in unary. This is reasonable as the expected register transducer has r registers, which means that the configuration of the registers is already of size r.

Example 8 (Example 3 continued).

We consider again Φ=G(xyyy(1)) with 𝕀={x} and 𝕆={y}. In our context, since RT can only output data they received before, a transducer realizing this specification must output the largest input seen so far. The RT with a single register depicted in Figure 1(b) realizes this specification. The transitions read as follows: xr means that the value of x is assigned to register r, and r means that the content of r is output. Observe that the tests on the transitions of this RT are not maximally consistent. This is just a graphical simplification for the sake of conciseness.

4 Data domains with 𝝎-regular satisfiability

Let 𝒟 be a data domain. For all integer k1 and set of variables X, let

𝖲𝖠𝖳k,X={c¯(𝒞X(k))ωc¯ is a word of maximally consistent constraints and c¯}

be the set of satisfiable constraint words in 𝒟.

Definition 9.

We say that 𝒟 has effective ω-regular satisfiability if the function which given some k and X returns an automaton recognizing 𝖲𝖠𝖳k,X, is computable.

In this section, we will show the following theorem.

Theorem 10.

Let 𝒟 be a data domain with effective ω-regular satisfiability. Then register-bounded synthesis from specifications expressed as universal co-Büchi CA over 𝒟 is decidable.

The main idea is to reduce the problem to a synthesis problem for an ω-regular specification over a finite alphabet, using some sound and complete finite abstraction stated in Lemma 13. Since the goal is to synthesize a register transducer, the finite alphabet is the set of actions Act𝕀,𝕆,R of the transducer, which is partitioned into input actions (constraints over 𝕀 and R) and output actions (register assignments and output function). The next two lemmas are technical results towards proving Lemma 13. From now on, we fix 𝒟 some data domain.

From action words to constraint words.

First, in order to compare actions of register transducers and constraints of constraint automata, sequences of actions are canonically mapped to sequences of constraints, via a mapping cstr:(Act𝕀,𝕆,R)ω(𝒞VR(1))ω. Remember that an action is a triple (C,ρass,ρout) where C is a constraint over 𝕀R, ρass:R𝕀 is a partial function and ρout:𝕆R a function. The latter two assignments induce constraints between V and R. It is also worth noting that the register valuation at step i is the one used for the test, while the one at step i+1 is the one obtained after the assignment, which is used for producing the output. For example, the assignment ρass implies that the next content of register r is equal to the value of variable ρass(r). Similarly, any output variable y𝕆 holds a value equal to the next content of register ρout(y). Formally, for all a¯=(C1,ρ1ass,ρ1out), we let cstr(a¯)=(C1init)C2C3 where init=def(rRr=d0) and for all i1:

Ci=CirR s.t.ρiass(r) defined(r(1)=ρiass(r))rR s.t.ρiass(r) not defined(r(1)=r)y𝕆(y=(ρiout(y))(1))

The latter transformation is correct in the following sense:

Lemma 11.

Let a¯(Act𝕀,𝕆,R)ω then a¯=cstr(a¯)|V.

Since a specification has constraints over V(k), and a register transducer expresses properties of action words, which themselves hold constraints over V=𝕀𝕆 and R, one needs a mechanism to synchronize these two types of constraints. This is done via the following function called extension, denoted join:(Act𝕀,𝕆,R)ω×(𝒞V(k))ω𝒞VR(k), defined for any a¯(Act𝕀,𝕆,R)ω and c¯(𝒞V(k))ω as

join(a¯,c¯)={c¯𝒞VR(k)cstr(a¯)c¯ and c¯c¯}

Valuations satisfying constraint words in join(a¯,c¯), when restricted to variables in V, satisfy both a¯ and c¯. Using Lemma 11, we prove:

Lemma 12 (Adequation).

Let a¯(Act𝕀,𝕆,R)ω, c¯(𝒞V(k))ω, w¯ValVR,𝔻 and c¯(𝒞VR(k))ω such that w¯c¯. Then c¯join(a¯,c¯) iff w¯|Va¯ and w¯|Vc¯.

The next lemma formalizes the reduction of synthesis from infinite to finite alphabets, and in particular to the alphabet of actions Act𝕀,𝕆,R, which is finite as the set of registers R is finite. In turn, a specification given by a universal coBüchi CA 𝒜 is translated into a specification 𝖶𝒜,R over the alphabet Act𝕀,𝕆,R. A finite transducer realizing 𝖶𝒜,R can then be regarded as a transducer with set of registers R. The specification 𝖶𝒜,R is precisely defined to make sure that the latter register transducer satisfies L(𝒜). Informally, in the finite alphabet specification, an action word a¯ is considered to be correct if any constraint word c¯ such that both a¯ and c¯ are satisfiable by the same data valuation word, belongs to Lstx(𝒜). Formally, the reduction is ensured by the following transfer lemma:

Lemma 13 (Transfer Lemma).

Let 𝒜 be a universal co-Büchi CA over V=𝕀𝕆 and R a set of registers. Let

𝖶𝒜,R={a¯(Act𝕀,𝕆,R)ωc¯(𝒞V(k))ω,(c¯join(a¯,c¯),c¯𝖲𝖠𝖳k,VR)c¯Lstx(𝒜)}

L(𝒜) is realizable by an RT with |R| registers iff 𝖶𝒜,R is realizable by an FT.

Proof.

Suppose 𝒜 is realized by some RT 𝕋, i.e. L(𝕋)L(𝒜). We show that 𝕋stx realizes 𝖶𝒜,R, i.e., L(𝕋stx)𝖶𝒜,R. Let a¯L(𝕋stx). Let c¯(𝒞V(k))ω such that c¯join(a¯,c¯) and c¯𝖲𝖠𝖳k,VR. By definition of 𝖲𝖠𝖳k,VR, there exists w¯(ValVR,𝔻)ω, such that w¯c¯. By Lemma 12, w¯|Va¯ and w¯|Vc¯. As a¯L(𝕋stx) and w¯|Va¯, we get w¯|VL(𝕋), and therefore w¯|VL(𝒜). Let ρ be a run of 𝒜stx on c¯. Since w¯|Vc¯, we have that ρ is a run of 𝒜 on w¯|V. From w¯|VL(𝒜) we find that ρ is accepting. Since this is true for all runs ρ and 𝒜 has a universal acceptance condition, we finally get c¯L(𝒜stx). So, a¯𝖶𝒜,R, by definition of 𝖶𝒜,R. Finally, we have shown that L(𝕋stx)𝖶𝒜,R.

Suppose 𝖶𝒜,R is realized by a finite transducer 𝕋f=(Q,I,Σi,Σo,δ) where Σi=Test𝕀,R, Σo=Assign𝕀,R×Output𝕆,R and δ:Q×Test𝕀,RAssign𝕀,R×Output𝕆,R×Q. We have L(𝕋f)𝖶𝒜,R. The finite transducer 𝕋f can be seen as an R-register transducer 𝕋 over 𝒟, i.e. such that 𝕋stx=𝕋f. We show that 𝕋 realizes 𝒜, i.e. L(𝕋)L(𝒜).

Let w¯L(𝕋). The run of 𝕋 on w¯ induces an action word that we write a¯, as well as a word of valuations w¯(ValVR,𝔻)ω such that w¯|V=w¯. We have w¯a¯ by semantics of register transducer. In particular a¯L(𝕋f). Remember that we want to show w¯L(𝒜). Let ρ be a run of 𝒜 on w¯. We let c¯ be the constraint word induced by ρ, by semantics of constraint word and automata w¯c¯. Let c¯𝒞VR(k) the maximally consistent constraint word such that w¯c¯ (it is obtained by choosing for every literal and its negation the one that w¯ satisfies). As both w¯a¯ and w¯c¯, by Lemma 12 we have c¯join(a¯,c¯). Moreover, since w¯c¯, we have c¯𝖲𝖠𝖳k,VR. As a¯L(𝕋f), so a¯𝖶𝒜,R by hypothesis. By definition of 𝖶𝒜,R, we have c¯L(𝒜stx). By definition of c¯ and since 𝒜stx is universal, ρ is accepting. As this is true for all runs ρ of 𝒜 on w¯, we get w¯L(𝒜).

The next lemma states that 𝖶𝒜,R is ω-regular whenever 𝒟 has regular satisfiability and establishes some complexity bounds on the size of the representation of 𝖶𝒜,R.

Lemma 14.

Let 𝒜 be a universal co-Büchi CA with n states. If 𝒟 has effective ω-regular satisfiability, then 𝖶𝒜,R is effectively ω-regular: given k and registers R, if 𝖲𝖠𝖳k,VR is recognizable by a non-deterministic parity automaton with ns states and cs colors, then 𝖶𝒜,R is accepted by a universal co-Büchi automaton with O(ns×cs×n) states.

Proof sketch.

We first consider the following definitions/equalities:

A=(Act𝕀,𝕆,R)ω×(𝒞V(k))ω×(𝒞VR(k))ωLjoin={(a¯,c¯,c¯)Ac¯join(a¯,c¯)}W={(a¯,c¯,c¯)A(a¯,c¯,c¯)Ljoinc¯𝖲𝖠𝖳k,VRc¯L(𝒜stx)}𝖶𝒜,R={a¯(Act𝕀,𝕆,R)ωc¯(𝒞V(k))ω,c¯(𝒞VR(k))ω,(a¯,c¯,c¯)W}

As a consequence, a universal co-Büchi automaton for 𝖶𝒜,R can be derived from one for W. Let us explain how we build it. First, Ljoin is recognizable by a deterministic (safety) automaton with two states. Then, the complement of W roughly corresponds to the intersection of Ljoin with 𝖲𝖠𝖳k,VR and with the complement of L(𝒜stx). The non-deterministic parity automaton for 𝖲𝖠𝖳k,VR can be translated into a non-deterministic Büchi one in polynomial time. In addition, as 𝒜 is a universal co-Büchi CA, the complement of L(𝒜stx) is also recognized by a non-deterministic Büchi automaton. Last, the intersection of two non-deterministic Büchi automata is known to be a non-deterministic Büchi automaton of polynomial size which can built in PTime (see for instance [1]).

Proof sketch of Theorem 10.

The Transfer Lemma (Lemma 13) reduces the register-bounded synthesis problem to a synthesis problem over a finite alphabet, whose specification is ω-regular by Lemma 14. This problem is decidable by Büchi-Landweber’s Theorem.

Data domains with the completion property.

Theorem 10 is established for data domains with effective ω-regular satisfiability. We prove that any data domain satisfying the completion property has ω-regular satisfiability. Intuitively, we build a safety automaton that stores the last constraint read and checks that two consecutive constraints are compatible.

Lemma 15.

Let 𝒟 be a decidable completable data domain, then 𝒟 has ω-regular satisfiability. Moreover, if 𝒟 is decidable in ExpTime, then a deterministic parity automaton recognizing 𝖲𝖠𝖳k,X can be constructed that has exp(k.|X|) states and 2 priorities.

 Remark 16.

In the statement, we require that the existential first-order theory of 𝒟 is decidable. In fact we only need decidability of the satisfiability of conjunctions of constraints and not any formula, this problem is generally easier.

We can now state the main result of this section:

Theorem 17.

Let 𝒟 be a decidable completable data domain (resp. decidable in ExpTime). Then register-bounded synthesis from 𝖢𝖫𝖳𝖫(𝒟) is decidable (resp. 2ExpTime-c). It is 2ExpTime-hard for any fixed number of registers r2.

Proof sketch.

To prove the upper bound, we first build from a 𝖢𝖫𝖳𝖫 formula Φ an equivalent CA 𝒜, using Proposition 5. Then, using Lemmas 13, 14, 15, realizability of Φ reduces to that of 𝖶𝒜,R, which can be recognized by a universal co-Büchi automaton whose size is exponential in |Φ|, k and |R|. Last, realizability for specifications expressed by universal co-Büchi automata can be decided in ExpTime [20].

For the lower bound, we reduce the problem of LTL synthesis (over finite alphabets), which is already 2ExpTime-c [21], to bounded register synthesis with two registers, over domain 𝒟. Intuitively, we use two distinct data values in order to encode the two boolean values, and add constraints in the formula in order to ensure that the register transducer uses two registers to store these data values all along the execution.

 Remark 18.

In Theorem 17, the lower bound already holds for two registers, and also if 𝒟 has an existential first-order theory decidable in PTime. Moreover, this lower bound holds for any data domain, as long as equality is definable.

We have seen in Lemma 1 that (𝔻,=,d0) and (,<,0) are completable data domains. In addition, it is easily seen that the existential first-order theory of (𝔻,=,d0) is decidable in NP, as well as for (,<,0). As a consequence of Theorem 17, we obtain:

Corollary 19.

Register-bounded synthesis from 𝖢𝖫𝖳𝖫 (𝔻,=,d0) and 𝖢𝖫𝖳𝖫 (,<,0) is 2ExpTime-complete.

5 𝝎-Regularly approximable data domains

Another important setting is the data domain (,<,0). As said before, it is not completable, but worse than that, its set of satisfiable constraint words 𝖲𝖠𝖳k,X is not regular (see e.g. [22, 9]). Actually, when considering only finite words, this set is regular, but it turns out that it is not regular when considering infinite words. Here is an example to illustrate this discrepancy. We define decrease=(x(1)<x(0)y(1)=y(0)) and reset=(x(1)=y(0)y(1)=y(0)). Then we look at the family of constraint words reset.decreasei1.reset.decreasei2.reset.decreasei3. Depending on the sequence (in)n0, the constraint word will or will not be satisfiable: if (in)n0 has an upper bound then by picking the first value for y big enough we can build a satisfying valuation, but otherwise the constraint word is not satisfiable. In this section, we will show an extension of the previous framework that allows to capture such data domains.

5.1 General approach

Let X be a set of variables and k. We let 𝖫𝖠𝖲𝖲𝖮(𝒞X(k))ω denote the set of ultimately periodic constraint words (or lasso-shaped word), formally 𝖫𝖠𝖲𝖲𝖮={u.vωu,v𝒞X(k)}.

Definition 20.

We say that 𝒟 is effectively ω-regularly approximable if there exists a computable function which associates with every k,X, an automaton recognizing an ω-regular language denoted 𝖰𝖲𝖠𝖳k,X(𝒞X(k))ω such that 𝖲𝖠𝖳k,X𝖰𝖲𝖠𝖳k,X and 𝖲𝖠𝖳k,X𝖫𝖠𝖲𝖲𝖮=𝖰𝖲𝖠𝖳k,X𝖫𝖠𝖲𝖲𝖮.

 Remark 21.

𝖰𝖲𝖠𝖳k,X can be thought of as an over-approximation of 𝖲𝖠𝖳k,X which is exact on lasso-shaped words.

Theorem 22.

Let 𝒟 be an effectively ω-regularly approximable data domain. Then register-bounded synthesis from specifications expressed as universal co-Büchi CA is decidable.

Let 𝒜 be a universal co-Büchi CA over 𝒟, an ω-regularly approximable data domain, and R be a set of registers. Fix 𝖰𝖲𝖠𝖳k,VR(𝒞VR(k))ω as given in Definition 20. We define the following language by:

𝖶𝒜,RQ={a¯(Act𝕀,𝕆,R)ωc¯(𝒞V(k))ω,(c¯join(a¯,c¯),c¯𝖰𝖲𝖠𝖳k,VR)c¯Lstx(𝒜)}
Lemma 23.

𝖶𝒜,R is realizable (by an FT) iff 𝖶𝒜,RQ is realizable (by an FT).

Proof sketch.

For the reverse direction, it is easy to verify that the inclusion 𝖲𝖠𝖳k,VR𝖰𝖲𝖠𝖳k,VR entails 𝖶𝒜,R𝖶𝒜,RQ. Thus, if there exists a FT 𝕋 that realizes 𝖶𝒜,RQ, i.e. L(𝕋)𝖶𝒜,RQ, then it also realizes 𝖶𝒜,R.

To prove the direct implication, we will show that for any FT 𝕋, L(𝕋)𝖶𝒜,RQ entails L(𝕋)𝖶𝒜,R. Following the lines of the proof of Lemma 14, and using the same notations, we consider the following definitions/equalities:

WQ={(a¯,c¯,c¯)A(a¯,c¯,c¯)Ljoinc¯𝖰𝖲𝖠𝖳k,VRc¯L(𝒜stx)}𝖶𝒜,RQ={a¯(Act𝕀,𝕆,R)ωc¯(𝒞V(k))ω,c¯(𝒞VR(k))ω,(a¯,c¯,c¯)WQ}

In addition, as 𝖰𝖲𝖠𝖳k,VR is ω-regular, we can build a non-deterministic Büchi automaton B accepting the complement WQ¯ of WQ. Observe that by definition of W and WQ, the equality 𝖲𝖠𝖳k,VR𝖫𝖠𝖲𝖲𝖮=𝖰𝖲𝖠𝖳k,VR𝖫𝖠𝖲𝖲𝖮 entails W¯𝖫𝖠𝖲𝖲𝖮=WQ¯𝖫𝖠𝖲𝖲𝖮().

Let 𝕋 be an FT such that L(𝕋)𝖶𝒜,RQ: there exist a¯L(𝕋), c¯(𝒞V(k))ω, c¯(𝒞VR(k))ω such that (a¯,c¯,c¯)WQ, and thus (a¯,c¯,c¯)L(B). Considering the product 𝕋×B, we can exhibit a lasso shaped word (b¯,d¯,d¯)L(B) such that b¯L(𝕋). Property () entails (b¯,d¯,d¯)W, hence b¯𝖶𝒜,R, and thus L(𝕋)𝖶𝒜,R.

 Remark 24.

Observe that if 𝖶𝒜,RQ is realizable a FT 𝕋, 𝖶𝒜,R is also realizable by 𝕋.

Proof sketch of Theorem 22.

By Lemmas 13 and 23, we have that L(𝒜) is realizable by a RT iff 𝖶𝒜,RQ is realizable by a FT. The definition of 𝖶𝒜,RQ is the same as that of 𝖶𝒜,R, while substituting 𝖲𝖠𝖳k,VR with 𝖰𝖲𝖠𝖳k,VR. As a consequence, Lemma 14 can be adapted to prove that 𝖶𝒜,RQ is effectively ω-regular, and we conclude using Büchi-Landweber’s Theorem.

5.2 Proving 𝝎-regular approximability

In [16], a similar notion of ω-regular approximability is considered, but the setup is different as they do not start from logic but from register automata. As such, their syntactic input languages are not over constraint words as our paper, but over action words. Their notion is different from ours mainly in that future variables x(k) are restricted to k=1, and that they receive values one at a time. Still, we will show that it is possible to transfer ω-regular approximability results from the setting if [16] to ours.

In the setting of [16], there is a single input, hence 𝕀 should be a singleton (𝕀={}) and there is no output (𝕆=). Last, we let R denote some set of registers. With these choices, we denote by 𝖥𝖤𝖠𝖲R(Act{},,R)ω the set of action words a¯ such that a¯. We will also denote by 𝖫𝖠𝖲𝖲𝖮AW the adaptation of 𝖫𝖠𝖲𝖲𝖮 to the set (Act{},,R)ω.

Definition 25.

Let 𝒟 be a data domain. We say that 𝒟 is effectively AW regularly approximable (AW-RA) if there exists a computable function which associates with every R, an automaton recognizing an ω-regular language denoted 𝖰𝖥𝖤𝖠𝖲R(Act𝕀,𝕆,R)ω, such that 𝖥𝖤𝖠𝖲R𝖰𝖥𝖤𝖠𝖲R and 𝖥𝖤𝖠𝖲R𝖫𝖠𝖲𝖲𝖮AW=𝖰𝖥𝖤𝖠𝖲R𝖫𝖠𝖲𝖲𝖮AW.

Now we can state the following result:

Proposition 26 ([16]).

Each of the following data domain is effectively AW regularly approximable:

  • (,<,0): natural numbers with linear order

  • (,<,0): integers with linear order

  • (d,=d,<d,0d): tuples of integers, with pointwise linear order (d is fixed)

  • (Σ,,ϵ): finite words over Σ with the prefix relation

In addition, for each of these domains, given a set of registers R, the set 𝖰𝖥𝖤𝖠𝖲R is recognized by a non-deterministic parity automaton with exp(|R|) states and poly(|R|) priorities.

This follows from different results proven in [16]. First, it is shown in Section 3.2 that for all R, (,<,0) has a witness 𝖰𝖥𝖤𝖠𝖲R of ω-regular approximability recognized by a non-deterministic parity automaton with exp(|R|) states and poly(|R|) priorities. Then, it is shown in Sections 4.2 and 4.3 that the other data domains reduce to (,<,0). In Remark 18, it is explained why these reductions induce a construction for 𝖰𝖥𝖤𝖠𝖲R that preserves its size and number of priorities (only a polynomial blowup occurs).

The next result allows us to transfer these positive results to our setting:

Lemma 27.

If a data domain 𝒟 is effectively AW-RA, then it is effectively ω-regularly approximable: if 𝖰𝖥𝖤𝖠𝖲R can be recognized by a non-deterministic parity automaton with exp(|R|) states and poly(|R|) priorities, then 𝖰𝖲𝖠𝖳k,X can be recognized by a non-deterministic parity automaton with exp((k+1).|X|) states and poly((k+1).|X|) priorities.

Proof sketch.

The intuitive idea of the construction is to translate what happens in the setting of constraint sequences into that of action words over inputs of dimension 1. To that end, intuitively, we need to trade the higher dimension of input variables (|X|) and the possibility to look at horizon k with longer executions. Each step in the setting of constraint sequences will be simulated by (k+1).|X| steps in the action words setting.

Let 𝒟 be an effectively AW regularly approximable data domain. Let X={x1,,x|X|} be a set of variables and k. We define the following set of registers:

R={xi,j1i|X|,0jk}

In particular, we have |R|=(k+1).|X|

Formally, we define a mapping Ψ:(𝒞X(k))ω(Act{},,R)ω from constraint sequences over X(k) to action words over R (with the same conditions as above, i.e. singleton input variables, and empty set of output variables). We describe how it works on an example. Assume that X={x,y,z} and k=1. We thus have access to six data values, which we will store in six registers. Each step in the constraint sequence setting is simulated by six steps in the action word setting. The way we convert w¯=c1c2 is depicted on Figure 2.

Figure 2: Illustration of the construction of Lemma 27.

During the first six steps, we initialize the registers with the data values that we read. At the end of these steps, we are able to check the first constraint c1. Then, the data are processed six by six as follows: the first three data should correspond to data seen previously (as x(0) corresponds to x(1) one step before), so we have to check consistency. Still, we update the registers, and at the end of these six steps, we are able to check the constraint c2.

We claim that this mapping fulfills the two following properties:

  1. (i)

    w¯(𝒞X(k))ω,w¯𝖲𝖠𝖳k,XΨ(w¯)𝖥𝖤𝖠𝖲R

  2. (ii)

    w¯(𝒞X(k))ω,w¯𝖫𝖠𝖲𝖲𝖮Ψ(w¯)𝖫𝖠𝖲𝖲𝖮AW

We let 𝖰𝖲𝖠𝖳k,X=Ψ1(𝖰𝖥𝖤𝖠𝖲R). Property (i) gives 𝖲𝖠𝖳k,X=Ψ1(𝖥𝖤𝖠𝖲R). Thus, 𝖥𝖤𝖠𝖲R𝖰𝖥𝖤𝖠𝖲R entails, by monotonicity of the inverse image, 𝖲𝖠𝖳k,X𝖰𝖲𝖠𝖳k,X. In addition, Property (ii) easily gives 𝖰𝖲𝖠𝖳k,X𝖫𝖠𝖲𝖲𝖮𝖲𝖠𝖳k,X, which implies 𝖲𝖠𝖳k,X𝖫𝖠𝖲𝖲𝖮=𝖰𝖲𝖠𝖳k,X𝖫𝖠𝖲𝖲𝖮 as expected.

Regarding complexity, one can observe that Ψ is realized by an FT 𝕋Ψ with two states. As 𝖰𝖲𝖠𝖳k,X=Ψ1(𝖰𝖥𝖤𝖠𝖲R), we can build an automaton accepting 𝖰𝖲𝖠𝖳k,X by doing a wreath product between 𝕋Ψ and an automaton recognizing 𝖰𝖥𝖤𝖠𝖲R, yielding the result, as we have |R|=(k+1).|X|.

Corollary 28.

For 𝒟{(,<,0),(,<,0),(d,<d,0d),(Σ,,ϵ)}, register-bounded synthesis from 𝖢𝖫𝖳𝖫(𝒟) is 2ExpTime-c.

Proof sketch.

Let 𝒟 be one of these data domains and Φ𝖢𝖫𝖳𝖫(𝒟). Let 𝒜 be a universal co-Büchi CA built from Φ. By Proposition 26 and Lemma 27, a bound on the size of a non-deterministic parity automaton recognizing 𝖰𝖲𝖠𝖳k,VR can be derived. Then, the complexity analysis done in the proof sketch of Theorem 17 can be adapted to show the upper bound. The lower bound follows from the one of Theorem 17 as it does not depend on the data domain (Remark 18).

6 CLTL register-bounded synthesis with partial observation

Partial observation aims to improve the modeling capabilities. While a system may contain numerous variables, the controller usually has access to only a few of them [19]. In this section, we study an extension of 𝖢𝖫𝖳𝖫 that features partial observation: we split our set of input variables into two subsets, public (visible) inputs 𝕀v and private (hidden) inputs 𝕀h.

Example 29.

To illustrate this setting, consider an environment that, at each turn, outputs two public values in1,in2. One of them must be equal to some private (hidden) variable t (target), that the controller aims at identifying infinitely often, using some variable g (guess) that it outputs at each turn. Such a setting can be captured as follows. Let 𝕀v={in1,in2}, 𝕀h={t} and 𝕆={g} and consider the following formula:

Φ=G(i{1,2}ini(0)=t(0))GF(g(0)=t(0))

As 𝔻 is infinite and the way t alternates between in1 and in2 is arbitrary, this formula is not realizable. Indeed, for any strategy of the controller (output in1, resp. in2), the environment can take the opposite decision (set t=in2, resp. t=in1). However, if we assume a periodic behavior of the environment, then we obtain the following formula (here with period p):

Φper=(G(t(0)=t(p))G(i{1,2}ini(0)=t(0)))GF(g(0)=t(0))

Now, we can show that this formula is realizable by a register transducer with 2 registers, which stores the two first inputs to identify which one repeats after p rounds.

Let V=𝕀v𝕀h𝕆 be a set of variables. We say that a transducer 𝕋 with input alphabet 𝕀v and output alphabet 𝕆 PO-realizes a specification L(ValV,𝔻)ω iff wh¯(Val𝕀h,𝔻)ω, w¯L(𝕋), w¯wh¯L. This yields the following decision problem:

Register-bounded Partial Observation Synthesis Problem from 𝖢𝖫𝖳𝖫(𝒟)
Input
: A 𝖢𝖫𝖳𝖫(𝒟) formula Φ over V=𝕀v𝕀h𝕆 and an integer r
Output: A register transducer 𝕋 over (𝕀v,𝕆) with r registers that PO-realizes Φ, if it exists.

As the specification deals with input variables 𝕀v𝕀h, while the transducer only reads inputs in 𝕀v, we need to adapt the transfer lemma. To that end, given an action word a¯ over 𝕀h, and an action word a¯ over 𝕀v𝕀h, we say that a¯ is a completion of a¯ if for all i>0, if ai=(Ci,ρiass,ρiout) then ai=(Ci,ρiass,ρiout), with Ci(𝒞VR(k))ω such that Ci=Ci|𝕀vR. We let compl𝕀h(a¯) denote the set of completions of a¯.

Then, given a universal co-Büchi CA 𝒜, we consider the following set:

𝖶𝒜,RPO={a¯(Act𝕀v,𝕆,R)ωa¯compl𝕀h(a¯),c¯(𝒞V(k))ω,(c¯join(a¯,c¯),c¯𝖲𝖠𝖳k,VR)c¯Lstx(𝒜)}

We can then adapt the transfer lemma and prove:

Lemma 30 (Partial observation transfer lemma).

Let 𝒜 be a universal co-Büchi CA. Then L(𝒜) is PO-realizable by a RT with |R| registers iff 𝖶𝒜,RPO is realizable by a FT.

Following the same lines as in Section 4, we prove:

Theorem 31.

Let 𝒟 be a data domain with effective ω-regular satisfiability. Register-bounded partial observation synthesis from 𝖢𝖫𝖳𝖫(𝒟) is decidable. If, in addition, 𝒟 is completable and decidable in ExpTime, then it is 2ExpTime-c.

Corollary 32.

Register-bounded partial observation synthesis from 𝖢𝖫𝖳𝖫 (𝔻,=,d0) and 𝖢𝖫𝖳𝖫 (,<,0) is 2ExpTime-c.

7 Conclusion

We have shown that when the set of satisfiable constraint sequences over a data domain 𝒟 is ω-regular, or ω-regularly approximable, then the register-bounded synthesis problem from 𝖢𝖫𝖳𝖫(𝒟) is decidable. In addition, we have provided detailed complexity analysis to obtain optimal complexity results for most of the classical data domains studied in the literature. Last, we have also proven that our approach can be generalized to partial observation.

This work opens several perspectives. First, one could investigate natural extensions of this work, for instance by targeting other data domains (e.g. sets of natural numbers with inclusion [14]), or other logics over data words (e.g. freeze LTL [6]). Another direction consists in trying to lift successful approaches developed for reactive synthesis from the boolean to the data-aware setting. For instance, one could investigate compositional approaches, as well as heuristics based on antichains, as proposed in [13] to develop more efficient symbolic algorithms.

References

  • [1] Christel Baier and Joost-Pieter Katoen. Principles of model checking. MIT Press, 2008.
  • [2] Ashwin Bhaskar and M. Praveen. Realizability problem for constraint LTL. Information and Computation, 2024. arXiv:2207.06708.
  • [3] Roderick Bloem, Krishnendu Chatterjee, and Barbara Jobstmann. Graph games and reactive synthesis. In Edmund M. Clarke, Thomas A. Henzinger, Helmut Veith, and Roderick Bloem, editors, Handbook of Model Checking, pages 921–962. Springer, 2018. doi:10.1007/978-3-319-10575-8_27.
  • [4] J. Richard Buchi and Lawrence H. Landweber. Solving sequential conditions by finite-state strategies. Transactions of the American Mathematical Society, 138:295–311, 1969. URL: http://www.jstor.org/stable/1994916.
  • [5] Stéphane Demri. LTL over integer periodicity constraints. Theor. Comput. Sci., 360(1-3):96–123, 2006. doi:10.1016/J.TCS.2006.02.019.
  • [6] Stéphane Demri and Ranko Lazic. LTL with the freeze quantifier and register automata. ACM Trans. Comput. Log., 10(3):16:1–16:30, 2009. doi:10.1145/1507244.1507246.
  • [7] Stéphane Demri and Karin Quaas. Concrete domains in logics: a survey. ACM SIGLOG News, 8(3):6–29, July 2021. doi:10.1145/3477986.3477988.
  • [8] Stéphane Demri and Karin Quaas. Constraint automata on infinite data trees: from CTL(Z)/ CTL*(Z) to decision procedures. In Guillermo A. Pérez and Jean-François Raskin, editors, 34th International Conference on Concurrency Theory, CONCUR 2023, September 18-23, 2023, Antwerp, Belgium, volume 279 of LIPIcs, pages 29:1–29:18. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2023. doi:10.4230/LIPIcs.CONCUR.2023.29.
  • [9] Stéphane Demri and Deepak D’Souza. An automata-theoretic approach to constraint LTL. Information and Computation, 205(3):380–415, 2007. doi:10.1016/j.ic.2006.09.006.
  • [10] Léo Exibard, Emmanuel Filiot, and Ayrat Khalimov. Church synthesis on register automata over linearly ordered data domains. Formal Methods Syst. Des., 61(2):290–337, 2022. doi:10.1007/S10703-023-00435-W.
  • [11] Léo Exibard, Emmanuel Filiot, and Pierre-Alain Reynier. Synthesis of data word transducers. In Wan J. Fokkink and Rob van Glabbeek, editors, 30th International Conference on Concurrency Theory, CONCUR 2019, August 27-30, 2019, Amsterdam, the Netherlands, volume 140 of LIPIcs, pages 24:1–24:15. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2019. doi:10.4230/LIPIcs.CONCUR.2019.24.
  • [12] Léo Exibard, Emmanuel Filiot, and Pierre-Alain Reynier. Synthesis of data word transducers. Log. Methods Comput. Sci., 17(1), 2021. URL: https://lmcs.episciences.org/7279.
  • [13] Emmanuel Filiot, Naiyong Jin, and Jean-François Raskin. Antichains and compositional algorithms for LTL synthesis. Formal Methods Syst. Des., 39(3):261–296, 2011. doi:10.1007/S10703-011-0115-3.
  • [14] Sabína Gulcíková and Ondrej Lengál. Register set automata (technical report). CoRR, abs/2205.12114, 2022. doi:10.48550/arXiv.2205.12114.
  • [15] Swen Jacobs, Guillermo A. Pérez, Remco Abraham, Véronique Bruyère, Michaël Cadilhac, Maximilien Colange, Charly Delfosse, Tom van Dijk, Alexandre Duret-Lutz, Peter Faymonville, Bernd Finkbeiner, Ayrat Khalimov, Felix Klein, Michael Luttenberger, Klara J. Meyer, Thibaud Michaud, Adrien Pommellet, Florian Renkin, Philipp Schlehuber-Caissier, Mouhammad Sakr, Salomon Sickert, Gaëtan Staquet, Clément Tamines, Leander Tentrup, and Adam Walker. The reactive synthesis competition (SYNTCOMP): 2018-2021. Int. J. Softw. Tools Technol. Transf., 26(5):551–567, 2024. doi:10.1007/S10009-024-00754-1.
  • [16] Ayrat Khalimov, Emmanuel Filiot, and Léo Exibard. A generic solution to register-bounded synthesis with an application to discrete orders. CoRR, abs/2105.09978, 2021. arXiv:2105.09978.
  • [17] Ayrat Khalimov and Orna Kupferman. Register-bounded synthesis. In Wan J. Fokkink and Rob van Glabbeek, editors, 30th International Conference on Concurrency Theory, CONCUR 2019, August 27-30, 2019, Amsterdam, the Netherlands, volume 140 of LIPIcs, pages 25:1–25:16. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2019. doi:10.4230/LIPIcs.CONCUR.2019.25.
  • [18] Ayrat Khalimov, Benedikt Maderbacher, and Roderick Bloem. Bounded synthesis of register transducers. In Shuvendu K. Lahiri and Chao Wang, editors, Automated Technology for Verification and Analysis - 16th International Symposium, ATVA 2018, Los Angeles, CA, USA, October 7-10, 2018, Proceedings, volume 11138 of Lecture Notes in Computer Science, pages 494–510. Springer, 2018. doi:10.1007/978-3-030-01090-4_29.
  • [19] Orna Kupferman and Moshe Y. Vardi. Synthesis with Incomplete Information, pages 109–127. Springer Netherlands, Dordrecht, 2000. doi:10.1007/978-94-015-9586-5_6.
  • [20] Orna Kupferman and Moshe Y. Vardi. Safraless decision procedures. In 46th Annual IEEE Symposium on Foundations of Computer Science (FOCS 2005), 23-25 October 2005, Pittsburgh, PA, USA, Proceedings, pages 531–542. IEEE Computer Society, 2005. doi:10.1109/SFCS.2005.66.
  • [21] A. Pnueli and R. Rosner. On the synthesis of a reactive module. In Proceedings of the 16th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’89, pages 179–190, New York, NY, USA, 1989. Association for Computing Machinery. doi:10.1145/75277.75293.
  • [22] Luc Segoufin and Szymon Torunczyk. Automata based verification over linearly ordered data domains. In Thomas Schwentick and Christoph Dürr, editors, 28th International Symposium on Theoretical Aspects of Computer Science, STACS 2011, Dortmund, Germany, March 10-12, 2011, volume 9 of LIPIcs, pages 81–92. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2011. doi:10.4230/LIPIcs.STACS.2011.81.