Abstract 1 Introduction 2 Timed synthesis problems 3 𝐌𝐨𝐧𝐢𝐭𝐨𝐫 is the owner 4 Lossy counter machines 5 𝐓𝐢𝐦𝐞𝐫 is both the owner and the agent 6 𝐓𝐢𝐦𝐞𝐫 is the owner but not the agent 7 Conclusion References

One-Clock Synthesis Problems

Sławomir Lasota ORCID University of Warsaw, Poland Mathieu Lehaut ORCID University of Warsaw, Poland Julie Parreaux ORCID Univ Rennes IRISA, Inria, CNRS, France Radosław Piórkowski ORCID University of Oxford, UK
Abstract

We study a generalisation of Büchi-Landweber games to the timed setting. The winning condition is specified by a non-deterministic timed automaton, and one of the players can elapse time. We perform a systematic study of synthesis problems in all variants of timed games, depending on which player’s winning condition is specified, and which player’s strategy (or controller, a finite-memory strategy) is sought.

As our main result we prove ubiquitous undecidability in all the variants, both for strategy and controller synthesis, already for winning conditions specified by one-clock automata. This strengthens and generalises previously known undecidability results. We also fully characterise those cases where finite memory is sufficient to win, namely existence of a strategy implies existence of a controller.

All our results are stated in the timed setting, while analogous results hold in the data setting where one-clock automata are replaced by one-register ones.

Keywords and phrases:
timed automata, register automata, Büchi-Landweber games, Church synthesis problem, reactive synthesis problem
Funding:
Sławomir Lasota: Partially supported by ERC grant INFSYS, agreement no. 950398 and by the NCN grant 2024/55/B/ST6/01674.
Mathieu Lehaut: Partially supported by the NCN grant 2021/41/B/ST6/00535.
Julie Parreaux: Partially supported by the ANR project BisoUS (ANR-22-CE48-0012).
Copyright and License:
[Uncaptioned image] © Sławomir Lasota, Mathieu Lehaut, Julie Parreaux, and Radosław Piórkowski; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Timed and hybrid models
; Theory of computation Automata over infinite objects ; Theory of computation Quantitative automata ; Theory of computation Logic and verification
Related Version:
Extended Version: https://arxiv.org/abs/2601.04902 [26]
Editors:
Meena Mahajan, Florin Manea, Annabelle McIver, and Nguyễn Kim Thắng

1 Introduction

Nondeterministic timed automata (NTA) are one of the most widespread models of real-time reactive systems with a huge literature. They consist of finite automata extended with real-valued clocks which can be reset and compared by inequality constraints. Since the seminal paper showing PSpace-completeness of the reachability problem [2], NTA found their way to the automatic verification of timed systems, eventually leading to mature tools such as UPPAAL [5], UPPAAL Tiga (timed games) [11], and PRISM (probabilistic timed automata) [24]. One of the restrictions of this model is the lack of determinisation and closure under complementation of NTA languages, as well as undecidability of universality/inclusion problems [2]. One recovers decidability for a restricted subclass of NTA with one clock (NTA1) [31], and even for alternating timed automata with one clock [25].

Deterministic timed automata (DTA) form a strict subclass of NTA where the next configuration is uniquely determined by the current one and the timed input symbol. This class enjoys stronger properties, such as decidable inclusion problems and complementability [2], and it is used in several applications, such as test generation [30], fault diagnosis [8], learning [37, 36]; timed games [3, 22, 9], and recognisability of timed languages [27].

Timed games and synthesis problems.

There are many variants of timed games in the literature, depending on whether the players must enforce a non-Zeno play, who controls the elapse of time, concurrent actions, winning conditions, etc. [3, 22, 9, 38, 28, 4, 16, 14, 33, 21]. Following prior works [13, 32], we consider asymmetric (only one player can elapse time), infinite-duration turn-based games that can be considered as timed generalisation of Büchi-Landweber games [10]. There are two players, called Timer and Monitor, who play taking turns in a strictly alternating fashion. In the ith round, Timer chooses a letter ai from a finite alphabet along with a nonnegative rational time delay τi, and Monitor responds with a letter bi from a finite alphabet. Together, the players generate an infinite play π=(a1,b1,τ1)(a2,b2,τ2). The winning set of either Timer or Monitor is specified by a nondeterministic timed automaton. For comparison, the easier special case where the winning set is given by a deterministic or history deterministic timed automaton has been previously studied (e.g., [16, 7]). Given our undecidability results, we do not consider a more general symmetric variant in which both players may elapse time.

We investigate the timed reactive synthesis problem, which asks if a given player has a strategy ensuring that every play that conforms to the strategy is winning for that player. We distinguish four variants of this problem, depending on which player’s winning set is specified (note the lack of complement closure of NTA languages) and for which player the winning strategy is sought. We also study the timed Church synthesis problem, which asks if a given player has a winning finite-memory strategy (controller). For Monitor, a controller is a DTA whose transitions output letters from Monitor’s alphabet; for Timer, it is a DFA whose transitions output letters from Timer’s alphabet along with time delays.

This study of timed generalisations of Büchi–Landweber games was initiated in [13] in the setting where Timer’s winning set is specified by an NTA, and the goal is to synthesise a controller for Monitor. The main result of that work is the decidability of the resource-bounded timed Church synthesis problem, in which one seeks a controller using at most k clocks, for a fixed k. Subsequently, [32] established the undecidability of the unrestricted (resource-unbounded) version, even when Timer’s winning set is given by a two-clock NTA and Monitor’s controller is sought. The decidability of this problem for NTA1 (one-clock NTA) winning sets remained open, as did the status of other variants and of timed reactive synthesis. The present paper resolves all of these open questions in the negative.

Contribution.

Given as many as eight different decision problems, one could expect a complex decidability/complexity landscape. As our main technical contribution, we show that this is not the case: all eight decision problems are undecidable already in the simplest case where the winning sets are specified by NTA1. These undecidability results significantly strengthen and generalise previously known lower bounds. They also demonstrate that restricting to NTA1 does not lead to recovery of decidability of synthesis (game solving) problems, similarly as restricting to NTA1 does not yield decidability of language universality and related problems over infinite words (as opposed to universality and related problems for NTA1 languages of finite timed words [31]).

Proving undecidability for eight problems required four reductions. The cases where Monitor’s winning set is specified by an NTA1 are easily shown undecidable by reductions from the NTA1 universality and sampled universality problems [1, 25]. Undecidability proofs in the other case, where Timer’s winning set is specified, constitute the technical core of the paper, and proceed by reductions from two undecidable problems for lossy counter machines: boundedness and repeated reachability [29, 34].

Finally, we also address the question of when finite memory is sufficient to win, that is when existence of a strategy implies existence of a controller. On one hand, we prove this finite-memory property for the player whose winning set is specified: for all NTA1 specifications if this player is Monitor, and only for the restricted case of reachability NTA1 specifications if this player is Timer. On the other hand, we demonstrate that the finite-memory property fails in all other cases: it is not satisfied in general by Timer when his winning set is specified; and the property fails for both Timer and Monitor when the opponent’s winning set is specified, even in case of reachability NTA1 specifications.

It is well known that NTA exhibit close similarity to nondeterministic register automata (NRA), known also as finite-memory automata [23] (see e.g. [20] for a formal connection between the models). Register automata input data values (in place of timestamps) and use registers (in place of clocks) to store data values ([35] is an excellent survey of automata models for data setting). For many language-related problems, like emptiness (reachability), universality or inclusion, register automata admit exactly the same (un)decidability results [15] that are known for timed automata [31, 25]. Language closure properties are also analogous in both settings. Confirming these deep similarities further, [32] proves undecidability of the timed Church synthesis problem for winning sets specified by NTA with two clocks, as well as undecidability of the data Church synthesis for winning sets specified by NRA with two registers. Similar studies of data generalisation of Büchi-Landweber games were also conducted independently in [17] and works cited therein [19, 18]. All our undecidability results transfer from the timed to the data setting: undecidability holds for all the eight variants of data reactive/Church synthesis problems, already when winning sets are specified by NRA1 (NRA with one register). (These further results exceed the scope of the present paper and are planned to be included in the forthcoming full version of the paper.)

Outline.

We start by defining the setting of timed games and the synthesis problems (Section 2). We also discuss the finite-memory property there. Section 3 is a warm-up where we deal with the easy cases of synthesis problems (Monitor’s winning set is specified). Then in Section 4 we define the undecidable problems for lossy counter machines, to be used in the main technical part of the paper, Sections 5 and 6. In the two latter sections we provide the undecidability proofs in the hard case where Timer’s winning set is specified. The last section contains final remarks. All omitted proofs can be found in the long version of this paper [26].

