Abstract 1 Introduction 2 Preliminaries 3 Monitoring and Monitorability for TBA 4 Monitorability for DTMA 5 Monitorability with Step-Bounded Horizons 6 Refined Monitoring with Time-Horizon Verdicts 7 Related Work 8 Conclusion References

Time for Timed Monitorability

Thomas M. Grosen ORCID Aalborg University, Aalborg, Denmark Sean Kauffman ORCID Queen’s University, Kingston, Canada Kim G. Larsen ORCID Aalborg University, Aalborg, Denmark Martin Zimmermann ORCID Aalborg University, Aalborg, Denmark
Abstract

Monitoring is an important part of the verification toolbox, in particular in situations where exhaustive verification using, e.g., model-checking is infeasible. The goal of online monitoring is to determine the satisfaction or violation of a specification during runtime, i.e., based on finite execution prefixes. However, not every specification is amenable to monitoring, e.g., properties for which no finite execution can witness satisfaction or violation. Monitorability is the question of whether a given specification is amenable to monitoring, and has been extensively studied in discrete time.

Here, we study the monitorability problem for real-time properties expressed as Timed Automata. For specifications given by deterministic Timed Muller Automata, we prove decidability while we show that the problem is undecidable for specifications given by nondeterministic Timed Büchi automata.

Furthermore, we refine monitorability to also determine bounds on the number of events as well as the time that must pass before monitoring the property may yield an informative verdict. We prove that for deterministic Timed Muller automata, such bounds can be effectively computed. In contrast we show that for nondeterministic Timed Büchi automata such bounds are not computable.

Keywords and phrases:
Monitorability, Monitoring, Timed Automata, MITL
Copyright and License:
[Uncaptioned image] © Thomas M. Grosen, Sean Kauffman, Kim G. Larsen, and Martin Zimmermann; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Logic and verification
; Theory of computation Modal and temporal logics
Related Version:
arXiv Version: https://arxiv.org/abs/2504.10008 [22]
Funding:
T. M. Grosen and K. G. Larsen have been funded by the Villum Investigator Grant S4OS. T. M. Grosen, K. G. Larsen, and M. Zimmermann have been supported by DIREC – Digital Research Centre Denmark. T. M. Grosen has been supported by Mitacs. S. Kauffman has been supported by the Natural Sciences and Engineering Research Council of Canada.
Acknowledgements:
We would like to thank Corto Mascle, who brought Rampersad et al.’s work on the complexity of suffix-universality [30] to our attention, which inspired our undecidability proof for weak monitorability.
Editors:
Patricia Bouyer and Jaco van de Pol

1 Introduction

A fundamental challenge in Runtime Verification (RV) is that many properties provide no utility when monitored in an online setting. Thus, it is of utmost importance to identify those properties that do provide useful information.

Behaviors of long-running systems are typically specified as languages of infinite words, but online monitors only observe finite (prefixes of) system executions. Thus, a monitor has to determine whether such a finite prefix already implies satisfaction or violation of the property. While many different types of monitors have been proposed, most online monitors return information in the form of verdicts about the finite prefix. Inherently to the problem, there are at least three verdicts [10]: {,,?}, where and are conclusive verdicts that mean that the finite prefix guarantees that every possible infinite extension satisfies, respectively violates, the property, and the inconclusive verdict ? signifying that neither is the case.

For example, consider an arbiter granting access to a shared resource. The property φ1 expressing “there is no request during the first second” is satisfied if the first request arrives after two seconds, no matter how the execution continues. Hence, the verdict for such a finite execution is . Similarly, the property φ2 expressing “after any request, there are no requests for at least one second” is violated as soon as two consecutive requests are observed within one second, no matter how the execution continues. Hence, the verdict for such a finite execution is . On the other hand, if requests arrive with a gap of two seconds between them, then the verdict for such a prefix (w.r.t. φ2) is ?, since there are infinite extensions satisfying the property and infinite extensions violating it.

As seen above, there are prefixes for which we get a conclusive verdict w.r.t. φ2. This distinguishes it from properties like φ3 expressing “every request is eventually granted”, for which every finite prefix can be extended to satisfy the property and can be extended to violate it. Hence, every finite prefix yields the verdict ?. Phrased concisely: monitoring the property φ3 is futile.

However, for the user it is not transparent, while receiving the verdict ?, whether in the future a conclusive verdict may be given, or whether every possible extension yields the verdict ?. The concept of monitorability has been introduced to capture those properties that are amenable to monitoring. It comes in two variants, strong monitorability (every prefix can be extended to one that yields a conclusive verdict) and weak monitorability (some prefix yields a conclusive verdict). In this language, φ3 is not weakly monitorable while φ1 and φ2 are (even strongly) monitorable. Thus, before constructing and deploying a monitor for a property, it is prudent to first check whether the property is monitorable.

The problem of deciding if a property is monitorable has been studied extensively over the last 20 years (we discuss related work in Section 7), but only in the setting of discrete time until very recently. However, many properties require real-time constraints to express, e.g., deadlines like “every request is answered within 745 ms”. In particular, safety-critical systems are nearly always real-time systems with physics-based deadlines, and these systems tend to benefit the most from formal verification methods like RV. Had the property “the Therac 25 control program must wait eight seconds before switching between X-ray and electron modes” been monitored, it might have saved lives [26]. While monitoring algorithms exist for real-time properties [34, 9, 8, 23], the problem of real-time monitorability has gone largely unexamined.

Our Contribution.

This work makes monitoring of real-time systems more useful by examining the monitorability problem for real-time properties and by introducing qualitative refinements of the verdict ?. We consider real-time properties expressed by Timed Automata (TA) over infinite words [3]. Nondeterministic Timed Büchi Automata (TBA) are used for model checking tools like Uppaal [25] and for monitoring temporal logics [23, 20, 14] and are strictly more expressive than deterministic Timed Muller Automata (DTMA). We prove that strong and weak monitorability are undecidable for nondeterministic TBA, but decidable for DTMA. Thus, one can algorithmically determine that it is futile to monitor properties like φ3, thereby increasing the applicability of monitoring of real-time systems.

Furthermore, we introduce monitorability with step-bounded horizons that strengthens monitorability by limiting the number of events in a timed-word before a conclusive verdict must be reached. A step-bounded horizon allows one to determine for a given property and n, if a conclusive verdict is possible within n steps, enabling corrective actions earlier. Again, we show that monitorability with step-bounded horizons is undecidable for nondeterministic TBA, but decidable for DTMA.

Finally, we refine monitoring of real-time properties with time-horizon verdicts. Here, the verdict ? is enhanced with information about the minimum time until a conclusive verdict may be reached. Intuitively, before this time is reached, the monitor will only yield the inconclusive verdict ?, i.e., no information can be gained from querying the monitor before. This notion was introduced by Grosen et al. [23] as “time-predictive” monitoring. Here, we formally prove that time-horizon queries can be computed effectively for DTMA.

Thus, our results highlight the importance of properties being given by deterministic timed automata when checking monitorability. This is in contrast to monitoring itself, where it suffices to have nondeterministic automata for the property and its negation [23], which is, e.g., the case when specifying properties in Metric Interval Temporal Logic [4]. Finally, we show that it is necessary to have automata for the property and the complement, as the monitoring function is otherwise not effectively computable.

2 Preliminaries

The nonnegative integers are denoted by and the nonnegative reals by 0. An alphabet is a finite nonempty set of letters.

A timed word is a pair ρ=(σ,τ), where σ is a (finite or infinite) word over an alphabet Σ and τ is a sequence of non-decreasing, non-negative real numbers of the same length as σ. For convenience, we often write (σ1,τ1)(σ2,τ2) for a timed word (σ,τ). TΣ and TΣω denote the sets of finite and infinite timed words over Σ. For n{} we denote by TΣn the set of timed words over Σ of length at most n. Given a finite word ρ=(σ1,τ1)(σ2,τ2)(σn,τn), we denote its duration as τ(ρ)=τn. Slightly abusively, we write ε for the empty timed word (ε,ε) and define τ(ε)=0. For a finite timed word ρ=(σ1,τ1)(σ2,τ2)(σn,τn), a finite or infinite word ρ=(σ1,τ1)(σ2,τ2) and a timepoint tτ(ρ), we define the concatenation of ρ and ρ at t as

ρtρ=(σ1,τ1)(σ2,τ2)(σn,τn)(σ1,τ1+t)(σ2,τ2+t)

