Register-Bounded Synthesis from Constraint LTL
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 registers that realizes a given CLTL formula, where 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 transducerFunding:
Emmanuel Filiot: E. Filiot is research director at F.R.S.-FNRS. This work was partially funded by the FNRS/FWO Weave project T011724F.Copyright and License:
2012 ACM Subject Classification:
Theory of computation Automata over infinite objects ; Theory of computation Modal and temporal logicsEditors:
Stefano Guerrini and Barbara KönigSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
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 , which is extended by considering for any variable , copies of . The intended meaning of is to denote the content of in 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 is satisfied if, at any instant , holds the same data value as at instant . Over a set of data values , models of CLTL formulas are sequences of valuations . It is worth noting that the satisfiability of a CLTL formula depends on the data domain. For instance, is satisfiable in but not in . The formula 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 (defined as a conjunction of predicates over ), any partial valuation satisfying a sub-constraint of can be extended to a (total) valuation satisfying . For example, the constraint is satisfiable in , and any valuation of satisfying can be extended to a valuation of satisfying , e.g. by taking . While any domain and the domain satisfy the completion property, important data domains such as and do not. As an example, the partial valuation , which satisfies , cannot be extended to a valuation that satisfies .
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 , whether there exists a transducer with 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.
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.
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 , , for any finite alphabet and the prefix relation, as well as for any and 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.
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 while register automata are executed on words in , and so tuples need to be encoded as chunks of consecutive data. Having access to 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 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 where for all . We let denote its length and for , we let . Similarly, if is an infinite word, we let be the infinite suffix starting at position .
Data.
We define a data domain as a tuple , where is an infinite set whose elements are called data, is a finite set of predicates (relations over of any arity) and 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 (where is arbitrary), and . Note that does not contain equality, but can be expressed as . 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 be a finite set of variables, and let be a data domain. A valuation from to is a (total) mapping from to . We extend it to by letting . We denote by the set of valuations from to . Given two valuations defined over two distinct subsets of , we let be the valuation defined on by if .
A literal over is a term of the form or its negation , with of arity and . It is satisfied by a valuation , written , if if (and for a negative literal). A constraint over is a conjunction of literals over . We often view as the set of its conjuncts. We denote by the set111Note that constraints may also use the constant symbol . This is left implicit in the notation , for the sake of readability. of constraints over . We say that a constraint is satisfiable if there exists a valuation such that for all literals . We write when this holds.
A constraint is consistent if it does not contain a literal and its negation. It is maximally consistent if it is consistent and for all predicates of arity and for all , either or its negation occurs in . For example over , the constraint is not maximally consistent, but is. We denote by the set of maximally consistent constraints over .
Completion property.
For , we define the restriction of a constraint , as the subset of literals of that use only variables in . A satisfiable constraint is completable if for any , for all such that , there exists such that for all and .
A data domain has completion property (we also say it is completable) if all satisfiable and maximally consistent constraints are completable. For example, does not meet the completion property: if we consider the constraint defined before, it is satisfiable and maximally consistent. However, the valuation such that satisfies , but we cannot find a value to map to such that . However, a slight generalization of Corollary 5.4 in [9] to handle constants yields:
Lemma 1 ([9]).
Data domains and are completable.
Data valuation words.
Let be a finite set of variables and be a data domain. A data valuation word is a sequence where each 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 , and define the set of -future variables as . A -extended valuation word is a sequence . Intuitively, is intended to be the value of at time , and therefore it is required that . This condition is enforced by the notion of compatible extended valuation words, defined as the sequences such that
We define a bijection between valuation words and their compatible -extended form, via the function defined by where for all and all , . One can show that is a bijection between valuation words and compatible -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 and . We consider given by and for all . Then is given by for all .
Constraint words.
A constraint word is a sequence of constraints over . A valuation word satisfies , written , if for all . We let . Given , we write whenever for all , (seen as sets of literals). In particular, implies .
For clarity purposes, we write for the set of constraints over instead of , the same goes for . Constraint words in are said to be of rank . The satisfiability notion is extended to constraint words of rank via the function . Formally, satisfies if satisfies , and .
CLTL.
Fix a data domain and a finite set of variables . -formulas over are defined inductively as follows. The atomic formulas of rank are terms of the form , where is a predicate of arity and . We denote this set by . -formulas of rank are inductively defined as:
A -formula is a -formula of rank for some . As usual, the Boolean connectives and can be defined from and , and we let (for some atomic formula ) and . Moreover, as for LTL formulas, we define the temporal operators globally () and eventually () by and . Finally, we may write instead of , 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 that are defined to be of size .
Semantics.
We define the semantics of by induction on formulas. Let be a formula over of rank , and . We say that satisfies , written , if the following holds (inductively):
-
if then
-
if then
-
if then or
-
if then
-
if then such that and
Given a valuation word , we say that satisfies , also written , if holds. We let .
Example 3 (Example 2 continued).
Consider . One can easily check that holds. The same holds for .
Definition 4.
A constraint automaton (CA) over is a tuple where is a finite set of states, is the maximal rank for the constraints, is a transition relation, is a set of initial states and a coloring of the states.
A run of a CA over a valuation word is a sequence of transitions such that for all , , with and . A run is accepting if the highest color seen infinitely often along the run is even. Under the non-deterministic semantics, the word 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 . We will also consider a universal semantics: in this case, a word is accepted if all runs on are accepting. An automaton is deterministic if for any two transitions of the form and such that , for all valuation , either or . 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 or , that is, (resp ). 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 to a (resp from to ). Last, the language of a CA is the set of accepted words, and is denoted .
We call syntactic automaton the automaton seen as a finite automaton over the finite alphabet of constraints of rank and let 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 whose size is exponential in the size of .
Proof.
The logic can be seen as LTL over the finite alphabet . 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).
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 and a finite output alphabet that realizes a specification , 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 such that is a finite set of states with initial state , and is a (total) transition function. The semantics of is a language, denoted , defined as the set of words such that there exists a sequence of states with and for all , .
A specification is said to be realizable if there exists a finite transducer such that . Büchi-Landweber’s Theorem states that when is -regular, the realizability problem is decidable [4]. More precisely, this problem can be solved in ExpTime when is given as a universal co-büchi automaton [20], and is 2ExpTime-c when 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 be a data domain and 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 be a finite set of elements called registers. An action over and is a tuple in where:
-
is the set of maximally consistent constraints over .
-
is the set of partial functions from to .
-
is the set of (total) functions from to .
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 the set of actions. An action word is an infinite word . We denote by the set of action words.
The semantics of an action word is a language that we now define. Assume be a sequence of valuations. We “execute” the action word on . Registers are used to store data from the input valuations in , and the actions on registers (tests and assignments) are dictated by . Registers in are all initialized with the value (valuation . Then, test is performed on . If it succeeds, registers are updated according to (giving valuation ), and the valuation is output. The execution proceeds with the new action and register valuation . This is formally captured by the following compatibility notion.
We say that a valuation word is compatible with an action word if there exists a register valuation word such that for all and for all :
-
;
-
if is defined, otherwise ;
-
.
The language of an action word is the set of valuation words compatible with . We write whenever . It is worth observing that if , then the associated register valuation word is unique.
Definition 7 (Register transducer).
A register transducer (RT for short) over is a tuple where:
-
is a finite set of registers,
-
is a finite set of variables partitioned into input variables and output variables such that ,
-
is a finite transducer, denoted .
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 . The first is more syntactic and is useful to define finite abstractions of languages defined by register transducers, and is simply defined as . The second one, over valuations of , is defined as .
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 , for some set of variables . 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 and an integer r
Output: A register transducer over and with registers, if it exists, which realizes , i.e. such that .
The decision problem associated with the synthesis problem is called the realizability problem, and only asks whether such a transducer 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 is given in unary. This is reasonable as the expected register transducer has registers, which means that the configuration of the registers is already of size .
Example 8 (Example 3 continued).
We consider again with and . 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: means that the value of is assigned to register , and means that the content of 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 and set of variables , let
be the set of satisfiable constraint words in .
Definition 9.
We say that has effective -regular satisfiability if the function which given some and returns an automaton recognizing , 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 of the transducer, which is partitioned into input actions (constraints over and ) 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 . Remember that an action is a triple where is a constraint over , is a partial function and a function. The latter two assignments induce constraints between and . It is also worth noting that the register valuation at step is the one used for the test, while the one at step is the one obtained after the assignment, which is used for producing the output. For example, the assignment implies that the next content of register is equal to the value of variable . Similarly, any output variable holds a value equal to the next content of register . Formally, for all , we let where and for all :
The latter transformation is correct in the following sense:
Lemma 11.
Let then .
Since a specification has constraints over , and a register transducer expresses properties of action words, which themselves hold constraints over and , one needs a mechanism to synchronize these two types of constraints. This is done via the following function called extension, denoted , defined for any and as
Valuations satisfying constraint words in , when restricted to variables in , satisfy both and . Using Lemma 11, we prove:
Lemma 12 (Adequation).
Let , , and such that . Then iff and .
The next lemma formalizes the reduction of synthesis from infinite to finite alphabets, and in particular to the alphabet of actions , which is finite as the set of registers is finite. In turn, a specification given by a universal coBüchi CA is translated into a specification over the alphabet . A finite transducer realizing can then be regarded as a transducer with set of registers . The specification is precisely defined to make sure that the latter register transducer satisfies . Informally, in the finite alphabet specification, an action word is considered to be correct if any constraint word such that both and are satisfiable by the same data valuation word, belongs to . Formally, the reduction is ensured by the following transfer lemma:
Lemma 13 (Transfer Lemma).
Let be a universal co-Büchi CA over and a set of registers. Let
is realizable by an RT with registers iff is realizable by an FT.
Proof.
Suppose is realized by some RT , i.e. . We show that realizes , i.e., . Let . Let such that and . By definition of , there exists , such that . By Lemma 12, and . As and , we get , and therefore . Let be a run of on . Since , we have that is a run of on . From we find that is accepting. Since this is true for all runs and has a universal acceptance condition, we finally get . So, , by definition of . Finally, we have shown that .
Suppose is realized by a finite transducer where , and . We have . The finite transducer can be seen as an -register transducer over , i.e. such that . We show that realizes , i.e. .
Let . The run of on induces an action word that we write , as well as a word of valuations such that . We have by semantics of register transducer. In particular . Remember that we want to show . Let be a run of on . We let be the constraint word induced by , by semantics of constraint word and automata . Let the maximally consistent constraint word such that (it is obtained by choosing for every literal and its negation the one that satisfies). As both and , by Lemma 12 we have . Moreover, since , we have . As , so by hypothesis. By definition of , we have . By definition of and since is universal, is accepting. As this is true for all runs of on , we get .
The next lemma states that is -regular whenever has regular satisfiability and establishes some complexity bounds on the size of the representation of .
Lemma 14.
Let be a universal co-Büchi CA with states. If has effective -regular satisfiability, then is effectively -regular: given and registers , if is recognizable by a non-deterministic parity automaton with states and colors, then is accepted by a universal co-Büchi automaton with states.
Proof sketch.
We first consider the following definitions/equalities:
As a consequence, a universal co-Büchi automaton for can be derived from one for . Let us explain how we build it. First, is recognizable by a deterministic (safety) automaton with two states. Then, the complement of roughly corresponds to the intersection of with and with the complement of . The non-deterministic parity automaton for 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 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.
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 can be constructed that has 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 .
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 , which can be recognized by a universal co-Büchi automaton whose size is exponential in , and . 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 and are completable data domains. In addition, it is easily seen that the existential first-order theory of is decidable in NP, as well as for . As a consequence of Theorem 17, we obtain:
Corollary 19.
Register-bounded synthesis from and is 2ExpTime-complete.
5 -Regularly approximable data domains
Another important setting is the data domain . As said before, it is not completable, but worse than that, its set of satisfiable constraint words 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 and . Then we look at the family of constraint words . Depending on the sequence , the constraint word will or will not be satisfiable: if has an upper bound then by picking the first value for 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 be a set of variables and . We let denote the set of ultimately periodic constraint words (or lasso-shaped word), formally .
Definition 20.
We say that is effectively -regularly approximable if there exists a computable function which associates with every , an automaton recognizing an -regular language denoted such that and .
Remark 21.
can be thought of as an over-approximation of 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 be a set of registers. Fix as given in Definition 20. We define the following language by:
Lemma 23.
is realizable (by an FT) iff is realizable (by an FT).
Proof sketch.
For the reverse direction, it is easy to verify that the inclusion entails . Thus, if there exists a FT that realizes , i.e. , then it also realizes .
To prove the direct implication, we will show that for any FT , entails . Following the lines of the proof of Lemma 14, and using the same notations, we consider the following definitions/equalities:
In addition, as is -regular, we can build a non-deterministic Büchi automaton accepting the complement of . Observe that by definition of and , the equality entails .
Let be an FT such that : there exist , , such that , and thus . Considering the product , we can exhibit a lasso shaped word such that . Property entails , hence , and thus .
Remark 24.
Observe that if is realizable a FT , is also realizable by .
Proof sketch of Theorem 22.
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 are restricted to , 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 denote some set of registers. With these choices, we denote by the set of action words such that . We will also denote by the adaptation of to the set .
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 , an automaton recognizing an -regular language denoted , such that and .
Now we can state the following result:
Proposition 26 ([16]).
Each of the following data domain is effectively AW regularly approximable:
-
: natural numbers with linear order
-
: integers with linear order
-
: tuples of integers, with pointwise linear order ( is fixed)
-
: finite words over with the prefix relation
In addition, for each of these domains, given a set of registers , the set is recognized by a non-deterministic parity automaton with states and priorities.
This follows from different results proven in [16]. First, it is shown in Section 3.2 that for all , has a witness of -regular approximability recognized by a non-deterministic parity automaton with states and priorities. Then, it is shown in Sections 4.2 and 4.3 that the other data domains reduce to . In Remark 18, it is explained why these reductions induce a construction for 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 can be recognized by a non-deterministic parity automaton with states and priorities, then can be recognized by a non-deterministic parity automaton with states and 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 () and the possibility to look at horizon with longer executions. Each step in the setting of constraint sequences will be simulated by steps in the action words setting.
Let be an effectively AW regularly approximable data domain. Let be a set of variables and . We define the following set of registers:
In particular, we have
Formally, we define a mapping from constraint sequences over to action words over (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 and . 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 is depicted on Figure 2.
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 . Then, the data are processed six by six as follows: the first three data should correspond to data seen previously (as corresponds to 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 .
We claim that this mapping fulfills the two following properties:
-
(i)
-
(ii)
We let . Property gives . Thus, entails, by monotonicity of the inverse image, . In addition, Property easily gives , which implies as expected.
Regarding complexity, one can observe that is realized by an FT with two states. As , we can build an automaton accepting by doing a wreath product between and an automaton recognizing , yielding the result, as we have .
Corollary 28.
For , 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 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 and private (hidden) inputs .
Example 29.
To illustrate this setting, consider an environment that, at each turn, outputs two public values . 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 , and and consider the following formula:
As is infinite and the way t alternates between and is arbitrary, this formula is not realizable. Indeed, for any strategy of the controller (output , resp. ), the environment can take the opposite decision (set , resp. ). However, if we assume a periodic behavior of the environment, then we obtain the following formula (here with period ):
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 rounds.
Let be a set of variables. We say that a transducer with input alphabet and output alphabet PO-realizes a specification iff , , . This yields the following decision problem:
Register-bounded Partial Observation Synthesis Problem from
Input: A formula over and an integer
Output: A register transducer over with registers that
PO-realizes , if it exists.
As the specification deals with input variables , while the transducer only reads inputs in , we need to adapt the transfer lemma. To that end, given an action word over , and an action word over , we say that is a completion of if for all , if then , with such that . We let denote the set of completions of .
Then, given a universal co-Büchi CA , we consider the following set:
We can then adapt the transfer lemma and prove:
Lemma 30 (Partial observation transfer lemma).
Let be a universal co-Büchi CA. Then is PO-realizable by a RT with registers iff 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 and 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.