2 Timed synthesis problems

Let 0 and >0 be nonnegative rational numbers, and positive integers, respectively. We let 𝒳 be a finite set of variables called clocks. A valuation is a mapping ν:𝒳0 (we prefer to use rational values instead of real ones). For a valuation ν, a delay τ0 and a subset Y𝒳 of clocks, we define the valuation ν+τ as (ν+τ)(x)=ν(x)+τ, for all x𝒳, and the valuation ν[Y0] as (ν[Y0])(x)=0 if xY , and (ν[Y0])(x)=ν(x) otherwise. A guard on clocks 𝒳 is a conjunction of atomic constraints of the form xc, where x𝒳, {,<,=,>,} and c. An empty guard is denoted by . A valuation ν satisfies an atomic constraint xc if ν(x)c. The satisfaction relation is extended to all guards g naturally, and denoted by νg. We let Guard(𝒳) denote the set of guards over 𝒳.

Let Σ be a finite alphabet. By a timed word over Σ we mean a finite or infinite sequence w=(a1,t1)(a2,t2)(Σ×0)ω where the timestamps ti are monotone: t1t2t3. Pairs (a,t)Σ×0 are sometimes called timed letters. Unless stated otherwise, we work with infinite timed words. The sequence of timestamps is determined uniquely by the sequence of delays τ1,τ2,0, where τi=titi1 (assuming t0=0). The untiming of w, denoted by untime(w), is the word a1a2Σω obtained by removing timestamps. A timed language is any set of timed words over a fixed alphabet Σ.

Timed automata.

A non-deterministic timed automaton (NTA) 𝒜=L,𝒳,Σ,Li,Lf,Δ consists of L, a finite set of locations with Li,LfL denoting the sets of initial and accepting locations, respectively; 𝒳, a finite set of clocks; Σ, a finite alphabet; and ΔL×Σ×Guard(𝒳)×2𝒳×L, a finite set of transitions. A transition (,a,g,Y,)Δ is written as a,g,Y, omitting g and Y whenever they are or , respectively. A set A in place of a specifies a set of transitions. The semantics of 𝒜NTA is a timed transition system 𝒜=(Q,QI,) such that: Q=L×(0)𝒳 is the set of configurations (i.e., location-valuation pairs), QI=Li×{0𝒳} is the set of initial configurations, and is the set of edges. We have (,ν)δ,τ(,ν) if and only if δ=(,a,g,Y,)Δ is a transition of 𝒜 such that ν+τg, and ν=(ν+τ)[Y0]. A run ρ in 𝒜 is a sequence of edges ρ=(1,ν1)δ1,τ1(2,ν2)δ2,τ2 of 𝒜 such that 1Li. A timed word w=(a1,t1)(a1,t2) over Σ labels a run ρ of 𝒜 when, for all i>0, δi=(i,ai,g,Y,i+1) and ti=j=1iτj. We adopt Büchi acceptance: a run is accepting if is visits an accepting location infinitely often, in which case we say that the word that labels that run is accepted by 𝒜. The language of 𝒜NTA, denoted (𝒜), is the set of timed words accepted by 𝒜.

We also use reachability acceptance, where a run is accepting once it visits an accepting location at least once (like in the setting of finite words). With this acceptance, the language L of infinite timed words accepted by an NTA is determined uniquely by the language L of finite timed words having a run ending in an accepting location. We write L=Reach(L). So defined reachability NTA can be seen as a (strict) subclass of NTA, denoted as reach-NTA.

Apart from reach-NTA, we consider also other subclasses of NTA. For instance NTAk consists of nondeterministic timed automata with a fixed number k=|𝒳| of clocks. DTA is the class of deterministic timed automata, where |Li|=1 and for all locations L and letters aΣ, the guards g appearing in transitions of the form (,a,g,_,_) form a partition of 0|𝒳|. We also consider a superclass NTAres of 1-resetting timed automata (defined in Section 6), an extension by a limited form of ε-transitions that reset a clock every time it equals 1. The class of NTA with ε-transition is strictly more expressive than NTA [6]; we discuss this choice at the end of this section, and in Sections 6 and 7.

We combine the notation for sub- and superclasses and write reach-NTA1, reach-NTA1res, for the one-clock automata from reach-NTA, and for the 1-resetting extension thereof.

Given L a timed language, we denote by L^ its complement. The universality problem asks, given 𝒜, if (𝒜)^=. This problem is known to be undecidable for NTA1 [25].

Timed games.

In this paper we consider turn-based games between two players called here Timer and Monitor, where a winning condition is given by an NTA1 (resp. NTA1res).

Definition 1.

A timed game 𝒢=T,M,𝒜,Owner,Agent consists of finite alphabets T,M of Timer and Monitor, respectively, 𝒜NTA1 (resp. 𝒜NTA1res) a timed automaton over the product alphabet T×M whose language (𝒜) defines the winning condition, and Owner,Agent{Timer,Monitor}.

Intuitively, Owner specifies the player who wins a play if it belongs to (𝒜). As NTA are not stable by complement [2], the choice of the owner of the winning condition is not innocuous, and the winning condition of the opponent may no longer be an NTA language. We investigate decision problems asking about existence of a winning strategy of Agent. Again, the choice of Agent is not innocuous, as we do not know if the games studied by us are determined. In view of our undecidability results, we do not consider a symmetric variant of timed games where both players would submit time delays, as this variant would generalise the above one.

A timed game proceeds in rounds. Each ith round (i>0) starts by Timer’s choice of aiT and a delay τi0, followed by a response biM of Monitor. This results in a play which is a timed word (a1,b1,t1)(a2,b2,t2) over the alphabet T×M, where ti=j=1iτj. Owner wins the play if it belongs to (𝒜), otherwise its opponent wins.

A strategy for a player is a function that gives its next move as a function of the moves of its opponent up to now. Formally, a strategy for Timer is a function σT:MT×0 whereas a strategy for Monitor is a function σM:(T×0)+M. We say that a play w=(a1,b1,t1)(a2,b2,t2) conforms to Timer’s strategy σT (resp. Monitor’s strategy σM) if all (timed) letters in it conform to the strategy’s output: (ai,τi)=σT(b1bi1) for all i>0 (resp., bi=σM((a1,t1)(ai,ti)) for all i>0). A strategy is winning for a player if and only if every play w that conforms to it is winning for that player (i.e., w(𝒜) if and only if this player is the owner).

A controller is a finite-memory strategy represented by a DTA with outputs. Specifically, a Monitor’s controller is a DTA with outputs from M, whose transitions are of the form δ=(,a,g,Y,,b), where bM is the output. The controller induces the strategy σM that maps w=(a1,t1)(ai,ti) to the last output of the run over w. For Timer, the notion of controller is more tricky since it needs to produce timestamps. We let Timer’s controllers output pairs (a,τ)T×0, where τ is interpreted as the next delay. Formally, it is defined as a DFA (DTA with no clocks) with outputs from T×0, whose transitions are of the form δ=(,b,,a,τ), where (a,τ)T×0 is the output, additionally equipped with an initial move (a1,τ1)T×0. Note the apparent restriction of Timer’s controllers, compared to general strategies, namely the set of delays used by a controller is finite. A controller induces the strategy σT that maps the empty word to (a1,τ1), and a nonempty word b1bi to the last output of the run over w.

Timed synthesis problems.

We investigate decision problems to determine whether Agent wins, i.e., whether Agent has a winning strategy. We distinguish four cases, depending on the choice of Owner{Timer,Monitor} and Agent{Timer,Monitor}. Furthermore, in each of the four cases we consider two distinct decision problems: given a timed game,

  • the timed reactive synthesis asks if Agent has a winning strategy;

  • the timed Church synthesis asks if Agent has a winning controller.

Table 1: Reactive vs. Church synthesis.
Agent=Timer Agent=Monitor
Owner=Timer coincide for 𝒜reach-NTA1, but not for all 𝒜NTA1 do not coincide, even for 𝒜reach-NTA1
Owner=Monitor do not coincide, even for 𝒜reach-NTA1 coincide for all 𝒜NTA1

The problems coincide in some cases (see Table 1 for a summary). Most importantly, if Monitor is both the owner of the winning condition, and also the agent of the synthesis problem, then whenever it has a winning strategy it also has a controller. Likewise for Timer, but only in the restricted case of reach-NTA1 winning conditions:

Theorem 2.

The two synthesis problems coincide, meaning that if Agent has a winning strategy then it has a winning controller, in the following cases:

  1. 1.

    Owner=Agent=Timer and 𝒜 reach-NTA1.

  2. 2.

    Owner=Agent=Monitor and 𝒜NTA1.

In all the remaining cases the two synthesis problems do not coincide, namely existence of a winning strategy does not imply existence of a controller: first, when Timer is both the owner of the winning condition, and also the agent of the synthesis problem, but the winning condition is an arbitrary NTA1 language; second, when the owner is different from the agent, even in the case of reachability NTA1 winning conditions:

Theorem 3.

The two synthesis problems may not coincide in the following cases:

  1. 1.

    OwnerAgent and 𝒜 reach-NTA1.

  2. 2.

    Owner=Agent=Timer and 𝒜NTA1.

Proof.

  1. 1.

    We start with the case Owner=Timer and Agent=Monitor. Let Timer’s alphabet be trivial (singleton), and hence omitted below; Timer thus essentially chooses only timestamps. Let Monitor’s alphabet M={a,b}, and let Timer’s winning condition contain timed words containing some letter (a or b) at distance 1, that is timed words that contain both (a,t) and (a,t+1), or both (b,t) and (b,t+1), for some t0. The condition is readily seen to be recognised by a reachability NTA1. Monitor has a winning strategy in this game: it wins by always playing the same letter (say a) unless timestamp t1 appeared earlier in the play, in which case it plays the opposite of the letter that was played there. On the other hand, Monitor has no winning controller, as winning requires storing unboundedly many different timestamps (together with letters used at them).

    For the case Owner=Monitor and Agent=Timer, we choose both alphabets to be trivial (and hence omitted below). The play is thus just a monotonic sequence t1t2 of timestamps, chosen by Timer. Let Monitor’s winning condition consist of those sequences which either exceed 1 at some point (ti>1 for some i>0), or repeat a timestamp (ti=ti+1 for some i>0). Both conditions, and hence their union, are recognised by reachability NTA1. Furthermore, Timer has a winning strategy by producing a Zeno word bounded by 1, but Timer has no winning controller. Indeed, in order to win, Timer should use strictly positive delays only, and therefore, since every controller uses only finitely many different delays, the bound 1 is inevitably exceeded.

  2. 2.

    Consider the case Owner=Agent=Timer. We use the same idea as in the previous case: Timer can win only by producing a Zeno word. Let Timer’s alphabet be trivial (hence omitted below); Timer thus essentially chooses only timestamps. Let Monitor’s alphabet be M={,}, and let Timer’s winning condition be the union of two sets: the timed words w=(b1,t1)(b2,t2)(M×0)ω that never exceed 1 labelled exclusively by , i.e., ti<1 and bi= for all i>0; and the timed words such that for some i>0 we have ti<ti+1, b1==bi= and bi+1=. Timer has a winning strategy by producing a strictly monotonic Zeno word bounded by 1. On the other hand a violation of strict monotonicity, namely the equality ti=ti+1, is punished by Monitor playing bi+1=. Therefore, Timer has no winning controller for the same reason as in the previous case.

Summary of results.

As our main contribution, we obtain undecidability in all cases of both the reactive and Church synthesis problems, even under the very restricted case where the timed winning condition is specified by an NTA1 (or by a reach-NTA1res in one of the variants, see Table 2 for a summary). Our reductions in the case of the reactive synthesis problem work uniformly, regardless of which player is the Agent. Therefore Table 2 has six rather than eight entries. These six cases require four different reductions, and hence each table entry indicates the problem we reduce from. When Timer is the owner of the winning condition, some undecidable problems for lossy counter machines (LCM) turn out suitable for reductions, namely repeated reachability and boundedness [34] (these results are the core technical part); and when Monitor is the owner, we use two variants of universality of NTA1 languages (these reductions are comparatively simpler).

Table 2: Summary of our undecidability results.
Reactive synthesis Church synthesis
any Agent Agent=Timer Agent=Monitor
Owner = Timer 𝒜NTA1 LCM repeated reach. (Theorem 7, Section 5) 𝒜NTA1 LCM repeated reach. (Theorem 7, Section 5) 𝒜reach-NTA1res LCM boundedness (Theorem 11, Section 6)
Owner = Monitor 𝒜NTA1 NTA1 universality (Theorem 4, Section 3) 𝒜NTA1 NTA1 sampled universality (Theorem 6, Section 3) 𝒜NTA1 NTA1 universality (Theorem 4, Section 3)

The table specifies the class of winning conditions 𝒜 for which we prove undecidability: 𝒜NTA1, except for one exception where we need 1-resetting reachability NTA1, a slight extension of reachability NTA1 that uses a limited form of ε-transitions that reset the clock whenever it reaches value 1. We believe that resorting to NTA1res does not weaken our results, for the following two reasons: first, while NTA1 with ε-transitions correspond to nondeterministic one-register automata (NRA1) with guessing (see [20]), NTA1res still correspond to NRA1 without guessing; second, all our undecidability results translate from the timed setting to the data setting, where the winning sets are specified by NRA1 without guessing.

3 𝐌𝐨𝐧𝐢𝐭𝐨𝐫 is the owner

As a warm-up, we prove undecidability of both synthesis problems in the case where Monitor owns the winning condition, by reduction from two variants of the universality problem for NTA1 (shown undecidable in [25] and [1]).

Theorem 4.

When Owner=Monitor, the following problems are undecidable:

  1. 1.

    the timed reactive synthesis, irrespectively of Agent;

  2. 2.

    the timed Church synthesis, when Agent=Monitor.

Proof.

We reduce from the NTA1 universality problem (does the language of a given 𝒜NTA1 contain all infinite timed words?) [25]. Given an NTA1 𝒜 over alphabet Σ, we construct a timed game where Monitor’s alphabet is the singleton {}, Timer’s alphabet is Σ, and the winning condition of Monitor is (𝒜) (ignoring the letters “”). Therefore, Timer wins if it produces a timed word over Σ that is not in (𝒜). Thus, Timer has a winning strategy if (𝒜) does not contain all timed words, and Monitor has a winning controller otherwise (the trivial memoryless one that keeps emitting “”).

 Remark 5.

The reduction does not guarantee the existence of a controller for Timer, because Timer’s strategy may need to produce an infinite timed word. However, in the case of reach-NTA1 the strategy only needs to produce a finite prefix, and therefore we obtain HyperAckermann-hardness of both synthesis problems, regardless of Owner and Agent.

For undecidability of the timed Church synthesis problem when Agent=Timer, we turn to the sampled universality problem, a variant that assumes the sampled semantics δ(_) of timed automata. Given δ>0, we say that a timed word has granularity δ if all its timestamps are multiplicities of δ, and define δ(𝒜)(𝒜) as the language of all timed words of granularity δ in (𝒜). Given an NTA 𝒜, the sampled universality problem asks if for all δ>0, the language δ(𝒜) contains all timed words of granularity δ. The problem (called universal sampled universality in [1]) is known to be undecidable for NTA1 [1, Thm. 3].

Theorem 6.

The timed Church synthesis problem is undecidable when Owner=Monitor and Agent=Timer.

Proof.

We proceed similarly as in Theorem 4, but reduce from the NTA1 sampled universality problem. Given an NTA1𝒜 over alphabet Σ, we construct the same timed game as in Theorem 4: M={}, T=Σ, and the winning condition of Monitor is (𝒜) (ignoring “”).

If Timer has a winning controller 𝒞 in this game, we take an arbitrary rational δ>0 such that all positive delays used by 𝒞 are multiplicities of δ, and deduce that any infinite timed word output by 𝒞 has granularity δ and is not in δ(𝒜).

In the opposite direction, suppose a timed word w of granularity δ is not accepted by 𝒜. Assume, w.l.o.g., that 𝒜 has a run labeled by w. We build a word w whose run visits only finitely many different configurations. Let M be the maximal constant appearing in the guards of 𝒜. If the valuations in the run labeled by w never exceed M, i.e. if 𝒜 always resets the clock when it goes over M, then we take w=w and we are done because every valuation is always a multiplicity of δ and there are finitely many thereof between 0 and M. Otherwise, let tM>M be the first valuation in the run that exceeds M. We obtain w by modifying w so that every time the valuation in the run is over M, it is exactly tM (using repeating timestamps if necessary), but the run is unchanged when the valuation is at most M. Since valuations over M are indistinguishable by 𝒜, w is not accepted by 𝒜. Therefore no accepting locations appear on the run from some point on, and hence the run necessarily forms some loop without accepting locations on it. We replace w by the timed word w′′ obtained by letting 𝒜 repeat the loop infinitely. Like w, the word w′′ has granularity δ and is not in δ(𝒜), but w′′ is additionally ultimately periodic when seen as a sequence of letter-delay pairs w′′=(a1,τ1)(a2,τ2). In consequence, Timer has a winning controller that produces w′′.