which is a timed word. As a shorthand, we write ρρ for ρτ(ρ)ρ. Given two finite words ρ,ρ and a timepoint tτ(ρ), we write ρtρ if there exists a ρ′′ such that ρtρ′′=ρ.

Example 1.

Consider the words ρ=(a,0)(b,10) and ρ=(c,5)(d,15). We have

  • ρρ=ρ10ρ=(a,0)(b,10)(c,15)(d,25),

  • ρ15ρ=(a,0)(b,10)(c,20)(d,30), and

  • ρρ=ρ15ρ=(c,5)(d,15)(a,15)(b,25).

Timed Automata.

A timed Büchi automaton (TBA) is a tuple 𝒜=(Q,Q0,Σ,𝒳,Δ,F) where Q is a finite set of locations, Q0Q is the set of initial locations, Σ is an alphabet, 𝒳 is a finite set of clocks, FQ is a set of accepting locations, and ΔQ×Q×Σ×2𝒳×G(𝒳) is a set of transitions, where G(𝒳) is the set of clock constraints over 𝒳. A transition (q,q,α,λ,g)Δ is an edge from q to q with label αΣ, where λ2𝒳 is a set of clocks to be reset and gG(𝒳) is a clock constraint. A clock constraint is a finite conjunction of atomic constraints of the form xn where x𝒳, n, and {<,,=,,>}. A state of 𝒜 is a pair (q,v) where qQ and v:𝒳0 is a clock valuation.

A run of 𝒜 from a state (q0,v0) over an infinite word (σ,τ)TΣω is a sequence of steps of the form

(q0,v0)(σ1,τ1)(q1,v1)(σ2,τ2)(q2,v2)(σ3,τ3)

where for every i1, there is a transition (qi1,qi,σi,λi,gi)Δ such that vi(x)=0 for all xλi and vi(x)=vi1(x)+τiτi1 otherwise, and g is satisfied by vi1+τiτi1 (where we use τ0=0). For a run r, inf(r)Q denotes the set of locations visited infinitely often in r. A run r is (Büchi) accepting if inf(r)F.

A timed Muller automaton (TMA) 𝒜=(Q,Q0,Σ,𝒳,Δ,) is like a TBA, but the set F of accepting locations is replaced by a set 2Q of sets of locations. A run r of 𝒜 is (Muller) accepting if inf(r).

The language L(𝒜) of a timed (Büchi or Muller) automaton is the set of words ρTΣω such that 𝒜 has an accepting run over ρ.

An automaton is deterministic if the set of initial locations is a singleton and if all edges from the same location and with the same label must have disjoint clock constraints. We use the abbreviations DTBA and DTMA to refer to the two deterministic automaton models.

Proposition 2.

The following results on TBA and TMA are due to Alur and Dill [3].

  1. 1.

    Let 𝒜=(Q,Q0,Σ,𝒳,Δ,F) be a TBA and let 𝒜=(Q,Q0,Σ,𝒳,Δ,{FFF}), which is a TMA. Then, L(𝒜)=L(𝒜). Furthermore, if 𝒜 is deterministic, then so is 𝒜.

  2. 2.

    For every TMA 𝒜=(Q,Q0,Σ,𝒳,Δ,), there is a TBA 𝒜 with L(𝒜)=L(𝒜). The set of locations of 𝒜 has the form Q××{0,1,,|Q|}.

  3. 3.

    The class of languages accepted by DTMA is a strict subset of the class of languages accepted by TBA.

Logic.

We use Metric Interval Temporal Logic (MITL) to formally express properties to be monitored. The syntax of MITL formulas over a finite alphabet Σ is defined as

φ::=p¬φφφXIφφUIφ

where pΣ and I ranges over non-singular intervals over 0 with endpoints in {}. Note that we often write n for I={d0dn} where {<,,,>}, and n. We also define the standard syntactic sugar true=p¬p, false=¬true, φψ=¬(¬φ¬ψ), φψ=¬φψ, FIφ=trueUIφ, and GIφ=¬FI¬φ.

The semantics of MITL is defined over infinite timed words. Given such a timed word ρ=(σ1,τ1)(σ2,τ2)TΣω, a position i1, and an MITL formula φ, we inductively define the satisfaction relation ρ,iφ as follows:

  • ρ,ip if and only if p=σi.

  • ρ,i¬φ if and only if ρ,i⊧̸φ.

  • ρ,iφψ if ρ,iφ or ρ,iψ.

  • ρ,iXIφ if and only if ρ,(i+1)φ and τi+1τiI.

  • ρ,iφUIψ if and only if there exists ki s.t. ρ,kψ, τkτiI, and ρ,jφ for all ij<k.

We write ρφ whenever ρ,1φ, and say that ρ satisfies φ. The language L(φ) of an MITL formula φ is the set of all infinite timed words that satisfy φ.

Proposition 3 ([4, 12]).

For each MITL formula φ there is a TBA 𝒜 such that L(φ)=L(𝒜).

Example 4.

Figure 1 illustrates the above proposition by providing a DTBA over the alphabet Σ={a,b,c} for the formula F[0,10]aG[0,20]¬b and its negation.

Figure 1: DTBA for the language of the MITL formula φ=F[0,10]aG[0,20]¬b and its negation: If location φ (¬φ) is accepting then it accepts L(φ) (L(¬φ), respectively).

Monitoring.

The monitoring problem asks to make verdicts about the satisfaction or violation of properties (over infinite timed words) after having observed only a finite prefix. Here, we follow the classical approach of considering the possible extensions of a finite observations.

Definition 5 (Observation).

An observation is a pair (ρ,t) containing a finite timed word ρ and a timepoint tτ(ρ), representing the current timepoint (which might be later than the last observed event in ρ). As we use observations as inputs for algorithms, we require that all timepoints in ρ and t are rational.

We continue with giving some intuition for the three-valued monitoring approach. Here, one is given an observation and aims to determine whether a property φ (of infinite timed words) is already satisfied, already violated, or neither.

  • If all possible extensions of the observation satisfy φ, then we give the corresponding verdict  signifying that the observation conclusively witnesses satisfaction of φ.

  • If all possible extensions of the observation violate φ, then we give the corresponding verdict  signifying that the observation conclusively witnesses violation of φ.

  • Otherwise, i.e., if there is an extension of the observation that satisfies φ and there is a extension of the observation that violates φ, then we give the inconclusive verdict ?.

Let us formalize this intuition.

Definition 6 (Timed Monitoring Function).

Given a property φTΣω and an observation (ρ,t), the monitoring function Vφ is defined as

Vφ(ρ,t)={ if ρtμφ for all μTΣω, if ρtμφ for all μTΣω,? otherwise.

In the following, we use Vφ(ρ) as a shorthand for Vφ(ρ,τ(ρ)).

Example 7.

Consider the specification φ=F[0,10]aG[0,20]¬b from Example 4. We have

  • Vφ((a,3),4)=?,

  • Vφ((a,11),11)=,

  • Vφ((a,3)(c,7),13)=?,

  • Vφ((a,3)(c,7)(c,22),22)=, but

  • Vφ((a,3)(c,7)(b,12),12)=. Also,

  • Vφ((a,3)(c,7),22)= while

  • Vφ((a,3)(c,7))=Vφ((a,3)(c,7),7)=?, i.e., the current timepoint t can yield conclusive verdicts when time is passing, even if no new events are observed.

Proposition 8 (Effectiveness of Timed Monitoring [23]).

Vφ is effectively computable by a zone-based online algorithm111See Page 16 for a formal definition of zones. that requires TBA for both φ and TΣωφ.

Recall that TBA are not closed under complement [3], so this result is not applicable to all properties accepted by TBA. However, for the important special case of properties φ specified in MITL, Vφ is effectively computable, as MITL properties are closed under complementation (as the logic allows for negations) and MITL formulas can be translated into equivalent TBA (see Proposition 3). Similarly, when φ is given by a DTMA, then Vφ is effectively computable, as DTMA are closed under complementation and can be turned into equivalent TBA [3].

However, it was previously open whether Vφ was computable if φ was given by a non-deterministic automaton, but we did not have access to an automaton for the complement TΣωφ. In Section 3, we answer the question negatively.

Monitorability.

Not every property is amenable to monitoring, e.g., for φ=G0F0a, we have Vφ(ρ,t)=? for every observation (ρ,t). The reason is that every ρ can be extended to satisfy φ and can be extended to violate φ. In the untimed setting, much effort has been put into characterizing the monitorable properties, i.e., those for which monitoring can generate some information. Here, we consider monitorability in the timed setting.

Definition 9 (Timed Monitorability).

Fix an observation (ρ,t) and a property φTΣω.

  • φ is strongly (ρ,t)-monitorable if and only if

    for all ρTΣ there exists ρ′′TΣ such that Vφ(ρtρρ′′){,}.
  • φ is weakly (ρ,t)-monitorable if and only if

    there exists ρ′′TΣ such that Vφ(ρtρ′′){,}.
  • φ is strongly monitorable if it is strongly (ε,0)-monitorable.

  • φ is weakly monitorable if it is weakly (ε,0)-monitorable.

Example 10.
  1. 1.

    Consider the property φ1=F0a. For every observation (ρ,t), we have Vφ1(ρt(a,0),t)=. Hence, φ1 is strongly monitorable.

  2. 2.

    Now, consider φ2=aG0F0a. Then, we have Vφ2((b,0),0)=, as every extension of ((b,0),0) satisfies φ2 (as the premise is violated). Hence, φ2 is weakly monitorable.

    However, it is not strongly monitorable: Consider the observation ((a,0),0), for which every extension satisfies the premise. We have (a,0)0ρ′′(a,0)(a,1)(a,2)φ2 and (a,0)0ρ′′(b,0)(b,1)(b,2)⊧̸φ2. Hence, Vφ2((a,0)0ρ′′)=? for all ρ′′.

  3. 3.

    Now, consider φ3=G0F0a. Arguments as for φ2 show that it is neither strongly nor weakly monitorable, as every finite word can be extended by (a,0)(a,1)(a,2) to satisfy φ3 and can be extended by (b,0)(b,1)(b,2) to violate φ3.

 Remark 11.

The astute reader might wonder why we quantify only over words ρ (and ρ′′) in Definition 9 and not over words and timepoints to concatenate at. The reason is that both definitions are equivalent, as ρ1tρ2, for finite words ρ1 and ρ2 and a timepoint tτ(ρ), is equal to ρ1ρ2, where ρ2 is obtained from ρ2 by incrementing all its timepoints by tτ(ρ1).

Let us continue by collecting some simple consequences of Definition 9.

 Remark 12.

Let (ρ,t) and (ρ,t) be two observations with ρtρ, and let φTΣω.

  1. 1.

    If φ is strongly (ρ,t)-monitorable, then it is also weakly (ρ,t)-monitorable. Thus, if φ is strongly monitorable, then it is also weakly monitorable.

  2. 2.

    If φ is strongly (ρ,t)-monitorable, then it is also strongly (ρ,t)-monitorable.

  3. 3.

    If φ is not weakly (ρ,t)-monitorable, then it is also not weakly (ρ,t)-monitorable.

In the following we study the decidability of monitorability, i.e., we consider the following decision problems where properties are given by timed automata:

  1. 1.

    Given a property φ, is φ strongly monitorable?

  2. 2.

    Given a property φ, is φ weakly monitorable?

  3. 3.

    Given a property φ and an observation (ρ,t), is φ strongly (ρ,t)-monitorable?

  4. 4.

    Given a property φ and an observation (ρ,t), is φ weakly (ρ,t)-monitorable?

By definition, if Problem 3 is decidable for a class of properties, then Problem 1 is also decidable for the same class of properties. Hence, if Problem 1 is undecidable for a class of properties, then Problem 3 is also undecidable for the same class of properties. A similar relation holds between Problem 2 and Problem 4.

3 Monitoring and Monitorability for TBA

In this section, we prove that the monitoring function is not computable and that the strong types of monitorability are undecidable when the property is given by a TBA. Note that this shows that the positive results for monitoring in the literature [23, 20, 14], which require automata both for the property and its complement, are tight in that sense: Only giving an automaton for the property, but not for its complement, is not sufficient to compute the monitoring function. We start by investigating the computability of the monitoring function.

Theorem 13 (Ineffectiveness of Timed Monitoring).

The function “Given a TBA 𝒜 and an observation (ρ,t), return VL(𝒜)(ρ,t)” is not computable.

Proof.

For every property φTΣω, we have Vφ(ε,0)= if and only if φ=TΣω. Hence, universality of a TBA 𝒜 reduces to checking whether VL(𝒜)(ε,0)=. As universality for timed automata is undecidable [5], the monitoring function cannot be computable.

Note that the specification automaton 𝒜 is part of the input in the problem considered in Theorem 13. We leave it open whether VL(𝒜) is computable for every fixed 𝒜, i.e., in the setting where only the observation is the input.

Next, we turn our attention to deciding monitorability for TBA.

Theorem 14.

Strong and weak monitorability are undecidable for properties given by TBA.

Proof.

Strong monitorability for untimed non-deterministic Büchi Automata is PSpace-complete [17], which can be shown by a reduction from the universality problem [18]. Analogously, we reduce the (undecidable [3]) universality problem for non-deterministic timed automata (over finite words) to the problem of strong monitorability, following Diekert, Muscholl, and Walukiewicz [18].

Let 𝒜=(Q,Q0,Σ,𝒳,Δ,F) be such a timed automaton, i.e., a finite run is accepting if it ends in a location in F. We assume w.l.o.g. that 𝒜 is complete in the sense that every word has a run. This can always be achieved by adding a fresh sink location and by rerouting all missing transitions to it.

We add a new letter #Σ to obtain Σ#=Σ{#} and construct a TBA 𝒜=(Q,Q0,Σ#,𝒳,Δ,F) from 𝒜 such that 𝒜 is strongly monitorable if and only if L(𝒜)=TΣ. To this end, we introduce three new locations r,s,t, i.e., Q=Q{r,s,t}. Next, we define Δ (see Figure 2) by copying the transitions from Δ and by adding the following transitions, where we write q𝑎q to denote (q,q,a,,true):

  • {q#rqQF}: from every non-accepting location of 𝒜, there is a #-transition to r.

  • {r𝑎s,s𝑎saΣ}: for every a# there is an a-transition from r to s and an a-labeled self-loop on s.

  • {s#r,r#r}: there is a #-transition from s to r and a #-labeled self-loop on r.

  • {q#tqF}: from every accepting location there is a #-transition to t.

  • {t𝑎taΣ#}: for every letter in Σ#, there is a self-loop on t labeled with that letter.

We define the accepting locations of 𝒜 as F=Q{r,t}.

Figure 2: The TBA 𝒜 constructed for the proof of Theorem 14.

Figure 2 shows the TBA 𝒜 with the locations of the (finite-word) timed automaton 𝒜 partitioned into F and QF. In the figure, the new locations r,s, and t and accompanying transitions are shown separately from the original automaton. Double circles denote accepting locations. Intuitively, processing a # from an accepting location of 𝒜 takes the run to the accepting sink t. On the other hand, processing a # from a non-accepting location of 𝒜 takes the run to a component where the run continuation is accepting if and only if it processes infinitely many #’s.

It remains to show that the language L(𝒜) is strongly monitorable if and only if L(𝒜)=TΣ. One direction is trivial: If L(𝒜)=TΣ, then L(𝒜)=TΣ#ω, as all words without a # can be processed using the states of the complete automaton 𝒜 (which are all accepting in 𝒜) and all words with a # can be accepted by moving to state t (which is an accepting sink) when processing the first #. Hence, L(𝒜) is strongly monitorable.

On the other hand, if L(𝒜)TΣ, then there exists a finite word ρL(𝒜). Hence, every run prefix of 𝒜 processing ρτ(ρ)(#,τ(ρ)) must be in location r. Now, chose some aΣ. Then, for all ρ′′TΣ#, we have:

  • ρτ(ρ)(#,τ(ρ))ρ′′(a,0)(a,1)(a,2)L(𝒜) (as it contains only finitely many #).

  • ρτ(ρ)(#,τ(ρ))ρ′′(#,0)(#,1)(#,2)L(𝒜) (as it contains infinitely many #).

Hence, VL(𝒜)(ρτ(ρ)(#,τ(ρ))ρ′′)=? for all ρ′′. Thus, L(𝒜) is not strongly monitorable.

In the case for weak monitorability we reduce the (undecidable [3]) universality problem for TBA (not TA as we did in the strong case). Additionally, as an intermediate step, we consider a problem about Brzozowski derivatives of properties of infinite timed words: Let ρTΣ be a finite timed word and φTΣω be such a property. We say that ρ is a universal prefix for φ if the Brzozowski derivative

{μTΣωρμφ}

of φ and ρ is equal to TΣω. Note that if φ is equal to TΣω, then every prefix is universal for φ. However, the property (a,0)TΣω has a universal prefix (e.g., (a,0)), but is not universal.

Further, we say that φ is weakly -monitorable (cp. Definition 21) if and only if there is a ρ such that Vφ(ρ)=, i.e., in comparison to (standard) weak monitorability, we only consider the verdict . Note that φ has a universal prefix if and only if it is weakly -monitorable.

So, it remains to first reduce universality of TBA to the existence of a universal prefix for languages of TBA and then to reduce weak -monitorability to weak monitorability.

We begin with reducing TBA universality to the existence of universal prefixes. Intuitively, we add edges allowing to “restart” a run which allows every prefix to simulate the empty prefix. Then, every prefix behaves like the empty prefix, which is universal if and only if the automaton is universal.

Let 𝒜=(Q,Q0,Σ,𝒳,Δ,F) be a TBA. We add a new letter #Σ to obtain Σ#=Σ{#} and construct a TBA 𝒜=(Q,Q0,Σ#,𝒳,Δ,F) from 𝒜 such that L(𝒜)=TΣω if and only if 𝒜 has a universal prefix. To this end, we introduce two new locations r and s, i.e., Q=Q{r,s}. Next, we define Δ (see Figure 3) by copying the transitions from Δ and by adding the following transitions, where we write q𝑎q to denote (q,q,a,,true):

  • {q𝑎rqQ0,aΣ#}: from every initial location of 𝒜, there is an a-transition to r for every aΣ#.

  • {r𝑎s,s𝑎saΣ}: for every a# there is an a-transition from r to s and an a-labeled self-loop on s.

  • {s#r,r#r}: there is a #-transition from s to r and a #-labeled self-loop on r.

  • {(q,q0,#,𝒳,true)qQ,qQ0}: from every location there is a #-transition to each initial location, which resets all clocks.

We define the accepting locations of 𝒜 as F=Q{r}.

Figure 3: The TBA 𝒜 constructed for the proof of Theorem 14.

Let L(𝒜)=TΣω and fix some μTΣ#ω. If μ contains infinitely many #’s, then it is accepted by 𝒜 using the new states r and s. On the other hand, if μ contains only finitely many #’s, then it has the form

μ=ρ0(#,t0)ρ1(#,t1)(#,tn2)ρn1(#,tn1)μ′′

for some n0, where the ρi and μ′′ are #-free. As each ρi is a prefix of some word in L(𝒜)=TΣω and μ′′ is in L(𝒜)=TΣω, one can construct an accepting run of 𝒜 on μ. Thus, L(𝒜)=TΣ#ω, i.e., ε is a universal prefix of 𝒜.

Now for the other direction. If a word ρ is a universal prefix of 𝒜, then for all μTΣω, the word ρ(#,0)μ is accepted by 𝒜. Hence, there is an accepting run of 𝒜 on ρ(#,0)μ. As all #-transitions lead to an initial state of 𝒜 and reset the clocks, and as μ does not contain any #’s, the suffix of the run on μ must also be an accepting run of 𝒜, i.e., we have μL(𝒜). Thus, L(𝒜)=TΣω. This concludes the first step of our proof.

In the second and last step of our proof we reduce weak -monitorability to (standard) weak monitorability. Intuitively, we manipulate the automaton so that it can never give the verdict  while preserving the existence of observations that yield the verdict .

Let 𝒜=(Q,Q0,Σ,𝒳,Δ,F) be a TBA. We add a new letter #Σ to obtain Σ#=Σ{#} and construct a TBA 𝒜=(Q,Q0,Σ#,𝒳,Δ,F) from 𝒜 such that 𝒜 is weakly -monitorable if and only if 𝒜 is weakly monitorable.

Now Q essentially contains two copies of Q: Q1=Q×{1} and Q2=Q×{2} as well as a new additional accepting location r. The transition relation of 𝒜 is defined as follows (see also Figure 4), we write q𝑎q to denote (q,q,a,,true):

  • {(q,1)#(q,1),(q,1)#rqQ}: locations of Q1 have a #-labeled self-loop and a #-transition to r.

  • {((q,1),(q,2),a,λ,g)(q,q,a,λ,g)Δ}: locations of Q1 have their Σ-labeled transitions redirected to Q2.

  • {(q,2),(q,2),a,λ,g)(q,q,a,λ,g)Δ}: locations of Q2 have copies of the Σ-labeled transitions from 𝒜.

  • {(q,2)#(q,1)qQ}: locations of Q2 have #-labeled transitions directed back to Q1.

  • {r#r}: The new location r has a #-labeled self-loop.

The set Q0 of initial locations of 𝒜 is Q0×{1} and the set F of accepting locations of 𝒜 is F×{2}{r}.

Figure 4: The TBA 𝒜 constructed for the proof of Theorem 14. Intuitively, 𝒜 has two disjoint copies of the locations of 𝒜 and Σ-labeled transitions lead from both copies to the second copy, while #-labeled transitions from the second copy lead to the first copy. The first copy additionally has #-labeled self-loops on all locations and #-labeled transitions to r.

Now, let ρTΣ be a timed word witnessing weak -monitorability of 𝒜, i.e., ρμL(𝒜) for every μTΣω. We define ρ=ρ. In 𝒜, processing ρ leads to a location in Q2. We argue that ρ witnesses weak monitorability of 𝒜. To this end, consider any μTΣ#ω and let μ be obtained from μ by removing all occurrences of #. If μ is infinite, we may simply mimic the accepting run of 𝒜 on μ from ρ in 𝒜. Clearly, this will also be accepting. If μ is finite, μ must have a suffix of the form (#ω,τ), where τ is a sequence of timepoints. This suffix is accepted by utilizing the # transitions to r, from where the suffix (#ω,τ) can be accepted.

For the opposite direction, let ρTΣ# be a timed word witnessing weak monitorability of 𝒜. That is, either ρμL(𝒜) for all μ or ρμL(𝒜) for all μ. However, note that for any finite ρ, we have ρ(#,0)(#,1)(#,2)L(𝒜), due to the #-labeled transition to r, from where (#,0)(#,1)(#,2) is accepted. Thus, we must be in the first case where we have ρμL(𝒜) for all μ.

Now, let ρTΣ be obtained from ρ by stripping all occurrences of # in ρ. We show that ρ is a word witnessing weak -monitorability of 𝒜. Note that any run of 𝒜 on ρ reaching a location in Q1 or Q2 can be mimicked by a run of 𝒜 on ρ reaching the corresponding location in Q. Let μTΣω. Then ρμL(𝒜). Clearly, this must be due to an accepting run where a suffix of the run processing μ stays in Q2. Hence, ρμL(𝒜), as we may mimic, for the prefix ρ, the prefix processing ρ of the accepting run of 𝒜 processing ρμ, and, for the suffix μ, we simply copy the run staying in Q2.

Due to Remark 12, we also obtain the undecidability of strong and weak (ρ,t)-monitorability.

Corollary 15.

Strong and weak (ρ,t)-monitorability is undecidable for properties given by TBA, even if (ρ,t) is fixed.

4 Monitorability for DTMA

In this section, we show that (strong and weak) monitorability is decidable for properties given by DTMA. The key difference to TBA, for which we have shown that monitorability is undecidable, is that they are trivially closed under complement [3], which we rely on in our proof. This again demonstrates the importance of having automata for the property and its complement, as noted throughout this paper.

Let us begin by introducing some notation and definitions. Fix some TBA or TMA 𝒜=(Q,Q0,Σ,𝒳,Δ,Acc). We write (q0,v0)𝜌𝒜(qn,vn) for a finite timed word ρ=(σ,τ)TΣ to denote the existence of a finite sequence

(q0,v0)(σ1,τ1)(q1,v1)(σ2,τ2)(σn,τn)(qn,vn)

of states, where for all 1in there is a transition (qi1,qi,σi,λi,gi) such that vi(c)=0 for all c in λi and vi1(c)+(τiτi1) otherwise, and g is satisfied by the valuation vi1+(τiτi1), where we use τ0=0.

Definition 16 (Non-Empty Language States, Reach Set, Pre).

Let 𝒜 be a TBA or TMA.

  • The set of non-empty language states of 𝒜 is

    S𝒜ne={ss is a state of 𝒜 and L(𝒜,s)}.

    Here, L(𝒜,s) is the set of infinite timed words accepted by a run starting in the state s.

  • Given an observation (ρ,t), the set of states in which a run over ρ can end starting from the initial states of 𝒜 after time t has passed is

    𝒯𝒜(ρ,t)=q0Q0{(q,v+(tτ(ρ)))(q0,v0)𝜌𝒜(q,v)},

    where v0 is the clock valuation mapping every clock to 0. We call 𝒯𝒜(ρ,t) the reach set of (ρ,t) in 𝒜.

  • We define Pre𝒜(S) of a set S of states as

    {(q,v)(q,v)𝜌𝒜(q,v) for some (q,v+t)S,ρTΣ, and t0}.

A symbolic state is a pair (q,Z) of a location q and a zone Z. A zone is a finite conjunction of clock constraints of the form x1n or x1x2n, where x1,x2 are clocks, {<,,=,,>}, and n. Such a zone describes a convex set of clock valuations. Zones may be efficiently represented using so-called Difference-bounded Matrices (DBM) [11]. Finite unions of zones are closed under all Boolean operations.

Proposition 17 ([23]).

There are zone-based algorithms for the following problems:

  • Given a TBA, compute its nonempty language states.

  • Given a TBA or TMA 𝒜 and an observation (ρ,t), compute the reach set 𝒯𝒜(ρ,t).

  • Given a TBA or TMA 𝒜 and a finite union S of symbolic states, compute Pre𝒜(S).

We continue by showing that the non-empty language states can also be computed for TMA, relying on an analysis of Alur and Dill’s translation of TMA into equivalent TBA [3]. Here, we just present the parts of their construction we need to prove our results.

Lemma 18.

There is a zone-based algorithm that, given a TMA, computes its nonempty language states.

Proof.

Fix a TMA 𝒜=(Q,Q0,Σ,𝒳,Δ,). The translation from TMA to TBA relies on the fact that L(𝒜)=FL(𝒜F), where 𝒜F is the TMA (Q,Q0,Σ,𝒳,Δ,{F}}. Alur and Dill translated each such 𝒜F into an equivalent TBA 𝒜F with set Q×{0,1,,|F|} of locations and the same clocks as 𝒜. Then, the disjoint union of the 𝒜F for F is a TBA that is equivalent to 𝒜.

The TBA 𝒜F constructed by Alur and Dill satisfy the following fact: L(𝒜F,((q,0),v))=L(𝒜F,(q,v)) for all locations q of 𝒜 and all clock valuations. Thus, we have

S𝒜ne=F{(q,v)((q,0),v)S𝒜Fne}.

Hence, we can symbolically compute the non-empty language states of 𝒜 by symbolically computing the non-empty states of the 𝒜F and then project the states of the form (q,0) to q, but leaving the zones unchanged.

Using this result, we can decide monitorability.

Theorem 19.

Strong and weak (ρ,t)-monitorability are decidable for properties given by DTMA.

Proof.

We assume w.l.o.g. that the DTMA we are using are complete in the sense that every word has a run, which then must be unique due to determinism. This can always be achieved by adding a fresh sink location and by rerouting all missing transitions to it (while preserving determinism). Then, the reach-set 𝒯𝒜(ρ,t) of any observation (ρ,t) is a singleton set, as 𝒜 is deterministic and complete. Thus, we identify 𝒯𝒜(ρ,t) with the unique state in it.

Now, given 𝒜, we first compute the set S𝒜ne of non-empty language states (see Lemma 18). Its complement is the set of empty language states, i.e., the set of states for which there is no accepting run starting there. Let us denote this set as S𝒜=S𝒜ne¯ and note that we have 𝒯𝒜(ρ,t)S𝒜 if and only if VL(𝒜)(ρ,t)=, i.e., we can characterize the negative verdict in terms of the set S𝒜.

We now use backwards reachability to compute the set of states that can reach S𝒜. These are the states from where it is possible to reach a -verdict. The sets S𝒜ne, S𝒜 and Pre𝒜(S𝒜) are illustrated in Fig. 5, where Pre𝒜(S𝒜) is the gray area.

Figure 5: Representation of all states of an automaton 𝒜. On the left, only the empty language states S𝒜 and non-empty language states S𝒜ne are shown. On the right, the states in Pre𝒜(S𝒜) are gray. The solid arrows are examples of possible transitions and the dashed arrows are examples of impossible transitions. A state in S𝒜 has no accepting run, thus cannot reach S𝒜ne. A state in S𝒜ne might reach a state in S𝒜. A state outside Pre𝒜(S𝒜) cannot reach S𝒜.

By definition, we have 𝒯𝒜(ρ,t)Pre𝒜(S𝒜) if and only if there exists a ρTΣ and a t0 such that s0ρtρ(q,v) with (q,v+t)S𝒜, where s0 denotes the unique initial state of 𝒜. The latter condition is equivalent to the existence of a ρTΣ such that s0ρtρs for some sS𝒜. Hence, 𝒯𝒜(ρ,t)Pre𝒜(S𝒜) if and only if there exists a ρTΣ such that VL(𝒜)(ρtρ)=. Thus, 𝒯𝒜(ρ,t)Pre𝒜(S𝒜) if and only if monitoring any extension of (ρ,t) will not provide the verdict , i.e., VL(𝒜)(ρtρ) for all ρTΣ. Since DTMA are complementable, we can compute S𝒜¯ for a complement automaton 𝒜¯ of 𝒜 and provide the dual characterization for the -verdict: 𝒯𝒜¯(ρ,t)Pre𝒜¯(S𝒜¯) if and only if VL(𝒜)(ρtρ) for all ρTΣ. Here, we rely on the fact that we have VL(ρ,t)= if and only if VL¯(ρ,t)= and VL(ρ,t)= if and only if VL¯(ρ,t)=.

Now, recall that we can complement DTMA by only changing the acceptance condition, i.e., we can assume w.l.o.g. that 𝒜 and 𝒜¯ have the same locations, clocks, and transitions, and thus we have 𝒯𝒜(ρ,t)=𝒯𝒜¯(ρ,t) for all (ρ,t).

Hence, using the above characterizations, we have 𝒯𝒜(ρ,t)S𝒜S𝒜¯ if and only if VL(𝒜)(ρ,t){,} and thus 𝒯𝒜(ρ,t)Pre𝒜(S𝒜S𝒜¯) if and only if there exists a ρTΣ such that VL(𝒜)(ρtρ){,}. Thus, L(𝒜) is weakly (ρ,t)-monitorable if and only if

𝒯𝒜(ρ,t)Pre𝒜(S𝒜S𝒜¯).

For strong monitorability, we need one extra step corresponding to the additional quantifier in the definition. By complementing Pre𝒜(S𝒜S𝒜¯), we obtain the set of states for which the monitoring verdict will forever be ?: we have 𝒯𝒜(ρ,t)Pre𝒜(S𝒜S𝒜¯)¯ if and only if VL(𝒜)(ρtρ)=? for all ρTΣ.

Then, by using backwards reachability another time, we can compute the set of states from where it is possible to reach a state from which only the verdict ? can be given: we have 𝒯𝒜(ρ,t)Pre𝒜(Pre𝒜(S𝒜S𝒜¯)¯) if and only if there exists a ρTΣ such that for all ρ′′TΣ, we have VL(𝒜)(ρtρρ′′)=?. Thus, L(𝒜) is strongly (ρ,t)-monitorable if and only if

𝒯𝒜(ρ,t)Pre𝒜(Pre𝒜(S𝒜S𝒜¯)¯).

Due to Lemma 17 and Lemma 18, both the characterization of weak (ρ,t)-monitorability and the one of strong (ρ,t)-monitorability are effectively decidable.

Due to Remark 12, we also obtain the decidability of strong and weak monitorability.

Corollary 20.

Strong and weak monitorability are decidable for properties given by DTMA.

5 Monitorability with Step-Bounded Horizons

Strong monitorability of a property ensures that at any time during monitoring, the observation (ρ,t) made so far can be extended by some finite ρ such that a conclusive verdict can be made after ρtρ. Thus, in the setting of strong monitorability, it is always meaningful to keep monitoring. In contrast, for weakly monitorable properties, the ability to make a conclusive verdict after some future (finite) monitoring is not guaranteed. Ideally, we would like to refine the rather uninformative verdict ? with guaranteed minimum bounds on the number of future events before a positive or negative verdict can be made. In case both these bounds are , further monitoring is useless as the verdicts reported will always be ?. Here it is prudent to distinguish between the two definitive verdicts, as they have different decidability properties.

Definition 21 (Weak Monitorability with Step-Bounded Horizons).

Fix a property φTΣω, an observation (ρ,t), and a bound n.

  • φ is bounded weakly -(ρ,t)-monitorable with respect to n if and only if

     there exists ρTΣn such that Vφ(ρtρ)=.
  • φ is bounded weakly -(ρ,t)-monitorable with respect to n if and only if

     there exists ρTΣn such that Vφ(ρtρ)=.
  • φ is bounded weakly (ρ,t)-monitorable with respect to n if and only if

     there exists ρTΣn such that Vφ(ρtρ){,}.
  • φ is bounded weakly -monitorable with respect to n if it is bounded weakly -(ε,0)-monitorable with respect to n.

  • φ is bounded weakly -monitorable with respect to n if it is bounded weakly -(ε,0)-monitorable with respect to n.

  • φ is bounded weakly monitorable with respect to n if it is bounded weakly (ε,0)-monitorable with respect to n.

In the following, we show that bounded weak monitorability and bounded weak -monitorability are undecidable, but that bounded weak -monitorability is decidable.

Theorem 22.

Bounded weak -monitorability is undecidable for properties given by TBA.

Proof.

Let φ be a property given by a TBA 𝒜. Then universality of 𝒜 is equivalent to bounded weak -monitorability of φ for the bound n=0. As universality for timed automata is undecidable [3], 0-bounded weak -monitorability for TBA properties is undecidable.

Next, we show that weak -(ρ,t)-monitorability behaves differently.

Theorem 23.

Bounded weak -(ρ,t)-monitorability is decidable for properties given by TBA.

Proof.

Let (ρ,t) be an observation with ρ=(σ1,t1)(σ2,t2)(σm,tm) and let the property be given by the TBA 𝒜.

Let π=q0σ1,λ1,g1q1qm+n1σm+n,λm+n,gm+nqm+n be a syntactic path of length m+n of the TBA 𝒜 induced by transitions (qi,qi+1,σi,λi,gi). Also, let τ={τ1,,τm+n} be the set of variables ranging over global time (i.e., 0), where τi denotes the time at which the i-th transition is taken. Clearly, τi=ti for i=1,,m. Most importantly, there is a zone Zπ(τ) over τ that precisely captures when (σ,τ) is a timed word realizing π. In this case, we may also express the resulting clock valuation after realizing (σ,τ) on π as vπ(τ)=(vπ1,,vπk), where k is the number of clocks of 𝒜 and vπi=τm+nτ(i), with (i) being the index of the last transition when the clock xi was reset. Now, if (qm+n,vπ(τ))S𝒜ne, then the run of (σ,τ) following π cannot be extended to an accepting run of 𝒜.

Witnesses for weak monitorability are closed under extensions. Hence, in the following construction, we can restrict ourselves w.l.o.g. to words of length exactly n instead of words of length at most n. The following formula expresses the existence of a timed word ρ=(σ,τ) of length n such that all runs on ρtρ end in a state outside of S𝒜ne, witnessing VL(𝒜)(ρtρ)=:

τ1τm+n.i=1mτi=tiτmtτm+1(σm+1σm+nΣnπSP(Zπ(τ)vπ(τ)S𝒜ne)),

where SP is the set of syntactic paths of the form

π=q0g1,σ1,λ1q1gm,σm,λmqmqm+n1σm+n,λm+n,gm+nqm+n.

The formula above expresses the existence of values for τ1,,τm+n, with τi=ti for i=1,,m, and τmtτm+1, ensuring that only extensions of the observation (ρ,t) are considered. The last part of the formula ensures the existence of a timed word ρ=(σ,τ), where σ=σm+1σm+n and τ=τm+1τm+n, where all runs – which are captured by Zπ(τ) – are outside S𝒜ne. The formula is in the first order theory of real-closed fields, which is decidable [33]. Thus, bounded weak -monitorability is decidable for properties given by TBA.

 Remark 24.

It follows from Theorem 23 that for properties where both the property and its complement are given by TBA, bounded weak monitorability is decidable. Hence, if the property is given by a DTMA, then bounded weak monitorability is decidable. Moreover, one can even compute the tightest bound n by doing a breadth-first search over the symbolic state graph of the deterministic timed automaton, searching for a (shortest) path to the empty language states.

Lastly, we prove bounded weak monitorability undecidable for properties given by TBA.

Theorem 25.

Bounded weak monitorability is undecidable for properties given by TBA.

Proof.

In the second step of the undecidability proof of weak monitorability (see Theorem 14), we have shown how to reduce weak -monitorability to weak monitorability. The same construction reduces bounded weak -monitorability to bounded weak monitorability, as the length of the witnesses is only decreased by removing #’s.

Due to Remark 12, we also obtain results for the remaining cases.

Corollary 26.

Bounded weak -(ρ,t)-monitorability and bounded weak (ρ,t)-monitorability are undecidable (even for fixed (ρ,t)) while bounded weak -monitorability is decidable.

6 Refined Monitoring with Time-Horizon Verdicts

In the previous section, we have shown that the uninformative verdict ? can be refined by checking whether within a bounded number of new observations, a definitive verdict may be given. In this section, we again refine the uninformative verdict ? by computing lower bounds on the time that needs to pass (independently of the number of events observed during that time) before a definitive verdict may be given. Again, if this is infinite, then the monitoring process can be stopped, as no amount of waiting will yield a definitive verdict. This refinement was introduced and briefly studied as “time predictive monitoring” by Grosen et al. [23]. Here we revisit (and rename) this notion by proving computability of the time-bounded monitorability for properties given by a DTMA.

Recall that time passing without any new observed events can nevertheless yield definitive verdicts (see, e.g., the last two items in Example 7). Thus, in a practical setting, one is interested in intermittently querying the monitoring function even if no events are observed. Here, we give lower bounds on the time one should let pass before the next such query is made, thereby reducing the computational overhead of these queries.

Definition 27 (Refined Monitoring with Time-Horizon Verdicts).

Given an observation (ρ,t) and a property φTΣω, the refined monitoring function Pφ is defined as

Pφ(ρ,t)={if Vφ(ρ,t)=,if Vφ(ρ,t)=,(Pφ(ρ,t),Pφ(ρ,t))otherwise,

with

  • Pφ(ρ,t)=inf{tρTΣ such that Vφ(ρtρ,t)= and tτ(ρtρ)} and

  • Pφ(ρ,t)=inf{tρTΣ such that Vφ(ρtρ,t)= and tτ(ρtρ)},

where we use the convention inf=.

Example 28.

Consider the MITL property φ=F[20,40]b. Monitoring the finite timed word ρ=(a,5.1)(c,21.0)(c,30.4)(b,35.1)(a,40.2) will result in three ? verdicts followed by the verdict when (b,35.1) is read. However, we may offer significantly more information, e.g., when reading (a,5.1) it is clear that at least 14.9 time-units must elapse before we can give the verdict , and at least 34.9 time-units must elapse before we can give the verdict . Hence, Pφ((a,5.1),5.1)=(14.9,34.9).

 Remark 29.

Vφ(ρ,t)= implies Pφ(ρ,t)=0 and Pφ(ρ,t)= and Vφ(ρ,t)= implies Pφ(ρ,t)= and Pφ(ρ,t)=0, but the converse is in general not true. Consider, for example, the MITL property φ=F0a and the observation ρ=(b,1). Then, Pφ(ρ,1)=0 (witnessed by ρ=(a,0) for which we have Vρtρ=) and Pφ=, but Vφ(ρ,1)=?.

Time-bounded monitorability for an observation (ρ,t) refines weak (ρ,t)-monitorability.

Lemma 30.

Let (ρ,t) be an observation and φ a property. Then, φ is weakly (ρ,t)-monitorable if and only if at least one of the values Pφ(ρ,t) and Pφ(ρ,t) is finite.

Proof.

Let φ be weakly (ρ,t)-monitorable, i.e., there is a ρTΣ such that Vφ(ρtρ){,}, say it is (the other case is analogous). Then, ρ witnesses Pφ(ρ,t)τ(ρ), i.e., Pφ(ρ,t) is finite. On the other hand, if (say) Pφ(ρ,t) is finite (the other case is analogous), then there is a ρ such that Vφ(ρtρ)=. Hence, φ is weakly (ρ,t)-monitorable.

Theorem 31 (Refined Monitoring is Effective).

Pφ is effectively computable, if φ is given by a DTMA.

Proof.

When online-monitoring φ over some observation (ρ,t), we compute the reach-set 𝒯𝒜(ρ,t) and check if it is a subset of the non-empty language states S𝒜ne or a subset of the empty language states S𝒜 [23]. Thus, Pφ(ρ,t) is the infimum of the time duration of all paths from 𝒯𝒜(ρ,t) to S𝒜. This is a time-optimal reachability problem.

Asarin and Maler [7] introduced the concept of time-optimal strategies for timed game automata. Since timed game automata trivially generalize timed automata, we can adapt the computation of the optimal time bound to obtain the minimal possible time to reach an empty language state from the reach-set. This gives us the value P𝒜(ρ,t).

Since DTMA are closed under complement, the same procedure for the complement automaton gives us the value P𝒜(ρ,t).

As explained in the proof of Theorem 31, monitoring is implemented by keeping track of the reach-set of the observation and checking at each update whether it is contained in the non-empty language states or in the empty language states. But, as explained in the introduction of this section, one should not only update the reach-set when a new event is observed, but also intermittently when time has passed.

For this special case where only time passes, which is covered in Definition 27 by considering ρ=ε in the infimum, we do not need to solve the expensive time-optimal reachability problem described in the proof of Theorem 31. Instead, we rely on zone operations to compute δφ(ρ,t)=inf{dVφ(ρ,t+d){,}}. This is done by exploring all delays (removing the upper bounds of the zones) and subtracting the non-empty language states. The lower bounds in the zones of the resulting states gives the minimum time a verdict can be made by waiting. Now, having observed ρ and the current time being t such that Vφ(ρ,t)=?, querying the monitoring function again without a new observation before time t+δφ(ρ,t) will not yield a different verdict and can thus be avoided.

7 Related Work

A formal notion of monitorability was first introduced by Pnueli and Zaks in their work on monitoring Property Specification Language (PSL) [29]. In that work, the authors defined strong monitorability given a finite prefix, called σ-monitorability, on which we base our (ρ,t)-monitorability. From this, Bauer, Leuker, and Schallhart defined the most common definition of monitorability, that is strong σ-monitorability from the initial state [10]. They proved that safety and guarantee properties are a proper subset of the class of strongly monitorable properties. Later, Chen et al. [13] and Peled and Havelund [28] noticed that there exist properties that are not strongly monitorable but still have utility to monitor, and proposed equivalent definitions of weak monitorability. Mascle et al. showed the monitorability of LTL properties can be improved by considering robust semantics [27]. The term strong monitorability has been used before in the context of partially observable stochastic systems modeled as Hidden Markov Models. Sistla, Žefran, and Feng first used the term, contrasted with (standard) monitorability [32] in their work extending the results of Gondi, Patel, and Sistla on monitoring ω-regular properties of stochastic systems [21].

The complexity of monitorability problems has been studied in other untimed settings. Diekert and Leuker proposed a topological definition of strong monitorability, showing that problem is equivalent to showing that the boundary in the Cantor topology has an empty interior [16]. Diekert, Muscholl, and Walukiewicz later proved that deciding monitorability for (untimed) Büchi automata is PSpace-complete [18]. Agrawal and Bonakdarpour proposed a definition of monitorability for hyperproperties and determined the monitorable classes for their three-valued specification language, HyperLTL [15]. Francalanza, Aceto, and Ingolfsdottir characterized monitorable properties of the branching-time μ-Hennessy-Milner Logic [19]. This was later extended by Aceto et al. who introduced a hierarchy of monitorable fragments of the language [1].

Attempts have been made to unify these different notions of monitorability. Peled and Havelund introduced a classification for properties centered around monitorability [28]. Kauffman, Havelund, and Fischmeister defined a common notation for strong and weak monitorability for different verdict domains [24]. Aceto, Achilleos, and Francalanza provided syntactic characterizations of monitorability for classical notions of monitorability as well as for a variant of the modal μ-calculus, recHML [2].

We are aware of only one other work addressing monitorability for real-time properties. Amara et al. (very recently) introduced a new linear-time timed μ-calculus, which subsumes MTL, and therefore also MITL, and identified its largest monitorable fragment [6]. Their work differs from ours in three important respects. First, they rely on a definition of monitorability introduced by Schneider as Execution Monitoring Enforceability [31] while we use the more typical definition of strong and weak monitorability due to Pnueli and Zaks [29]. Second, they introduce a new calculus and characterize its maximal monitorable fragment. We instead consider the case of properties expressed as Timed Automata, which lend themselves to algorithmic manipulation. Finally, we prove decidability and undecidability results.

8 Conclusion

In this work, we have studied monitorability for timed properties specified by either (possibly nondeterministic) TBA or by deterministic TMA. In general, we proved monitorability decidable for specifications given by deterministic automata and undecidable for specifications given by nondeterministic automata. The notable exception here is bounded weak -monitorability, which is even decidable for nondeterministic TBA.

Also, we provided refinements of monitoring and monitorability making the verdict ? more informative by providing bounds on the number of events or the amount of time that needs to pass before a conclusive verdict may be given. In practical settings, this is crucial information and also allows to optimize the monitoring process in the real-time setting.

Our decidability proof for monitorability of DTMA relies on the fact that DTMA can be complemented without changing the state space. On the other hand, monitorability is undecidable if the property is given by a TBA. Thus, another question for further research is to consider strong monitorability when given TBA for the property and for its negation. This is a very natural setting, as the specification logic MITL is closed under negation and can be translated into TBA. Also, monitoring often requires TBA for both the property and its negation [23, 20, 14].

References

  • [1] Luca Aceto, Antonis Achilleos, Adrian Francalanza, Anna Ingólfsdóttir, and Karoliina Lehtinen. Adventures in monitorability: From branching to linear time and back again. In Symposium on Principles of Programming Languages (POPL’19), volume 3. ACM, January 2019. doi:10.1145/3290365.
  • [2] Luca Aceto, Antonis Achilleos, Adrian Francalanza, Anna Ingólfsdóttir, and Karoliina Lehtinen. An operational guide to monitorability with applications to regular properties. Software and Systems Modeling, 20(2):335–361, April 2021. doi:10.1007/s10270-020-00860-z.
  • [3] 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.
  • [4] Rajeev Alur, Tomás Feder, and Thomas A. Henzinger. The benefits of relaxing punctuality. J. ACM, 43(1):116–146, 1996. doi:10.1145/227595.227602.
  • [5] Rajeev Alur and P. Madhusudan. Decision problems for timed automata: A survey. In Formal Methods for the Design of Real-Time Systems: International School on Formal Methods for the Design of Computer, Communication, and Software Systems, volume 3185 of LNCS, pages 1–24. Springer, 2004. doi:10.1007/978-3-540-30080-9_1.
  • [6] Mouloud Amara, Giovanni Bernardi, Mohammed Foughali, and Adrian Francalanza. A theory of (linear-time) timed monitors. In 39th European Conference on Object-Oriented Programming (ECOOP 2025), volume 333, Bergen (NO), Norway, June 2025. URL: https://hal.science/hal-05043055.
  • [7] Eugene Asarin and Oded Maler. As soon as possible: Time optimal control for timed automata. In Frits W. Vaandrager and Jan H. van Schuppen, editors, Hybrid Systems: Computation and Control, Second International Workshop, HSCC’99, Berg en Dal, The Netherlands, March 29-31, 1999, Proceedings, volume 1569 of LNCS, pages 19–30. Springer, 1999. doi:10.1007/3-540-48983-5_6.
  • [8] David Basin, Felix Klaedtke, and Eugen Zălinescu. Algorithms for monitoring real-time properties. In Runtime Verification, pages 260–275. Springer, 2012. doi:10.1007/978-3-642-29860-8_20.
  • [9] Andreas Bauer, Martin Leucker, and Christian Schallhart. Monitoring of real-time properties. In Foundations of Software Technology and Theoretical Computer Science, pages 260–272, Berlin, Heidelberg, 2006. Springer. doi:10.1007/11944836_25.
  • [10] Andreas Bauer, Martin Leucker, and Christian Schallhart. Runtime verification for LTL and TLTL. ACM Transactions on Software Engineering and Methodology (TOSEM), 20(4):14:1–14:64, September 2011. doi:10.1145/2000799.2000800.
  • [11] Johan Bengtsson and Wang Yi. Timed automata: Semantics, algorithms and tools. In Jörg Desel, Wolfgang Reisig, and Grzegorz Rozenberg, editors, Lectures on Concurrency and Petri Nets, Advances in Petri Nets [This tutorial volume originates from the 4th Advanced Course on Petri Nets, ACPN 2003, held in Eichstätt, Germany in September 2003. In addition to lectures given at ACPN 2003, additional chapters have been commissioned], volume 3098 of Lecture Notes in Computer Science, pages 87–124. Springer, 2003. doi:10.1007/978-3-540-27755-2_3.
  • [12] Thomas Brihaye, Gilles Geeraerts, Hsi-Ming Ho, and Benjamin Monmege. MightyL: A compositional translation from MITL to timed automata. In Rupak Majumdar and Viktor Kuncak, editors, CAV 2017, Part I, volume 10426 of LNCS, pages 421–440, Cham, 2017. Springer. doi:10.1007/978-3-319-63387-9_21.
  • [13] Zhe Chen, Yifan Wu, Ou Wei, and Bin Sheng. Deciding weak monitorability for runtime verification. In Int. Conference on Software Engineering (ICSE’18), pages 163–164. ACM, 2018. doi:10.1145/3183440.3195077.
  • [14] Alessandro Cimatti, Thomas Møller Grosen, Kim G. Larsen, Stefano Tonetta, and Martin Zimmermann. Exploiting assumptions for effective monitoring of real-time properties under partial observability. In Alexandre Madeira and Alexander Knapp, editors, SEFM, volume 15280 of LNCS, pages 70–88. Springer, 2024. doi:10.1007/978-3-031-77382-2_5.
  • [15] Michael R. Clarkson, Bernd Finkbeiner, Masoud Koleini, Kristopher K. Micinski, Markus N. Rabe, and César Sánchez. Temporal logics for hyperproperties. In Int. Conference on Principles of Security and Trust (POST’14), volume 8414 of LNCS, pages 265–284. Springer, 2014. doi:10.1007/978-3-642-54792-8_15.
  • [16] Volker Diekert and Martin Leucker. Topology, monitorable properties and runtime verification. Theoretical Computer Science, 537:29–41, 2014. doi:10.1016/j.tcs.2014.02.052.
  • [17] Volker Diekert and Anca Muscholl. On distributed monitoring of asynchronous systems. In Logic, Language, Information and Computation, volume 7456 of LNTCS, pages 70–84. Springer, 2012. doi:10.1007/978-3-642-32621-9_5.
  • [18] Volker Diekert, Anca Muscholl, and Igor Walukiewicz. A note on monitors and Büchi automata. In Theoretical Aspects of Computing - ICTAC 2015, volume 9399 of LNTCS, pages 39–57. Springer, 2015. doi:10.1007/978-3-319-25150-9_3.
  • [19] Adrian Francalanza, Luca Aceto, and Anna Ingolfsdottir. Monitorability for the Hennessy-Milner logic with recursion. Formal Methods in System Design, 51(1):87–116, August 2017. doi:10.1007/s10703-017-0273-z.
  • [20] Martin Fränzle, Thomas Møller Grosen, Kim G. Larsen, and Martin Zimmermann. Monitoring real-time systems under parametric delay. In Nikolai Kosmatov and Laura Kovács, editors, IFM 2024, volume 15234 of LNCS, pages 194–213. Springer, 2024. doi:10.1007/978-3-031-76554-4_11.
  • [21] Kalpana Gondi, Yogeshkumar Patel, and A. Prasad Sistla. Monitoring the full range of ω-regular properties of stochastic systems. In Neil D. Jones and Markus Müller-Olm, editors, Verification, Model Checking, and Abstract Interpretation, pages 105–119, Berlin, Heidelberg, 2009. Springer. doi:10.1007/978-3-540-93900-9_12.
  • [22] Thomas Møller Grosen, Sean Kauffman, Kim G. Larsen, and Martin Zimmermann. Time for timed monitorability. arXiv, 2504.10008, 2025. doi:10.48550/arXiv.2504.10008.
  • [23] Thomas Møller Grosen, Sean Kauffman, Kim Guldstrand Larsen, and Martin Zimmermann. Monitoring timed properties (revisited). In Sergiy Bogomolov and David Parker, editors, FORMATS 2022, volume 13465 of LNCS, pages 43–62. Springer, 2022. doi:10.1007/978-3-031-15839-1_3.
  • [24] Sean Kauffman, Klaus Havelund, and Sebastian Fischmeister. What can we monitor over unreliable channels? International Journal on Software Tools for Technology Transfer, 23:579–600, June 2021. doi:10.1007/s10009-021-00625-z.
  • [25] Kim Guldstrand Larsen, Marius Mikucionis, and Brian Nielsen. Online testing of real-time systems using uppaal. In Formal Approaches to Software Testing, volume 3395 of LNCS, pages 79–94. Springer, 2004. doi:10.1007/978-3-540-31848-4_6.
  • [26] N.G. Leveson and C.S. Turner. An investigation of the therac-25 accidents. Computer, 26(7):18–41, 1993. doi:10.1109/MC.1993.274940.
  • [27] Corto Mascle, Daniel Neider, Maximilian Schwenger, Paulo Tabuada, Alexander Weinert, and Martin Zimmermann. From LTL to rltl monitoring: improved monitorability through robust semantics. Formal Methods Syst. Des., 59(1):170–204, 2021. doi:10.1007/S10703-022-00398-4.
  • [28] Doron Peled and Klaus Havelund. Refining the safety–liveness classification of temporal properties according to monitorability. In Models, Mindsets, Meta: The What, the How, and the Why Not? Essays Dedicated to Bernhard Steffen on the Occasion of His 60th Birthday, volume 11200 of LNCS, pages 218–234. Springer, 2019. doi:10.1007/978-3-030-22348-9_14.
  • [29] A. Pnueli and A. Zaks. PSL model checking and run-time verification via testers. In Jayadev Misra, Tobias Nipkow, and Emil Sekerinski, editors, FM 2006: Formal Methods, pages 573–586, Berlin, Heidelberg, 2006. Springer. doi:10.1007/11813040_38.
  • [30] Narad Rampersad, Jeffrey O. Shallit, and Zhi Xu. The computational complexity of universality problems for prefixes, suffixes, factors, and subwords of regular languages. Fundam. Informaticae, 116(1-4):223–236, 2012. doi:10.3233/FI-2012-680.
  • [31] Fred B. Schneider. Enforceable security policies. ACM Trans. Inf. Syst. Secur., 3(1):30–50, February 2000. doi:10.1145/353323.353382.
  • [32] A. Prasad Sistla, Miloš Žefran, and Yao Feng. Monitorability of stochastic dynamical systems. In Ganesh Gopalakrishnan and Shaz Qadeer, editors, Computer Aided Verification, pages 720–736, Berlin, Heidelberg, 2011. Springer. doi:10.1007/978-3-642-22110-1_58.
  • [33] Alfred Tarski. A decision method for elementary algebra and geometry. In Bob F. Caviness and Jeremy R. Johnson, editors, Quantifier Elimination and Cylindrical Algebraic Decomposition, pages 24–84, Vienna, 1998. Springer Vienna.
  • [34] Prasanna Thati and Grigore Roşu. Monitoring algorithms for metric temporal logic specifications. Electronic Notes in Theoretical Computer Science, 113:145–162, 2005. doi:10.1016/j.entcs.2004.01.029.

Revision Notice

This is a revised version of the eponymous paper that appeared in the proceedings of CONCUR 2025 (LIPIcs, volume 348, https://www.dagstuhl.de/dagpub/978-3-95977-389-8, published in August, 2025), in which it was erroneously claimed in the proof of Theorem 19 that

𝒜 is strongly (ρ,t)-monitorable if and only if 𝒯𝒜(ρ,t)Pre𝒜(S𝒜pe¯)Pre𝒜(S𝒜¯pe¯)”,

where S𝒜pe denotes the set Pre𝒜(S𝒜): The DTMA in Figure 6 provides a counterexample to that claim. As the automaton does not have any clocks, let v denote the unique clock valuation over the empty set of clocks. On the one hand, L(𝒜) is strongly (ε,0)-monitorable, on the other hand we have 𝒯𝒜(ε,0)=(1,v){(1,v)}=Pre𝒜(S𝒜pe¯)Pre𝒜(S𝒜¯pe¯).

Figure 6: The DTMA for the counterexample. Note that a complement automaton can be obtained by using the same locations and transitions, and the acceptance condition ={{3},{4}}.

In this revised version, we present a correct characterisation of strong (ρ,t)-monitorability. For didactic purposes, we have refined the full proof of Theorem 19, including the (correct) characterisation of weak (ρ,t)-monitorability. To this end, we also simplified the definition of Pre𝒜(S) (see Definition 16), which is only used in the proof of Theorem 19.


Dagstuhl Publishing – October 07, 2025