4 Lossy counter machines

We now introduce the model to be used in the forthcoming reductions. A lossy counter machine (LCM) is a tuple =𝒞,S,s0,, where 𝒞 is a finite set of counters, S is a finite set of control locations, s0S is the initial control location, and is a finite set of instructions I=(s,op,s), where s,sS and op{c++,c,c0?c𝒞} is the operation of increment, decrement, or zero test on some counter c𝒞. We let incc,decc,ztc denote the sets of instructions incrementing, decrementing, and zero testing counter c, respectively. We also let c=inccdeccztc be the set of all instructions affecting c.

A configuration of an LCM is a pair (s,ν)S×𝒞 where s is a control location, and ν is a counter valuation. Given counter valuations μ,ν𝒞, we write μν whenever μ(c)ν(c) for every c𝒞. We define two equivalent semantics: the lossy semantics, and the free-test one (corresponding, intuitively, to postponing the losses until zero tests). A run of an LCM under either semantics is a maximal (finite or infinite) sequence of configurations starting from the initial configuration (s0,ν0), where ν0=0𝒞, such that for every two consecutive configurations (s,ν) and (s,ν) there exists an instruction I=(s,op,s) such that (s,ν)𝐼(s,ν). Under the lossy semantics, (s,ν)𝐼(s,ν) holds if

  1. 1.

    Iincc and νν[c++], where ν[c++] is as ν except that c is incremented by 1; or

  2. 2.

    Idecc and νν[c], where ν[c] is as ν except that c is decremented by 1; or

  3. 3.

    Iztc, ν(c)=0, and νν.

Under the free-test semantics, (s,ν)𝐼(s,ν) holds if

  1. 1.

    Iincc and ν=ν[c++]; or

  2. 2.

    Idecc and ν=ν[c]; or

  3. 3.

    Iztc and ν=ν[c0] is as ν except that c is set to 0.

One can see the free-test semantics as delaying losses until the next zero test, at which point the counter loses its value entirely before proceeding to the next configuration.

We assume, w.l.o.g., that is deterministic, i.e. that for any configuration (s,ν) there exists at most one instruction I leading to another configuration. Under the free-test semantics, this implies that a given configuration only has at most one successor. Under the lossy semantics, there may be a number of successor configurations differing only on the counter valuations (how much is lost for each counter after the instruction). Let Runs denote the runs of . We assume, w.l.o.g., that they are all infinite.

The boundedness problem asks whether all runs of a given LCM visit only finitely many configurations, or equivalently whether all runs of are bounded in their valuations. The repeated reachability problem asks if has an infinite run visiting infinitely often a given control location sS. Both problems are known to be undecidable already for 4 counters [29, Thms. 10,12] (an excellent survey is [34]), and the choice of semantics is irrelevant.

5 𝐓𝐢𝐦𝐞𝐫 is both the owner and the agent

In this section we prove undecidability of both synthesis problems when Timer owns the winning condition, except when Agent=Monitor (investigated in the next section).

Theorem 7.

When Owner=Timer, the following problems are undecidable:

  • the timed reactive synthesis, irrespectively of Agent;

  • the timed Church synthesis, when Agent=Timer.

(Note the symmetry of Theorems 7 and 4 along the exchange of roles of Timer and Monitor.)

In the rest of this section we prove Theorem 7 by providing a reduction from the repeated reachability problem for LCM. To this aim we fix a lossy counter machine =𝒞,S,s0, with four counters 𝒞={c1,c2,c3,c4} and a location sS, and construct a timed game with the property that Timer has a winning controller if repeatedly reaches s, and Monitor has a winning strategy otherwise (see Lemma 10). In the proof we assume lossy semantics of . Our approach is inspired by the proof of [32, Thm. 8.4] (we note however substantial differences: timed Church synthesis was considered there with Timer’s winning condition specified by NTA2 while we restrict ourselves to NTA1, and moreover, there Monitor’s controller was sought, while we seek Timer’s one).

The idea of reduction.

In the course of the game, Timer is tasked with producing an increasingly longer timed word supposed to be an encoding of a run of . However, Timer may also cheat and produce a timed word which contains an error and therefore is not a correct run encoding. We distinguish four types of errors. In order to prevent Timer from cheating, Monitor verifies if the encoding proposed by Timer is correct, and if it is not, Monitor has to declare the detected type of error correctly, and immediately, that is in the same round the error occurs. Therefore one way of winning by Timer is to see s infinitely often while seeing no error declared by Monitor (using cheating or not); or to mislead Monitor about the correctness of encoding by cheating and either seeing no immediate error declaration, or seeing an error declaration of wrong type. On the other hand, when Monitor manages to declare immediately the correct type of error, the play is winning for it irrespectively of the continuation.

Encoding of runs of 𝓜.

A central ingredient of our reduction is the encoding of runs of as timed words. Let Σ=𝒞. We first introduce the valuation encoding. For a valuation ν=(v1,v2,v3,v4)𝒞 define enc(ν)=c1v1c2v2c3v3c4v4, a finite untimed word consisting of four segments. The set of all such encodings is ValEnc=c1c2c3c4.

Next, we define the run encoding. The function enc:RunsΣω maps a run ρ=(s0,ν0)I1(s1,ν1)I2 to the infinite untimed word enc(ρ)=enc(ν0)I1enc(ν1)I2. Let RunEnc={enc(ρ)ρRuns} be the set of valid untimed encodings.

Figure 1: Illustration of the encoding of runs used in this section.

Intuitively, we exploit the timed structure of a word to enforce the correctness of run encodings (see Lemma 8). To this end, we define a timed language RunEnc𝕋. We specify it using an untimed ω-regular language Reg which enforces the structural shape of runs of , and timed languages A𝕋, B𝕋 and C𝕋, which impose additional timed properties. Let Reg consist of all (untimed) words wΣω that satisfy the following regular conditions:

Block structure:

w is an infinite interleaving of valuation encodings and instructions, i.e., w is of the form w=enc(ν0)I1enc(ν1)I2(ValEnc)ω with I1 starting from s0.

Instruction compatibility:

Each instruction’s target state is the source state of the next one, i.e., for every infix Ii𝒞Ii+1 we have Ii=(_,_,s) and Ii+1=(s,_,_) for some s.

Consistency with zero tests:

every infix Iienc(νi)Ii+1 of w with Ii+1ztc verifies enc(νi)(𝒞{c}), i.e., the symbol c does not appear in enc(νi).

Clearly RegRunEnc. Let Reg𝕋=untime1(Reg) contain all timed words whose untiming is in Reg. We define RunEnc𝕋 as the intersection of four timed languages:

RunEnc𝕋=Reg𝕋A𝕋B𝕋C𝕋(Σ×0)ω

where A𝕋, B𝕋 and C𝕋 are languages of infinite timed words w satisfying the conditions given below. For simplicity, we define the condition for C𝕋 (the most intricate), assuming that wL=Reg𝕋A𝕋B𝕋, as it is irrelevant how it treats words outside L.

Strict monotonicity (A𝕋):

w is strictly monotonic (no timestamp repeats).

Blocks align to unit intervals (B𝕋):

symbols from appear in w with consecutive integer timestamps starting from 1.

Well-alignment of valuations encodings (C𝕋):

every maximal infix of w of the form enc(νi)Iienc(νi+1) verifies the following conditions, for all counters c𝒞:

  1. 1.

    if Iideccincc then νi+1(c)νi(c), and a timed letter (c,t) appears in enc(νi+1) only if (c,t1) appears in enc(νi);

  2. 2.

    if Iiincc, then νi+1(c)νi(c)+1, and the encoding verifies the case 1 except for a (potential) one extra letter c appearing in the beginning of the c-segment in enc(νi+1) within less than one unit of time from the first symbol c of enc(νi).

  3. 3.

    if Iidecc, then νi+1(c)νi(c)1, and the encoding verifies the case 1 except for the first letter c appearing in enc(νi) which can not appear in enc(νi+1).

According to the definition of C𝕋, every increment (resp. decrement) of a counter c results in adding (resp. removing) one letter c in the beginning of the c-segment. An illustration is provided in Figure 1.

Lemma 8.

RunEnc={untime(w)wRunEnc𝕋}.

The timed game.

We define the timed synthesis game where Timer’s actions are T=Σ and Monitor’s actions are M={,R,A,B,C}. For the definition of the winning condition it is crucial that all the languages Reg𝕋,A𝕋,B𝕋 and C𝕋 can be defined locally: an infinite word w belongs to Reg𝕋 exactly when all (finite) prefixes of w belong to a certain local language Reg𝕋,(Σ×0) of finite timed words, which is moreover recognised by a reach-NTA1; and likewise for the A𝕋, B𝕋 and C𝕋. Specifically:

  • Reg𝕋,: the finite prefix satisfies the defining conditions of Reg.

  • A𝕋,: the last two timestamps are nonequal (or the word is of length 1, the border case).

  • B𝕋,: if the last letter is from , then no appears in the last open unit interval, and appears exactly one time unit before the last timestamp; and if the last letter is not from , some occurs less that one unit before the last timestamp. (We omit the border case.)

  • C𝕋,: the last timed letter of the word, if it is (c,t)𝒞×0, appears also one unit of time before as (c,t1), except when it is the first letter in the c-segment and the last instruction is an increment of c. Moreover, when (c,t) is the first letter in the c-segment and the last instruction is a decrement of c, the language C𝕋, requires that the first letter in the previous c-segment was removed, i.e., its timestamp is strictly smaller that t1. As before, we conveniently assume that the word is in L=Reg𝕋,A𝕋,B𝕋,, as it is irrelevant which words from L^=Reg𝕋,^A𝕋,^B𝕋,^ belong to C𝕋,.

Note that C𝕋, is the most difficult one, and the only one for which we will need non-determinism.

The winning condition is also defined mostly locally, by a combination of restrictions imposed on Timer’s or Monitor’s moves. To this aim we use the projections of finite words, projM:(T×M×0)M and projT,𝕋:(T×M×0)(T×0), as well as their inverses projM1 and projT,𝕋1. We define Timer’s winning set as

W=Reach(V𝕋)(projT,𝕋1(Inf(s))projM1({}ω))

where Inf(s) is the (untimed) regular language “the location s appears infinitely often”, Reach(V𝕋) stands for the language of those infinite timed words which have some prefix in V𝕋, and V𝕋 itself is the following union of languages of finite timed words:

V𝕋= (projM1(R)projT,𝕋1(Reg𝕋,)) (Monitor wrongly claims an Reg error)
(projM1(A)projT,𝕋1(A𝕋,)) (Monitor wrongly claims an A error)
(projM1(B)projT,𝕋1(B𝕋,)) (Monitor wrongly claims a B error)
(projM1(C)projT,𝕋1(C𝕋,Reg𝕋,^A𝕋,^B𝕋,^))

Thus, Timer wins if s is occurring infinitely often and Monitor declares no error, i.e., plays exclusively moves, or some finite prefix of play is in V𝕋, namely Monitor declares a wrong type of error. Specifically, Monitor declares R, A or B in the round when the corresponding local condition holds, or C in the round when either the local condition C𝕋, holds, or some of the other three local conditions fails. Intuitively, R, A or B are prioritised over C: in order to win by declaring an error, Monitor must declare R, A or B if the corresponding local condition fails, and may only declare C otherwise.

Lemma 9.

W is recognised by an NTA1.

Correctness of reduction.

We prove the following lemma:

Lemma 10.

Timer has a winning controller if repeatedly reaches s, and Monitor has a winning strategy otherwise.

Proof.

Due to a well-quasi-order on configurations and the lossy semantics, if repeatedly reaches s then has a lasso run repeatedly reaching s [34]: a run that is cyclic from some point on. The run is thus bounded by some k, and Timer has a winning controller that produces an encoding of this run of granularity at most δ=1/4(k+1). Indeed, with this granularity, Timer can encode all potential valuations by using k “slots” in an interval of length 1/4 for each of the segments.

Conversely, if does not repeatedly reach s then whenever Timer produces a correct run it necessarily visits s finitely often. Then Monitor has a winning strategy that records all the history and keeps playing as long as Timer is not cheating, and is able to detect all kinds of errors produced by Timer in case Timer cheats.

6 𝐓𝐢𝐦𝐞𝐫 is the owner but not the agent

In this section we prove undecidability in the last remaining case:

Theorem 11.

The timed Church synthesis problem is undecidable when Owner=Timer and Agent=Monitor.

(Note the similarity of Theorems 11 and 6 along the exchange of roles of Timer and Monitor.)

We reduce from the LCM boundedness problem, assuming free-test semantics. Let us fix a 4-counter LCM =𝒞,S,s0,, where 𝒞={c1,c2,c3,c4}. Let T={} and M={,}. We define a timed game with Timer’s winning condition W such that Monitor has a winning controller if and only if is bounded.

1-resetting NTA𝟏.

In this case, we need a slight extension of NTA1 to define winning conditions and controllers: NTA with 1 clock and very limited form of ε-transitions that reset the clock every time it equals 1. Let 𝔽=0[0,1) denote the set of fractional parts. For any time value t0, let frac(t) denote its fractional part, i.e., the unique value in 𝔽 such that t=n+frac(t) for some n. If ν is a valuation, frac(ν) denotes the valuation {xfrac(ν(x))}.

A 1-resetting NTA1 (NTA1res) is an NTA1 as defined in Section 2 with only the following modification: (,ν)δ,τ(,ν) (with aΣ) if and only if δ=(,a,g,Y,)Δ is a transition of 𝒜 such that frac(ν+τ)g, and ν=frac(ν+τ)[Y0]. The 1-resetting NTA1 can be simulated using NTA1 with ε-transitions: in every location L add a self-loop (,ε,x=1,{x},).

The idea of reduction.

Intuitively speaking, Timer is tasked with simulating a run of , and Monitor can point out when they think that Timer made a mistake in the simulation. More specifically, Timer will play instructions of , and the time values will be used to encode the valuations of counters, as described below (the encoding is different from the one in the previous section). After each move by Timer, Monitor can either say that the simulation is correct so far, or that Timer made a mistake in their last move. In the former case, if Timer actually made a mistake then Timer wins (Monitor must point out any mistake), and if there was no mistake then the game continues (if the game continues like this forever, Monitor wins). In the latter case, the game is essentially immediately over: either Monitor is right and Timer made a mistake, which will be winning for Monitor, or Monitor is wrong and Timer’s last move was correct, in which case Timer will be winning.

The way time is used to encode counter valuations is the following. The fractional part of a timestamp acts as an identifier which allows an increment to be later matched with a corresponding decrement. For instance, an increment at time 2.314 can be later matched with a decrement at time 7.314. With this, the valuation of a counter is simply the number of increments/fractional parts that have not been matched with a later decrement with the same fractional part. See Figure 2 for an illustration.

Figure 2: Example encoding of a run. For each instruction (s,op,s), only op is shown.

An obvious implementation of this idea would require, in the case where a fractional part is used for the first time ever in an incrementing instruction, checking that it is fresh using unrestricted “guessing” ε-transition (i.e., guess the fractional part before the first instruction, then check it never appears until the very last position). To avoid this, we introduce a pool of fractional parts at the start of the run encoding, denoted by the symbol “”. The idea is that Timer must include at the beginning a number of relevant fractional parts that will be used later in the run encoding. Then, we can eliminate time guessing by instead non-deterministically choosing a position in the pool, resetting the clock at that point and then every time it equals 1. If the last position in the word is the only position seen with the clock exactly at zero, then we know this fractional part was never used before.

The encoding of runs of 𝓜.

We define a timed word encoding of runs of in three parts. First, we capture the regular properties of their projection onto T. Let projT:(T×M×0)T be the natural projection. Define Reg(T×M×0) as the set of all finite timed words w such that projT(w)=kI1I2In, instruction I1 starts from the initial location, and each Ii is compatible with Ii+1 in the sense defined earlier.

It remains to state the role of timestamps, on positions with a symbol in , in maintaining the valuations of . Consider a finite timed word w(T×M×0). We say that a fractional part f𝔽 is active for counter c in w if the last timed letter (I,t) with Ic and frac(t)=f increments c (Iincc) and appears after the last zero-test of c. Conversely, f is inactive for c in w if since the last zero-test of c there is no occurrence of f with an instruction Ic involving c or if the last such occurrence is in decc. For any prefix w of a run encoding, the corresponding valuation of counter c is the number of distinct fractional parts that are active for c. Let val(w) denote this valuation.

Recall the form of runs of : ρ=(s0,ν0)I1(s1,ν1)I2, as an alternating sequence of configurations and instructions, with ν0=0𝒞. We inductively define ρ(w), a finite alternating sequence of configurations and instructions associated with any wReg:

ρ(w)={(s0,ν0) if projT(w),ρ(w)𝐼(s,val(w)) if projT(w)=wI and I=(s,op,s).

Note that ρ(w) need not be a run of for two reasons. First, valuations need not be correlated with the instructions (e.g., a run may feature an incrementing instruction while the corresponding valuation remains unchanged or decreases). Second, a decrementing instruction may occur even when the valuation of the corresponding counter is zero. Conversely, if valuations are updated correctly and decrementing instructions occur only when the valuation is non-zero, then Reg ensures that ρ(w) is a valid run of . To enforce validity, we introduce rules that must be satisfied by the timestamp t of every instruction I occurring in w:

Rule 1:

If Iincc, then the fractional part of t must be inactive for c.

Rule 2:

If Idecc, then the fractional part of t must be active for c.

It is easy to see that following both rules guarantees maintaining the correct counter valuations. Moreover, it prevents one from adding a decrementing instruction when the counter valuation is zero, as there would be no active fractional part to pick. Note that there are no constraints on zero-test instructions, their timestamps are irrelevant.

Claim 12.

If all instructions in wReg satisfy Rules 1 and 2, then ρ(w) is a run of .

The timed game.

For each of the two rules, we now define a language of finite timed words that requires that the rule is satisfied by the last letter, and another one that requires that the rule is broken. Let ErrR1 be the language of finite timed words where the last letter is an increment instruction that breaks Rule 1. Moreover, let OkR1 be the language of words where the last letter satisfies Rule 1 and the last fractional part is in the pool. Note that any timed word ending in either a decrementing or zero-test instruction is in OkR1, and is not in ErrR1. ErrR1 is recognised by the 1-resetting reachability NTA1 given in Figure 3, while OkR1 is recognised by the 1-resetting reachability NTA1 given in Figure 4.

Figure 3: An NTA1res for ErrR1 comprises four copies of the above automaton, one for each c𝒞.

The languages ErrR1 and OkR1 are readily seen to be disjoint. Note however that the languages are not complements. Indeed, a word that satisfies Rule 1 but whose last fractional part does not appear in the pool at the beginning belongs to neither language.

The definitions and automata for ErrR2 and OkR2 mirror those of OkR1 and ErrR1 respectively, with ErrR2 being the language of words breaking Rule 2 where the last fractional part is in the pool, and OkR2 being the language of words where the last letter satisfies Rule 2. Again, a word not ending in a decrement is automatically in OkR2 and not in ErrR2.

Let Err=Reg(ErrR1ErrR2) and Ok=RegOkR1OkR2. We define Timer’s winning condition as the following language of infinite timed words:

W=Reach{w(projM(w)wOk)(projM(w)wErr)}.

Intuitively, Timer wins if at any point Monitor makes a mistake in its claim by playing when the sequence given by Timer is actually correct or playing when there is an error. However the play continues after this point, Timer will be winning. On the other hand, Monitor wins if either it plays at a point in which the play is not in Ok, and then any continuation will be outside of W, or if it plays forever while the play is never in Err. Note that the case where Timer plays outside of Reg is covered both by not being in Ok, so Monitor can play if this happens and win, or by not being in Err, so Monitor can play if this happens and win as well.

Lemma 13.

W is recognised by a reach-NTA1res.

Proof.

Both Err and Ok are recognisable by 1-resetting reachability NTA1s. For Err this follows from the closure of reach-NTA1res under union of languages, and intersection with Reg does not add clocks. As for Ok, although intersection typically adds up the numbers of clocks, we can branch based on the final letter to simulate either OkR1 or OkR2, requiring only one clock.

Figure 4: An NTA1res recognising OkR1 consists of four copies of the automaton above, one for each c𝒞, and an additional branch that checks that the last transition is in inc (omitted).

Correctness.

Before stating correctness of the reduction, let us give some intuition about the pool at the beginning of the play. It is in Timer’s best interest to accurately list as many fractional parts that will be used later, but only finitely many. The finite part is obvious: if Timer only plays forever then Monitor just plays forever and wins, so Timer must start the real run encoding at some point. The incentive for Timer to play many fractional parts comes from its winning condition: it wins if Monitor makes a mistake. For example, if Timer plays an increment transition with some inactive fractional part f and Monitor answers with , Timer wins iff the play is in OkR1. But OkR1 accepts only if the last fractional part occurs in the pool. So if f is not in the pool, the play is not in Ok (despite being a correct encoding of a run), and Monitor wins by playing . On the other hand, there is no possible disadvantage to adding more fractional parts to the pool, even some that will never be used later, and so this is Timer’s incentive for filling the pool as much as possible.

Lemma 14.

Let wReg. We have the following implications:

  1. 1.

    ρ(w)Runs all prefixes w of w satisfy wErr.

  2. 2.

    ρ(w)Runs some prefix w=w′′(I,m,t) of w satisfies ρ(w′′)Runs, ρ(w)Runs, and wOk.

Proof.

  1. 1.

    By induction on prefixes of w. The base case, for prefixes where Timer has only played letters so far, is trivial. Let w be a prefix of w. Since Runs is prefix-closed and ρ(w) is a prefix of ρ(w), ρ(w)Runs. Assume by induction hypothesis that all strict prefixes of w are not in Err. Let w=w′′(I,m,t) with I, mM, and let f=frac(t)𝔽. We look at the different cases for I to show that wErr.

    • Suppose Iincc. We have ρ(w)Runs, ρ(w′′)Runs, and ρ(w)=ρ(w′′)𝐼(s,val(w)). Thus val(w)=val(w′′)[c++], and from this we have that f is inactive for c in w′′. This does not mean that wOkR1 as f could be missing from the pool, but it does mean that wErrR1 as ErrR1 can only accept if the last fractional part is already active. Thus wErr.

    • Suppose Idecc. Since the run is correct, we have that val(w′′)(c)>0 and val(w)=val(w′′)[c], so f must be active for c in w′′. Then wOkR2 which implies wErr.

    • If Iztc then w is trivially accepted by OkR1 and OkR2 thus wErr.

  2. 2.

    If ρ(w)Runs, there is some prefix w=w′′(I,m,t) of w such that ρ(w)Runs and ρ(w′′)Runs. This is because at least all prefixes of the form (,m,t) are encoding the empty run, which belongs to Runs.

    We look at the different cases for I to show that wOk. Again, we let f=frac(t)𝔽.

    • Suppose Iincc. We have ρ(w)Runs, ρ(w′′)Runs, and ρ(w)=ρ(w′′)𝐼(s,val(w)). This means that val(w) is not the correct valuation, that is val(w)val(w′′)[c++]. From this, we deduce that f is active for c in w′′, otherwise val(w) would be correct. Therefore wErrR1, which implies wOk.

    • Suppose Idecc. There are two possible reasons for ρ(w) not to be in Runs: either val(w) is wrong, or val(w′′)(c)=0. In the first case, we deduce similarly to the increment case that f is inactive for c in w′′. In the second case, it means that there are no active fractional part for c in w′′, therefore f can only be inactive also. In both cases, f being inactive does not mean that wErr2, as f might be missing from the pool. However, this still means that wOkR2 because OkR2 only accepts if the last fractional part is active. Then we have that wOk.

    • If Iztc then we immediately get a contradiction because by definition val(w) will be correct so ρ(w) must be in Runs.

Note that we cannot state wOk for the first part and wErr for the second part, again because the pool may be missing the crucial fractional part needed for this. However, this lemma is enough to prove correctness of the reduction:

Theorem 15.

is bounded if and only if Monitor has a winning controller.

Proof.

Assume is bounded by k. We build a controller 𝒜 for Monitor that will correctly detect the first time a mistake happens in the encoding of the run. This assumes that before that point the number of active fractional parts for a given counter never goes above k. This controller is a 1-resetting DTA using 4k clocks over input timed words with alphabet T and outputs in M.

Let 𝒳={xic1ik,c𝒞} be the set of clocks of 𝒜. Intuitively, clocks x1c,,xkc are assigned to counter c and will “store” fractional parts that are active for c. By “storing” a fractional part f, we mean that this clock has value 0 exactly at timestamps whose fractional part is f. The state space of 𝒜 keeps track of which clocks are considered active for their respective counters. The initial state is the empty set. 𝒜 also ignores the initial pool of data and always outputs on those.

When reading an increment for c𝒞 with time t, 𝒜 outputs if any of the clocks indicated as active for c by the state is at value exactly 0, and otherwise. If it has output , it goes to a sink state that always output . Otherwise, it resets the first clock xic marked as inactive, and then it marks this clock as active. If there is no such free clock, it goes to an error state that outputs whatever.

Similarly, when reading a decrement for c with time t, 𝒜 outputs if no active clock has value 0, otherwise. By construction, no two clocks can have value 0 at the same time. If the output was , it goes to the same sink state as before. Otherwise, it removes that clock from the set of active clocks in the state.

Reading a zero-test transition for counter c makes 𝒜 output and reset the set of active clocks for c to .

First we show that 𝒜 is accurate for runs bounded by k:

Lemma 16.

For any play w that conforms to 𝒜 that never has more than k active fractional parts for any counter, ρ(w)Runs if and only if projM(w). Moreover, if projM(w), the valuation of a counter is exactly the number of clocks marked as active by the state of 𝒜, each of those clocks stores one of the active fractional parts, and those clocks are pairwise different.

Proof.

We show this by induction on w. Again, this is trivial for any play of the form (,,t). Assuming the above holds for w and that 𝒜 has always output so far, let us consider some continuation w=w(I,t) with f=frac(t).

Case 1a:

If I is a c incrementing instruction and f is inactive for c in w, then val(w)=val(w)[c++] and therefore ρ(w)Runs. If val(w)(c)>k then the proof is finished and 𝒜’s behaviour after this point does not matter. Otherwise, val(w)(c)<k and by induction hypothesis there are exactly val(w)(c) distinct fractional parts active for c in w and in exactly as many clocks of 𝒜 assigned to c. Moreover, f is in none of them. In that case, 𝒜 outputs , and stores f in one free clock assigned to c, which we know there is at least one. Then all properties are satisfied by w.

Case 1b:

If I is a c incrementing instruction and f is active for c in w, then ρ(w)Runs. Again by induction hypothesis f must be in one of the clocks of 𝒜 assigned to c and marked as active. Therefore, 𝒜 outputs and we are done.

Cases 2a and 2b for a decrementing instruction with an active or inactive fractional part respectively are very similar.

Case 3 for a zero-test instruction is also easy: as zero-test instructions are always available under free-test semantics, wRuns is immediate, 𝒜 always outputs , and all clocks are marked as inactive which coincide with the valuation being set to 0.

Returning to the proof of Theorem 15, we now show that 𝒜 is a winning controller for Monitor. Let w be a play.

If ρ(w)Runs, then we know that there is at most k active fractional parts for any counter in all prefixes of w by boundedness assumption, and therefore that projM(w) by Lemma 16. Moreover, by Lemma 14, all prefixes of w are not in Err. Clearly, w is not in W.

If ρ(w)Runs, then by Lemma 14 there exists some prefix w=w′′(I,m,t) such that ρ(w′′)Runs, ρ(w)Runs, and wOk. Therefore, by Lemma 16, projM(w′′) and 𝒜 outputs m= on w. w′′ is not in W for the same reason as before, and since wOk, wW either. Then any continuation, including w, has projM of the form + and therefore is not in W.

Let ρ be an unbounded run of . Assume towards a contradiction that there exists some controller 𝒜 that is winning for Monitor. Let GGuard(𝒳) be the finite set of guards appearing in 𝒜, and k=|G|. Given some guard gG and a clock valuation ν, let T(ν,g)={t0ν+tg}. As g is a conjunction of constraints, T(ν,g) is either empty, a singleton, or an interval. Thus, if there are two distinct t,tT(ν,g) then any t<t′′<t is also in T(ν,g).

At some point, ρ goes from k+1 to k+2 for the valuation of some counter c using some incrementing instruction I. Let w be a timed word that correctly encodes ρ until just before I, with fractional parts f1,,fk+1 active at the end of w. For simplicity, we take f1<<fk+1, and assume that w has those fractional parts in the pool. Moreover, we also put in the pool an inactive fractional part between every fi and fi+1.

Let us now consider what 𝒜 does on this word. Necessarily 𝒜 must have output only so far, otherwise Timer would win. On a new action (I,t), it must necessarily output if frac(t){f1,,fk+1} as those are active fractional parts, and therefore should not be used for a new increment. But on any other timestamp, if the corresponding fractional part is in the pool, it must output to not lose immediately. From 𝒜’s current state, there are less than k transitions outputting . So at least one of them can be fired with at least two distinct active fractional parts. But as we have seen earlier, this means any timestamp between those two can also fire this transition. We have at least one inactive fractional part in the pool between the two active ones, and there is a timestamp with this fractional part that can fire the transition, outputting . Thus, we get a contradiction.

Note that the existence of a controller and a strategy are not equivalent here: Monitor always has a winning strategy, but only has a winning controller if is bounded.

7 Conclusion

The main contribution of this paper is to solve the problem left open in [13, 32] by proving that all the variants of timed synthesis problems are undecidable for winning sets specified already by NTA1. The only exception is Theorem 11 in Section 6 where we need to extend (reachability) NTA1 by a very limited form of ε-transitions. While we believe that these ε-transitions may be eliminated, we consider the current result as a satisfactory solution of the open problem: all our undecidability results translate from timed setting to data setting where winning sets are specified using nondeterministic one-register automata (NRA1), and neither ε-transitions nor guessing are needed there.

One of the motivations for studying timed/data synthesis in [13, 32] was a potential application to solving the deterministic separability question: given two nondeterministic NTA (resp. NRA) over finite timed (resp. data) words, with disjoint languages L1,L2, is there a DTA (DRA) whose language separates L1 from L2, namely includes one of them and is disjoint from the other. Decidability of resource-bounded timed/data synthesis is used in [13, 32] to obtain decidability of resource-bounded deterministic separability, where one a priori bounds the number of clocks/registers in a separating automaton. Decidability status of the unrestricted deterministic separability still remains open. Also a related problem of deterministic membership, where given a nondeterministic NTA, one asks if its language is accepted by some deterministic DTA, is undecidable even for NTA1 [12]. On the other hand it decomes decidable if the number of clocks in a deterministic timed automaton is a priori bounded [12].

Knowing that NTA1 winning sets yield ubiquitous undecidability of synthesis problems, a natural follow-up questions is to ask if the situation changes when one restricts to subclasses of NTA1, for instance to reachability NTA1 winning sets. Since deterministic separability over finite words reduces to timed games with reachability NTA winning conditions, this could help solve deterministic separability of NTA1 languages.

Finally, we recall that we do not know if the games studied in this paper are determined, namely if one of the players has always a winning strategy.

References

  • [1] Parosh Aziz Abdulla, Pavel Krcal, and Wang Yi. Sampled universality of timed automata. In Foundations of Software Science and Computational Structures, pages 2–16, Berlin, Heidelberg, 2007. Springer Berlin Heidelberg.
  • [2] Rajeev Alur and David L. Dill. A theory of timed automata. Theoretical Computer Science, 126(2):183–235, 1994. doi:10.1016/0304-3975(94)90010-8.
  • [3] Eugene Asarin and Oded Maler. As soon as possible: Time optimal control for timed automata. In Proc. of HSCC’99, HSCC ’99, pages 19–30, London, UK, UK, 1999. Springer-Verlag. doi:10.1007/3-540-48983-5_6.
  • [4] Eugene Asarin, Oded Maler, Amir Pnueli, and Joseph Sifakis. Controller synthesis for timed automata. In Proc. of SSSC’98, volume 31 of 5th IFAC Conference on System Structure and Control, pages 447–452, 1998. doi:10.1016/S1474-6670(17)42032-5.
  • [5] Gerd Behrmann, Alexandre David, Kim G. Larsen, John Hakansson, Paul Petterson, Wang Yi, and Martijn Hendriks. Uppaal 4.0. In Proceedings of the 3rd International Conference on the Quantitative Evaluation of Systems, QEST ’06, pages 125–126, Washington, DC, USA, 2006. IEEE Computer Society. doi:10.1109/QEST.2006.59.
  • [6] Béatrice Bérard, Antoine Petit, Volker Diekert, and Paul Gastin. Characterization of the expressive power of silent transitions in timed automata. Fundam. Inf., 36(2–3):145–182, November 1998. doi:10.3233/FI-1998-36233.
  • [7] Sougata Bose, Thomas A. Henzinger, Karoliina Lehtinen, Sven Schewe, and Patrick Totzke. History-deterministic timed automata. Log. Methods Comput. Sci., 20(4), 2024. doi:10.46298/LMCS-20(4:1)2024.
  • [8] Patricia Bouyer, Fabrice Chevalier, and Deepak D’Souza. Fault diagnosis using timed automata. In Proc. of FOSSACS’05, FOSSACS’05, pages 219–233, Berlin, Heidelberg, 2005. Springer-Verlag. doi:10.1007/978-3-540-31982-5_14.
  • [9] Thomas Brihaye, Thomas A. Henzinger, Vinayak S. Prabhu, and Jean-François Raskin. Minimum-time reachability in timed games. In Lars Arge, Christian Cachin, Tomasz Jurdziński, and Andrzej Tarlecki, editors, Proc. of ICALP’07, pages 825–837, Berlin, Heidelberg, 2007. Springer Berlin Heidelberg. doi:10.1007/978-3-540-73420-8_71.
  • [10] J. Richard Büchi 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.
  • [11] Franck Cassez, Alexandre David, Emmanuel Fleury, Kim G. Larsen, and Didier Lime. Efficient on-the-fly algorithms for the analysis of timed games. In Martín Abadi and Luca de Alfaro, editors, Proc. of CONCUR’05, pages 66–80, Berlin, Heidelberg, 2005. Springer Berlin Heidelberg.
  • [12] Lorenzo Clemente, Sławomir Lasota, and Radosław Piórkowski. Determinisability of One-Clock Timed Automata. In Igor Konnov and Laura Kovács, editors, 31st International Conference on Concurrency Theory (CONCUR 2020), volume 171 of Leibniz International Proceedings in Informatics (LIPIcs), pages 42:1–42:17, Dagstuhl, Germany, 2020. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.CONCUR.2020.42.
  • [13] Lorenzo Clemente, Sławomir Lasota, and Radosław Piórkowski. Timed games and deterministic separability. In Artur Czumaj, Anuj Dawar, and Emanuela Merelli, editors, 47th International Colloquium on Automata, Languages, and Programming, ICALP 2020, July 8-11, 2020, Saarbrücken, Germany (Virtual Conference), volume 168 of LIPIcs, pages 121:1–121:16. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2020. doi:10.4230/LIPIcs.ICALP.2020.121.
  • [14] Luca de Alfaro, Marco Faella, Thomas A. Henzinger, Rupak Majumdar, and Mariëlle Stoelinga. The element of surprise in timed games. In Roberto Amadio and Denis Lugiez, editors, Proc. of CONCUR’03, pages 144–158, Berlin, Heidelberg, 2003. Springer Berlin Heidelberg.
  • [15] 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.
  • [16] Deepak D’souza and P. Madhusudan. Timed control synthesis for external specifications. In Helmut Alt and Afonso Ferreira, editors, Proc. of STACS’02, pages 571–582, Berlin, Heidelberg, 2002. Springer Berlin Heidelberg. doi:10.1007/3-540-45841-7_47.
  • [17] Léo Exibard. Automatic Synthesis of Systems with Data. (Synthèse Automatique de Systèmes avec Données). PhD thesis, Aix-Marseille University, France, 2021. URL: https://tel.archives-ouvertes.fr/tel-03409602.
  • [18] 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.
  • [19] 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.
  • [20] Diego Figueira, Piotr Hofman, and Sławomir Lasota. Relating timed and register automata. Math. Struct. Comput. Sci., 26(6):993–1021, 2016. doi:10.1017/S0960129514000322.
  • [21] Mark Jenkins, Joël Ouaknine, Alexander Rabinovich, and James Worrell. The church synthesis problem with metric. In Computer Science Logic (CSL’11)-25th International Workshop/20th Annual Conference of the EACSL (2011), pages 307–321. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2011. doi:10.4230/LIPIcs.CSL.2011.307.
  • [22] Marcin Jurdziński and Ashutosh Trivedi. Reachability-time games on timed automata. In Proc. of ICALP’07, pages 838–849, Berlin, Heidelberg, 2007. Springer-Verlag. URL: http://dl.acm.org/citation.cfm?id=2394539.2394637.
  • [23] Michael Kaminski and Nissim Francez. Finite-memory automata. Theor. Comput. Sci., 134(2):329–363, 1994. doi:10.1016/0304-3975(94)90242-9.
  • [24] M. Kwiatkowska, G. Norman, and D. Parker. PRISM 4.0: Verification of probabilistic real-time systems. In G. Gopalakrishnan and S. Qadeer, editors, Proc. of CAV’11, volume 6806 of LNCS, pages 585–591. Springer, 2011. doi:10.1007/978-3-642-22110-1_47.
  • [25] Sławomir Lasota and Igor Walukiewicz. Alternating timed automata. ACM Transactions on Computational Logic, 9(2, Article 10), 2008.
  • [26] Sławomir Lasota, Mathieu Lehaut, Julie Parreaux, and Radosław Piórkowski. One-clock synthesis problems, 2026. arXiv:2601.04902.
  • [27] Oded Maler and Amir Pnueli. On recognizable timed languages. In Igor Walukiewicz, editor, Proc. of FOSSACS’04, volume 2987 of LNCS, pages 348–362. Springer Berlin Heidelberg, 2004. doi:10.1007/978-3-540-24727-2_25.
  • [28] Oded Maler, Amir Pnueli, and Joseph Sifakis. On the synthesis of discrete controllers for timed systems. In Ernst W. Mayr and Claude Puech, editors, Proc. of STACS’95, pages 229–242, Berlin, Heidelberg, 1995. Springer Berlin Heidelberg.
  • [29] Richard Mayr. Undecidable problems in unreliable computations. Theor. Comput. Sci., 297(1-3):337–354, 2003. doi:10.1016/S0304-3975(02)00646-1.
  • [30] Brian Nielsen and Arne Skou. Automated test generation from timed automata. International Journal on Software Tools for Technology Transfer, 5(1):59–77, November 2003. doi:10.1007/s10009-002-0094-1.
  • [31] Joël Ouaknine and James Worrell. On the language inclusion problem for timed automata: Closing a decidability gap. In 19th IEEE Symposium on Logic in Computer Science (LICS 2004), 14-17 July 2004, Turku, Finland, Proceedings, pages 54–63. IEEE Computer Society, 2004. doi:10.1109/LICS.2004.1319600.
  • [32] Radosław Piórkowski. Simplification problems for infinite-state systems. PhD thesis, University of Warsaw, 2022.
  • [33] Alexander Rabinovich and Daniel Fattal. The Church synthesis problem over continuous time. Log. Methods Comput. Sci., 21(3), 2025. doi:10.46298/LMCS-21(3:8)2025.
  • [34] Philippe Schnoebelen. Lossy counter machines decidability cheat sheet. In Antonín Kučera and Igor Potapov, editors, Reachability Problems, pages 51–75, 2010. doi:10.1007/978-3-642-15349-5_4.
  • [35] Luc Segoufin. Automata and logics for words and trees over an infinite alphabet. In Zoltán Ésik, editor, Computer Science Logic, 20th International Workshop, CSL 2006, 15th Annual Conference of the EACSL, Szeged, Hungary, September 25-29, 2006, Proceedings, volume 4207 of Lecture Notes in Computer Science, pages 41–57. Springer, 2006. doi:10.1007/11874683_3.
  • [36] Martin Tappler, Bernhard K. Aichernig, Kim Guldstrand Larsen, and Florian Lorber. Time to learn - learning timed automata from tests. In Étienne André and Mariëlle Stoelinga, editors, Proc. of FORMATS’19, pages 216–235, Cham, 2019. Springer International Publishing. doi:10.1007/978-3-030-29662-9_13.
  • [37] Sicco Verwer, Mathijs de Weerdt, and Cees Witteveen. An algorithm for learning real-time automata. In Proc of. the Annual Belgian-Dutch Machine Learning Conference (Benelearn’078), 2007.
  • [38] H. Wong-Toi and G. Hoffmann. The control of dense real-time discrete event systems. In Proc. of CDC’91, volume 2 of Proceedings of the 30th IEEE Conference on Decision and Control, pages 1527–1528, December 1991. doi:10.1109/CDC.1991.261658.