This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Verification and Parameter Synthesis for Real-Time Programs using Refinement of Trace Abstraction111A preliminary version of this work appeared in [13].

Franck Cassez
Department of Computing
Macquarie University
Sydney, Australia
   Peter Gjøl Jensen
Department of Computer Science
Aalborg University
Denmark
   Kim Guldstrand Larsen
Department of Computer Science
Aalborg University
Denmark
Abstract

We address the safety verification and synthesis problems for real-time systems. We introduce real-time programs that are made of instructions that can perform assignments to discrete and real-valued variables. They are general enough to capture interesting classes of timed systems such as timed automata, stopwatch automata, time(d) Petri nets and hybrid automata. We propose a semi-algorithm using refinement of trace abstractions to solve both the reachability verification problem and the parameter synthesis problem for real-time programs. All of the algorithms proposed have been implemented and we have conducted a series of experiments, comparing the performance of our new approach to state-of-the-art tools in classical reachability, robustness analysis and parameter synthesis for timed systems. We show that our new method provides solutions to problems which are unsolvable by the current state-of-the-art tools.

1 Introduction

Model-checking is a widely used formal method to assist in verifying software systems. A wide range of model-checking techniques and tools are available and there are numerous successful applications in the safety-critical industry and the hardware industry – in addition the approach is seeing an increasing adoption in the general software engineering community. The main limitation of this formal verification technique is the so-called state explosion problem. Abstraction refinement techniques were introduced to overcome this problem. The most well-known technique is probably the Counter Example Guided Abstraction Refinement (CEGAR) method pioneered by Clarke et al. [19]. In this method the state space is abstracted with predicates on the concrete values of the program variables. The (counter-example guided) trace abstraction refinement (TAR) method was proposed later by Heizmann et al. [26, 27] and is based on abstracting the set of traces of a program rather than the set of states. These two techniques have been widely used in the context of software verification. Their effectiveness and versatility in verifying qualitative (or functional) properties of C programs is reflected in the most recent Software Verification competition results [8].

Analysis of timed systems.

Reasoning about quantitative properties of programs requires extended modeling features like real-time clocks. Timed Automata [2] (TA), introduced by Alur and Dill in 1989, is a very popular formalism to model real-time systems with dense-time clocks. Efficient symbolic model-checking techniques for TA are implemented in the real-time model-checker Uppaal [5]. Extending TA, e.g., with the ability to stop and resume clocks (stopwatches), leads to undecidability of the reachability problem [14, 29] which is the basic verification problem. As a result, semi-algorithms have been designed to verify extended classes of TA e.g., hybrid automata, and are implemented in a number of dedicated tools [23, 25, 28]. However, a common difficulty with the analysis of quantitative properties of timed automata and extensions thereof is that specialized data-structures are needed for each extension and each type of problem. As a consequence, the analysis tools have special-purpose efficient algorithms and data-structures suited and optimized only towards their specific problem and extension.

In this work we aim to provide a uniform solution to the analysis of timed systems by designing a generic semi-algorithm to analyze real-time programs which semantically captures a wide range of specification formalisms, including hybrid automata. We demonstrate that our new method provides solutions to problems which are unsolvable by the current state-of-the-art tools. We also show that our technique can be extended to solve specific problems like robustness and parameter synthesis.

Related work.

The trace abstraction refinement (TAR) technique was proposed by Heizmann et al. [26, 27]. Wang et al. [35] proposed the use of TAR for the analysis of timed automata. However, their approach is based on the computation of the standard zones which comes with usual limitations: it is not applicable to extensions of TA (e.g., stopwatch automata) and can only discover predicates that are zones. Moreover, their approach has not been implemented and it is not clear whether it can outperform state-of-the-art techniques e.g., as implemented in Uppaal.

Several works have investigated CEGAR techniques in both timed and hybrid settings [1, 21, 24, 34]. The CEGAR technique has also been extended to parameter-synthesis [24]. As proved by Heizmann et al. [26], such methods are special cases of the TAR framework.

The IC3 [10] verification approach has also been deployed for the verification of hybrid systems [9] but relies on a fix-point computation over a combined encoding of the transition-function, rather than a trace-subtraction approach. IC3 approaches and the likes have also been used for parameter synthesis [7, 9, 18]. While similar fundamental techniques are leveraged in these approaches (e.g. [7] utilizes Fourier-Motzkin-elimination), we note that our refinement method (TAR) is radically different in nature. IC3 is an iterative fix-point computation over an up-front and complete encoding of the transition-function.

Since the publication of a preliminary version of this paper [13], Kafle et al. [31] have demonstrated a novel method of parameter synthesis for timed systems via Constrained Horn Clauses (CHC). While their approach shows promising results for the Fischers parameter synthesis examples from [13], it currently relies on manual translation of a given problem into CHC format, hindering its applicability to large systems.

As mentioned earlier, our technique allows for a unique and logical (predicates) representation of sets of states accross different models (timed, hybrid automata) and problems (reachability, robustness, parameter synthesis), which is in contrast to state-of-the-art tools such as Uppaal [5], SpaceEx [25], HyTech [28], PHAver [23], verifix [32], symrob [33] and Imitator [3] that rely on special-purpose polyhedra libraries to realize their computation.

We propose a new technique which is radically different to previous approaches and leverages the power of SMT-solvers to discover non-trivial invariants for a large class of real-time systems including the class of hybrid automata. All the previous analysis techniques compute, reduce and check the state-space either up-front or on-the-fly, leading to the construction of significant parts of the state-space. In contrast our approach is an abstraction refinement method and the refinements are built by discovering non-trivial program invariants that are not always expressible using zones, or polyehdra. For instance they can express constraints that combine discrete and continuous variables of the system. This enables us to use our algorithm on non-decidable classes like stopwatch automata, and successfully (i.e., the algorithm terminates) check instances of these classes. A simple example is discussed in Section 2.

Our contribution.

We propose a variant of the trace abstractions refinement (TAR) technique to solve the reachability problem and the parameter synthesis problem for real-time programs. Our approach combines an automata-theoretic framework and state-of-the-art Satisfiability Modulo Theory (SMT) techniques for discovering program invariants. We demonstrate on a number of case-studies that this new approach can compute answers to problems unsolvable by special-purpose tools and algorithms in their respective domain.

This paper is an extended version of [13] in which we first introduced TAR for real-time programs. In this extended version, we provide a comprehensive introduction illustrated by more examples, extensions of the original algorithms from [13] and the proofs of theorems and lemmas.

2 Motivations

Real-Time Programs.

Figure 1 is an example of a real-time program P_1P_{\_}1. It is defined by a finite automaton A_1A_{\_}1 (Figure 1, top) which is the control flow graph (CFG) of P_1P_{\_}1, and some continuous and discrete instructions (bottom). The control flow graph A_1A_{\_}1 accepts the regular language (A_1)=i.t_0.t_1.t_2{\cal L}(A_{\_}1)=i.t_{\_}0.t_{\_}1^{\ast}.t_{\_}2: the program starts in (control) location ι\iota and is completed when _2\ell_{\_}2 (accepting location) is reached. The program variables are x,y,zx,y,z which are real numbers. This real-time program is the specification of a stopwatch automaton with 2 clocks, xx and zz, and one stopwatch yy. The variables are updated according to the following rules:

  • Each edge’s label defines a guard gg (a condition on the variables) for which the edge is enabled, and an update uu which is an assignment to the variables when the edge is taken. For instance the edge t_1t_{\_}1 can be taken when the valuation of the variable xx is 11 and when it is taken, xx is reset. This corresponds to a discrete transition of the program.

  • Each location is associated with a rate vector rr that defines the derivatives of the variables. The default derivative for a variable is 11 (we omit the rates for x,zx,z in the Figure). For instance in location _0\ell_{\_}0 the derivatives are (1,0,1)(1,0,1) (order is x,y,zx,y,z). When the program is in location _0\ell_{\_}0 the variables x,y,zx,y,z increase at a rate defined by their respective derivatives: x,zx,z increase by 11 each time unit, and yy is frozen (derivative is 0). This corresponds to a continuous transition of the program.

ι\iota_0\ell_{\_}0_1\ell_{\_}1_2\ell_{\_}2A_1A_{\_}1
 Edge Guard Update
ii 𝑇𝑟𝑢𝑒\mathit{True}  x:=y:=z:=0
t_0t_{\_}0 𝑇𝑟𝑢𝑒\mathit{True} z:=0
t_1t_{\_}1 x==1 x:=0
t_2t_{\_}2  x-y>=1 and z<1 -
Discrete Instructions
 Location Rate
ι\iota dy/dt=1
_0\ell_{\_}0 dy/dt=1
_1\ell_{\_}1 dy/dt=0
_2\ell_{\_}2 dy/dt=0
Continuous Instructionsiit_0t_{\_}0t_1t_{\_}1t_2t_{\_}2
Figure 1: Real-time program P_1P_{\_}1: CFG A_1A_{\_}1 of P_1P_{\_}1 (top) with the accepting location _2\ell_{\_}2 and its instructions (bottom).

A sequence of program instructions w=a_0.a_1..a_n(A_1)w=a_{\_}0.a_{\_}1.\cdots.a_{\_}n\in\mathcal{L}(A_{\_}1) defines a (possibly empty) set of timed words, τ(w)\tau(w), of the form (a_0,δ_0).(a_{\_}0,\delta_{\_}0).\cdots (a_n,δ_n)(a_{\_}n,\delta_{\_}n) where δ_i0,i[0..n]\delta_{\_}i\geq 0,i\in[0..n] is the time elapsed between two discrete transitions. For instance, the timed words associated with i.t_0.t_2i.t_{\_}0.t_{\_}2 are of the form (i,δ_0).(t_0,δ_1).(t_2,δ_2)(i,\delta_{\_}0).(t_{\_}0,\delta_{\_}1).(t_{\_}2,\delta_{\_}2), for all δ_i_0,i{0,1,2}\delta_{\_}i\in\mathbb{R}_{\_}{\geq 0},i\in\{0,1,2\} such that the following constraints (predicates that define that each transition can be fired after δ_i\delta_{\_}i time units) can be satisfied222We assume the program starts in ι\iota and all the variables are initially zero.:

x_0=y_0=z_0=δ_0δ_00_ Time elapsing δ_0 in ι𝑇𝑟𝑢𝑒_Guard of i\displaystyle\underbrace{x_{\_}0=y_{\_}0=z_{\_}0=\delta_{\_}0\wedge\delta_{\_}0\geq 0}_{\_}{\text{ Time elapsing $\delta_{\_}0$ in $\iota$}}\quad\wedge\underbrace{\mathit{True}}_{\_}{\text{Guard of $i$}} (C_0C_{\_}0)
x_1=y_1=z_1=0+δ_1δ_10_Update of i and time elapsing δ_1 in _0𝑇𝑟𝑢𝑒_Guard of t_0\displaystyle\underbrace{x_{\_}1=y_{\_}1=z_{\_}1=0+\delta_{\_}1\wedge\delta_{\_}1\geq 0}_{\_}{\text{Update of $i$ and time elapsing $\delta_{\_}1$ in $\ell_{\_}0$}}\quad\wedge\underbrace{\mathit{True}}_{\_}{\text{Guard of $t_{\_}0$}} (C_1C_{\_}1)
x_2=x_1+δ_2y_2=y_1z_2=0+δ_2δ_20_Update of t_0 and time elapsing δ_2 in _1x_2y_21z_2<1_Guard of t_2\displaystyle\underbrace{x_{\_}2=x_{\_}1+\delta_{\_}2\wedge y_{\_}2=y_{\_}1\wedge z_{\_}2=0+\delta_{\_}2\wedge\delta_{\_}2\geq 0}_{\_}{\text{Update of $t_{\_}0$ and time elapsing $\delta_{\_}2$ in $\ell_{\_}1$}}\ \wedge\ \underbrace{x_{\_}2-y_{\_}2\geq 1\wedge z_{\_}2<1}_{\_}{\text{Guard of $t_{\_}2$}} (C_2C_{\_}2)

These constraints encode the following semantics: ii is taken after δ_0\delta_{\_}0 time units and at that time x,y,zx,y,z are equal to δ_0\delta_{\_}0 and hence x_0,y_0,z_0x_{\_}0,y_{\_}0,z_{\_}0 are the values of the variables when location _0\ell_{\_}0 is entered. The program remains in _0\ell_{\_}0 for δ_1\delta_{\_}1 time units. When t_0t_{\_}0 is taken after δ_1\delta_{\_}1 time units, the values of x,y,zx,y,z is given by x_1,y_1,z_1x_{\_}1,y_{\_}1,z_{\_}1. Finally the program remains δ_2\delta_{\_}2 time units in _1\ell_{\_}1 and t_2t_{\_}2 is taken to reach _2\ell_{\_}2 which is the end of the program. It follows that the program can execute i.t_0.t_2i.t_{\_}0.t_{\_}2 (or in other words, i.t_0.t_2i.t_{\_}0.t_{\_}2 is feasible) if and only if we can find δ_0,δ_1,δ_2\delta_{\_}0,\delta_{\_}1,\delta_{\_}2 such that C_0C_1C_2C_{\_}0\wedge C_{\_}1\wedge C_{\_}2 is satisfiable. Hence the set of timed words associated with i.t_0.t_2i.t_{\_}0.t_{\_}2 is not empty iff C_0C_1C_2C_{\_}0\wedge C_{\_}1\wedge C_{\_}2 is satisfiable.

Language Emptiness Problem.

The timed language, 𝒯(P_1){\cal TL}(P_{\_}1), accepted by P_1P_{\_}1 is the set of timed words associated with all the (untimed) words ww accepted by A_1A_{\_}1 i.e., 𝒯(P_1)=_w(A_1)τ(w){\cal TL}(P_{\_}1)=\cup_{\_}{w\in{\cal L}(A_{\_}1)}\tau(w).

The language emptiness problem is a standard problem in Timed Automata theory [2] and is stated as follows for real-time programs:

given a real-time program PP, is 𝒯(P){\cal TL}(P) empty?

It is known that the emptiness problem is decidable for some classes of real-time programs like Timed Automata [2], but undecidable for more expressive classes like Stopwatch Automata [29]. It is usually possible to compute symbolic representations of sets of reachable valuations after a sequence of transitions. However, to compute the set of reachable valuations we may need to explore an arbitrary and unbounded number of sequences. Hence only semi-algorithms exist to compute the set of reachable valuations. For instance, using PHAver to compute the set of reachable valuations for P_1P_{\_}1 does not terminate (Table 1). To force termination, we can compute an over-approximation of the set of reachable valuations. Computing an over-approximation is sound (if we declare an over-approximation of a timed language to be empty the timed language is empty) but incomplete i.e., it may result in false positives (we declare a timed language non empty whereas it is empty). This is witnessed by the column “Uppaal” in Table 1 where Uppaal over-approximates sets of valuations in the program P_1P_{\_}1 using DBMs. After i.t_0i.t_{\_}0, the over-approximation is 0yx0zx0\leq y\leq x\wedge 0\leq z\leq x (this is the smallest DBMs that contains the actual set of valuations reachable after i.t_0i.t_{\_}0). This over-approximation intersects the guard xy1z<1x-y\geq 1\wedge z<1 of t_2t_{\_}2 which enables t_2t_{\_}2. Using this over-approximate set of valuations we would declare that _2\ell_{\_}2 is reachable in P_1P_{\_}1 but this is an artifact of the over-approximation.333Uppaal terminates with the result “the language may not be empty”. Neither Uppaal nor PHAver can prove that 𝒯(P_1)={\cal TL}(P_{\_}1)=\varnothing.

Sequence PHAver Uppaal
i.t_0i.t_{\_}0 z=xy0zxz=x-y\wedge 0\leq z\leq x 0yx0zx0\leq y\leq x\wedge 0\leq z\leq x
i.t_0.t_1i.t_{\_}0.t_{\_}1 z=xy+10xzx+1z=x-y+1\wedge 0\leq x\leq z\leq x+1 0zx10y0\leq z-x\leq 1\wedge 0\leq y
i.t_0.(t_1)2i.t_{\_}0.(t_{\_}1)^{2} z=xy+20xz1x+1z=x-y+2\wedge 0\leq x\leq z-1\leq x+1 1zx20y1\leq z-x\leq 2\wedge 0\leq y
i.t_0.(t_1)3i.t_{\_}0.(t_{\_}1)^{3} z=xy+30xz2x+1z=x-y+3\wedge 0\leq x\leq z-2\leq x+1 2zx30y2\leq z-x\leq 3\wedge 0\leq y
i.t_0.(t_1)ki.t_{\_}0.(t_{\_}1)^{k} z=xy+k0xzk+1x+1z=x-y+k\wedge 0\leq x\leq z-k+1\leq x+1  k1zxk0yk-1\leq z-x\leq k\wedge 0\leq y
Table 1: Symbolic representation of reachable states after a sequence of instructions. Uppaal concludes that 𝒯(A_1){\cal TL}(A_{\_}1)\neq\varnothing due to the over-approximation using DBMs. PHAver does not terminate.
Trace Abstraction Refinement for Real-Time Programs.

The technique we introduce can discover arbitrary abstractions and invariants that enable us to prove 𝒯(P_1)={\cal TL}(P_{\_}1)=\varnothing. Our method is a version of the trace abstraction refinement (TAR) technique introduced in [26] and is depicted in Figure 2.

L=L=\varnothing?Is τ(w)\tau(w) non empty?𝒯(P)={\cal TL}(P)=\varnothing𝒯(P){\cal TL}(P)\neq\varnothingL:=(CFG(P))L:={\cal L}(CFG(P))YesNo, let wLw\in LYesL:=LInFeasible(w)L:=L\setminus{\color[rgb]{0.7,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{0.7,0,0}\textit{InFeasible}(w)}No
Figure 2: Trace Abstraction Refinement Loop for Real-Time Programs

Let us first introduce how the trace abstraction refinement algorithm (Figure 2) operates on a real-time program PP:

  1. 1.

    the algorithm starts using the control flow graph of PP, CFG(P)CFG(P), and initially L=(CFG(P))L={\cal L}(CFG(P)).

  2. 2.

    if L=L=\varnothing then 𝒯(P){\cal TL}(P) is empty and the algorithm terminates (green block).

  3. 3.

    otherwise, there is wLw\in L. We check whether τ(w)\tau(w) is empty or not:

    • If it is not empty then 𝒯(P){\cal TL}(P) is not empty and the algorithm terminates (red block).

    • Otherwise, we can find444How this language is built is defined in Section 4. a regular language over the alphabet of CFG(P)CFG(P), InFeasible(w)\textit{InFeasible}(w), that satisfies: 1) wInFeasible(w)w\in\textit{InFeasible}(w) and 2) vInFeasible(w)\forall v\in\textit{InFeasible}(w), 𝒯(v)={\cal TL}(v)=\varnothing. In the next iteration of the algorithm, we look for a candidate trace in LInFeasible(w)L\setminus\textit{InFeasible}(w), i.e., we refine the trace abstraction LL by subtracting InFeasible(w)\textit{InFeasible}(w) from it.

Assume the algorithm terminates after kk iterations. In this case we were able to build a finite number of regular languages L_1=InFeasible(w_1),L_2=InFeasible(w_2),,L_k=InFeasible(w_k)L_{\_}1=\textit{InFeasible}(w_{\_}1),L_{\_}2=\textit{InFeasible}(w_{\_}2),\cdots,L_{\_}k=\textit{InFeasible}(w_{\_}k) such that 1ik,𝒯(L_i)=\forall 1\leq i\leq k,{\cal TL}(L_{\_}i)=\varnothing. If we terminate with 𝒯(P)={\cal TL}(P)=\varnothing then (CFG(P))_i=1kL_i{\cal L}(CFG(P))\subseteq\cup_{\_}{i=1}^{k}L_{\_}i. Otherwise if we terminate with τ(w_k+1)\tau(w_{\_}{k+1})\neq\varnothing we found a witness trace w_k+1(CFG(P))_i=1kL_iw_{\_}{k+1}\in{\cal L}(CFG(P))\setminus\cup_{\_}{i=1}^{k}L_{\_}i such that τ(w_k+1)\tau(w_{\_}{k+1})\neq\varnothing i.e., a feasible timed trace.

Example 1: Stopwatch Automaton.

We illustrate the algorithm using our program P_1P_{\_}1:

  • we initially let L=(CFG(P_1))L={\cal L}(CFG(P_{\_}1)). Since w_1=i.t_0.t_2(CFG(P_1))w_{\_}1=i.t_{\_}0.t_{\_}2\in{\cal L}(CFG(P_{\_}1)) and thus w_1Lw_{\_}1\in L the check L=L=\varnothing fails. We therefore check whether τ(w_1)=\tau(w_{\_}1)=\varnothing which can be done by encoding the corresponding set of timed traces as described by Equations (C_0C_{\_}0)–(C_2C_{\_}2) and then check whether C_0C_1C_2C_{\_}0\wedge C_{\_}1\wedge C_{\_}2 is satisfiable (e.g., using an SMT-solver and the theory of Linear Real Arithmetic). C_0C_1C_2C_{\_}0\wedge C_{\_}1\wedge C_{\_}2 is not satisfiable and this establishes τ(w_1)=\tau(w_{\_}1)=\varnothing.

  • from the proof that C_0C_1C_2C_{\_}0\wedge C_{\_}1\wedge C_{\_}2 is not satisfiable, we can obtain an inductive interpolant that comprises of two predicates I_0,I_1I_{\_}0,I_{\_}1 – one for each conjunction – over the variables x,y,zx,y,z. An example of an inductive interpolant555This is the pair returned by Z3 for C_0C_1C_2C_{\_}0\wedge C_{\_}1\wedge C_{\_}2. is I_0=xyI_{\_}0=x\leq y and I_1=xyzI_{\_}1=x-y\leq z. These predicates are invariants of any timed word of the untimed word w_1w_{\_}1, and can be used to annotate the sequence of transitions w_1w_{\_}1 with pre- and post-conditions (Equation 1), which are Hoare triples of the form {C}a{D}\{C\}\ a\ \{D\}:

    {𝑇𝑟𝑢𝑒}i{I_0}t_0{I_1}t_2{𝐹𝑎𝑙𝑠𝑒}\{\mathit{True}\}\quad i\quad\{I_{\_}0\}\quad t_{\_}0\quad\{I_{\_}1\}\quad t_{\_}2\quad\{\mathit{False}\} (1)

    A triple {C}a{D}\{C\}\ a\ \{D\} is valid if whenever we start in a state ss satisfying CC, and execute instruction aa, the resulting new state ss^{\prime} is in DD. {C}a{𝐹𝑎𝑙𝑠𝑒}\{C\}\ a\ \{\mathit{False}\} means that no state exists after executing aa from CC, i.e., the trace aa is infeasible. The inductiveness of the interpolants is due to the fact that each triple {C}a{D}\{C\}\ a\ \{D\} in the sequence (1) is a valid Hoare triple. Hoare triples (and validity) generalise to sequences of instructions σ\sigma in the form {C}σ{D}\{C\}\ \sigma\ \{D\}.

    Because we can also prove that {I_1}(t_1){I_1}\{I_{\_}1\}\ (t_{\_}1)^{\ast}\ \{I_{\_}1\} is a valid Hoare triple, if we combine this fact with Equation 1 we obtain a regular set of traces annotated with pre/post-conditions as per Equation 2.

    {𝑇𝑟𝑢𝑒}i{I_0}t_0{𝑰_𝟏}(𝒕_𝟏){𝑰_𝟏}t_2{𝐹𝑎𝑙𝑠𝑒}\{\mathit{True}\}\quad i\quad\{I_{\_}0\}\quad t_{\_}0\quad\boldsymbol{\{I_{\_}1\}}\quad\boldsymbol{(t_{\_}1)^{\ast}}\quad\boldsymbol{\{I_{\_}1\}}\quad t_{\_}2\quad\{\mathit{False}\} (2)

    This implies that the regular set of traces i.t_0.(t_1).t_2i.t_{\_}0.(t_{\_}1)^{\ast}.t_{\_}2 does not have any associated timed traces: for each word wi.t_0.(t_1).t_2w\in i.t_{\_}0.(t_{\_}1)^{\ast}.t_{\_}2, τ(w)=\tau(w)=\varnothing and as (CFG(P_1))i.t_0.(t_1).t_2{\cal L}(CFG(P_{\_}1))\subseteq i.t_{\_}0.(t_{\_}1)^{\ast}.t_{\_}2 we can conclude that 𝒯(A_1)={\cal TL}(A_{\_}1)=\varnothing.

Example 2: Extended Timed Automaton.

The following example (Figure 3) illustrates how extensions of timed automata with constraints that mix discrete and real variables can be analyzed. The real-time program P_2P_{\_}2 (Figure 3) is given by the CFG (left) and the instructions666The rates table is omitted as all the variables are clocks with rate 11. (right): it specifies a timed automaton with 22 clocks x,yx,y (real variables) and one integer variable ii.

ι\iota_0\ell_{\_}0_1\ell_{\_}1A_2A_{\_}2
 Edge Guard Update
t_0t_{\_}0 x1x\geq 1 -
t_1t_{\_}1 𝑇𝑟𝑢𝑒\mathit{True} x:= 0; i := i + 1
t_2t_{\_}2 y<iy<i -
Discrete Instructionst_0t_{\_}0t_1t_{\_}1t_2t_{\_}2
Figure 3: Real-time program P_2P_{\_}2: CFG A_2A_{\_}2 of P_2P_{\_}2 (left) with accepting location _1\ell_{\_}1 and its instructions (right).

This is an extended version of timed automata as the constraint y<iy<i mixes integer and real variables (clocks) and this is not permitted in the standard definition of timed automata. Initially all the variables are set to 0. The objective is to prove that location _1\ell_{\_}1 is unreachable and thus that 𝒯(P_2)={\cal TL}(P_{\_}2)=\varnothing. Note that Uppaal does allow this specification but is unable to prove that _1\ell_{\_}1 is unreachable because ii is unbounded.

Our method is able to discover invariants that mix integer and real variables and can prove that _1\ell_{\_}1 is unreachable as follows:

  1. 1.

    the first iteration of the TAR algorithm starts with L=(CFG(P_2))L={\cal L}(CFG(P_{\_}2)). The check L=L=\varnothing is negative as w_1=t_0.t_2Lw_{\_}1=t_{\_}0.t_{\_}2\in L. However every timed word in τ(w_1)\tau(w_{\_}1) must satisfy the following constraints that correspond to taking t_0t_{\_}0 and then t_2t_{\_}2:

    x_0=y_0=δ_0δ_00i_0=0_Time elapsing δ_0 in ιx_01_Guard of t_0\displaystyle\underbrace{x_{\_}0=y_{\_}0=\delta_{\_}0\wedge\delta_{\_}0\geq 0\wedge i_{\_}0=0}_{\_}{\text{Time elapsing $\delta_{\_}0$ in $\iota$}}\,\wedge\underbrace{x_{\_}0\geq 1}_{\_}{\text{Guard of $t_{\_}0$}} (C_0C^{\prime}_{\_}0)
    x_1=x_0+δ_1y_1=y_0+δ_1i_1=i_0δ_10_Update of t_0 and time elapsing δ_1 in _0y_1<i_1_Guard of t_2\displaystyle\underbrace{x_{\_}1=x_{\_}0+\delta_{\_}1\wedge y_{\_}1=y_{\_}0+\delta_{\_}1\wedge i_{\_}1=i_{\_}0\wedge\delta_{\_}1\geq 0}_{\_}{\text{Update of $t_{\_}0$ and time elapsing $\delta_{\_}1$ in $\ell_{\_}0$}}\,\wedge\underbrace{y_{\_}1<i_{\_}1}_{\_}{\text{Guard of $t_{\_}2$}} (C_1C^{\prime}_{\_}1)

    C_0C_1C^{\prime}_{\_}0\wedge C^{\prime}_{\_}1 is not satisfiable and hence 𝒯(t_0.t_2)={\cal TL}(t_{\_}0.t_{\_}2)=\varnothing and thus we can safely remove w_1w_{\_}1 from LL. We can extract interpolants from the proof of unsatisfiability of C_0C_1C^{\prime}_{\_}0\wedge C^{\prime}_{\_}1 and we establish the following sequence of valid Hoare triples:

    {x=y=i=0}t_0{x=yxi}t_2{𝐹𝑎𝑙𝑠𝑒}\{x=y=i=0\}\quad t_{\_}0\quad\{x=y\wedge x\geq i\}\quad t_{\_}2\quad\{\mathit{False}\} (3)
  2. 2.

    the second iteration of the TAR algorithm starts with an updated L=(CFG(P_2)){w_1}L={\cal L}(CFG(P_{\_}2))\setminus\{w_{\_}1\}. Again LL is not empty and for instance w_2=t_0.t_1.t_0.t_2w_{\_}2=t_{\_}0.t_{\_}1.t_{\_}0.t_{\_}2 is in LL. The encoding for checking the emptiness of τ(w_2)\tau(w_{\_}2) is:

    x_0=y_0=δ_0δ_00i_0=0_Time elapsing δ_0 in ιx_01_Guard of t_0\displaystyle\underbrace{x_{\_}0=y_{\_}0=\delta_{\_}0\wedge\delta_{\_}0\geq 0\wedge i_{\_}0=0}_{\_}{\text{Time elapsing $\delta_{\_}0$ in $\iota$}}\,\wedge\underbrace{x_{\_}0\geq 1}_{\_}{\text{Guard of $t_{\_}0$}} (C_′′0C^{\prime\prime}_{\_}0)
    x_1=x_0+δ_1y_1=y_0+δ_1i_1=i_0δ_10_Update of t_0 and time elspsing δ_1 in _0𝑇𝑟𝑢𝑒_Guard of t_1\displaystyle\underbrace{x_{\_}1=x_{\_}0+\delta_{\_}1\wedge y_{\_}1=y_{\_}0+\delta_{\_}1\wedge i_{\_}1=i_{\_}0\wedge\delta_{\_}1\geq 0}_{\_}{\text{Update of $t_{\_}0$ and time elspsing $\delta_{\_}1$ in $\ell_{\_}0$}}\wedge\underbrace{\mathit{True}}_{\_}{\text{Guard of $t_{\_}1$}} (C_′′1C^{\prime\prime}_{\_}1)
    x_2=0+δ_2y_2=y_1+δ_2i_2=i_1+1δ_20_Time elapsing δ_2 in ιx_21_Guard of t_0\displaystyle\underbrace{x_{\_}2=0+\delta_{\_}2\wedge y_{\_}2=y_{\_}1+\delta_{\_}2\wedge i_{\_}2=i_{\_}1+1\wedge\delta_{\_}2\geq 0}_{\_}{\text{Time elapsing $\delta_{\_}2$ in $\iota$}}\wedge\underbrace{x_{\_}2\geq 1}_{\_}{\text{Guard of $t_{\_}0$}} (C_′′2C^{\prime\prime}_{\_}2)
    x_3=x_2+δ_3y_3=y_2+δ_3i_3=i_2δ_30_Time elapsing δ_3 in _0y_3<i_3_Guard of t_2\displaystyle\underbrace{x_{\_}3=x_{\_}2+\delta_{\_}3\wedge y_{\_}3=y_{\_}2+\delta_{\_}3\wedge i_{\_}3=i_{\_}2\wedge\delta_{\_}3\geq 0}_{\_}{\text{Time elapsing $\delta_{\_}3$ in $\ell_{\_}0$}}\wedge\underbrace{y_{\_}3<i_{\_}3}_{\_}{\text{Guard of $t_{\_}2$}} (C_′′3C^{\prime\prime}_{\_}3)

    C_′′0C_′′1C_′′2C_′′3C^{\prime\prime}_{\_}0\wedge C^{\prime\prime}_{\_}1\wedge C^{\prime\prime}_{\_}2\wedge C^{\prime\prime}_{\_}3 is unsatisfiable and hence 𝒯(t_0.t_1.t_0.t_2)={\cal TL}(t_{\_}0.t_{\_}1.t_{\_}0.t_{\_}2)=\varnothing. We can extract interpolants from the proof of unsatisfiability and we establish the following sequence of valid Hoare triples.

    {x=y=i=0}t_0{yi}t_1.t_0{yi}t_2{𝐹𝑎𝑙𝑠𝑒}\{x=y=i=0\}\quad t_{\_}0\quad\{y\geq i\}\quad t_{\_}1.t_{\_}0\quad\{y\geq i\}\quad t_{\_}2\quad\{\mathit{False}\} (4)

    As can be seen as {yi}t_1.t_0{yi}\{y\geq i\}\ t_{\_}1.t_{\_}0\ \{y\geq i\} holds we can generalize this sequence to an arbitrary number of iterations of t_0.t_1t_{\_}0.t_{\_}1:

    {x=y=i=0}t_0{𝒚𝒊}(𝒕_𝟏.𝒕_𝟎)+{𝒚𝒊}t_2{𝐹𝑎𝑙𝑠𝑒}\{x=y=i=0\}\quad t_{\_}0\quad\boldsymbol{\{y\geq i\}}\quad\boldsymbol{(t_{\_}1.t_{\_}0)^{+}}\quad\boldsymbol{\{y\geq i\}}\quad t_{\_}2\quad\{\mathit{False}\} (5)

    which entails that 𝒯(t_0.(t_1.t_0)+.t_2)={\cal TL}(t_{\_}0.(t_{\_}1.t_{\_}0)^{+}.t_{\_}2)=\varnothing. This implies that we can remove t_0.(t_1.t_0)+.t_2t_{\_}0.(t_{\_}1.t_{\_}0)^{+}.t_{\_}2 from LL.

  3. 3.

    observe that L=L=\varnothing in the next iteration of TAR as (CFG(P_2))({t_0.t_2}t_0.(t_1.t_0)+.t_2)={\cal L}(CFG(P_{\_}2))\setminus(\{t_{\_}0.t_{\_}2\}\cup t_{\_}0.(t_{\_}1.t_{\_}0)^{+}.t_{\_}2)=\varnothing given that (CFG(P_2))=t_0.(t_1.t_0).t_2{\cal L}(CFG(P_{\_}2))=t_{\_}0.(t_{\_}1.t_{\_}0)^{\ast}.t_{\_}2. We have thus proved that 𝒯(P_2)={\cal TL}(P_{\_}2)=\varnothing as any word of instructions in (CFG(P_2)){\cal L}(CFG(P_{\_}2)) induces an infeasible trace and the algorithm terminates.

In the rest of the paper, we provide a formal development of the methods we have introduced so far.

3 Real-Time Programs

Our approach is general enough and applicable to a wide range of timed systems called real-time programs. As an example, timed, stopwatch, hybrid automata and time Petri nets are special cases of real-time programs.

In this section we formally define real-time programs. Real-time programs specify the control flow of instructions, just as standard imperative programs do. The instructions can update variables by assigning new values to them. Each instruction has a semantics and together with the control flow this precisely defines the semantics of real-time programs.

3.1 Notations

A finite automaton over an alphabet Σ\Sigma is a tuple 𝒜=(Q,ι,Σ,\mathcal{A}=(Q,\iota,\Sigma, Δ,F)\Delta,F) where QQ is a finite set of locations s.t. ιQ\iota\in Q is the initial location, Σ\Sigma is a finite alphabet of actions, Δ(Q×Σ×Q)\Delta\subseteq(Q\times\Sigma\times Q) is a finite transition relation, FQF\subseteq Q is the set of accepting locations. A word w=α_0.α_1..α_nw=\alpha_{\_}0.\alpha_{\_}1.\cdots.\alpha_{\_}n is a finite sequence of letters from Σ\Sigma; we let w[i]=α_iw[i]=\alpha_{\_}i be the ii-th letter of ww, |w||w| be the length of ww which is n+1n+1. Let ϵ\epsilon be the empty word and |ϵ|=0|\epsilon|=0, and let Σ\Sigma^{\ast} be the set of finite words over Σ\Sigma. The language, (𝒜){\cal L}(\mathcal{A}), accepted by 𝒜\mathcal{A} is defined in the usual manner as the set of words that can lead to FF from ι\iota.

Let VV be a finite set of real-valued variables. A valuation is a function ν:V\nu:V\rightarrow\mathbb{R}. The set of valuations is [V][V\rightarrow\mathbb{R}].

We denote by β(V)\beta(V) the set of constraints (or Boolean predicates) over VV and given φβ(V)\varphi\in\beta(V), we let Vars(φ)\textit{Vars}(\varphi) be the set of unconstrained variables in φ\varphi. Given a valuation, we let the truth value of a constraint (Boolean predicate) φ\varphi be denoted by φ(ν){𝑇𝑟𝑢𝑒,𝐹𝑎𝑙𝑠𝑒}\varphi(\nu)\in\{\mathit{True},\mathit{False}\}, and write νφ\nu\models\varphi when φ(ν)=𝑇𝑟𝑢𝑒\varphi(\nu)=\mathit{True} and let φ={ννφ}{\llbracket\varphi\rrbracket}=\{\nu\mid\nu\models\varphi\}.

An update μ[V]×[V]\mu\subseteq[V\rightarrow\mathbb{R}]\times[V\rightarrow\mathbb{R}] is a binary relation over valuations. Given an update μ\mu and a set of valuations 𝒱\mathcal{V}, we let μ(𝒱)={νν𝒱 and (ν,ν)μ}\mu(\mathcal{V})=\{\nu^{\prime}\mid\exists\nu\in\mathcal{V}\text{ and }(\nu,\nu^{\prime})\in\mu\}. We let 𝒰(V){\cal U}(V) be the set of updates on the variables in VV.

Similar to the update relation, we define a rate function ρ:V\rho:V\rightarrow\mathbb{R} (rates can be negative), i.e., a function from a variable to a real number777We can allow rates to be arbitrary terms but in this paper we restrict to deterministic rates or bounded intervals.. A rate is then a vector ρV\rho\in\mathbb{R}^{V}. Given a valuation ν\nu and a timestep δ_0\delta\in\mathbb{R}_{\_}{\geq 0} the valuation ν+(ρ,δ)\nu+(\rho,\delta) is defined by: (ν+(ρ,δ))(v)=ν(v)+ρ(v)×δ(\nu+(\rho,\delta))(v)=\nu(v)+\rho(v)\times\delta for vVv\in V.

3.2 Real-Time Instructions

Let Σ=β(V)×𝒰(V)×(V)\Sigma=\beta(V)\times{\cal U}(V)\times{\cal R}(V) be a countable set of instructions – and intentionally also the alphabet of the CFG. Each αΣ\alpha\in\Sigma is a tuple (guard, update, rates)(\textit{guard, update, rates}) denoted by (γ_α,μ_α,ρ_α)(\gamma_{\_}\alpha,\mu_{\_}\alpha,\rho_{\_}\alpha). Let ν:V\nu:V\rightarrow\mathbb{R} and ν:V\nu^{\prime}:V\rightarrow\mathbb{R} be two valuations. For each pair (α,δ)Σ×_0(\alpha,\delta)\in\Sigma\times\mathbb{R}_{\_}{\geq 0} we define the following transition relation α,δ\xrightarrow{~{}\alpha,\delta~{}}:

να,δν{1.νγ_α (guard of α is satisfied in ν),2.ν′′ s.t. (ν,ν′′)μ_α (discrete update allowed by α) and 3.ν=ν′′+(ρ_α,δ) (continuous update as defined by α).\nu\xrightarrow{~{}\alpha,\delta~{}}\nu^{\prime}\iff\begin{cases}1.\quad\nu\models\gamma_{\_}\alpha\text{ (guard of $\alpha$ is satisfied in $\nu$)},\\ 2.\quad\exists\nu^{\prime\prime}\text{ s.t. }(\nu,\nu^{\prime\prime})\in\mu_{\_}\alpha\text{ (discrete update allowed by $\alpha$) and }\\ 3.\quad\nu^{\prime}=\nu^{\prime\prime}+(\rho_{\_}\alpha,\delta)\text{ (continuous update as defined by $\alpha$).}\end{cases}

The semantics of αΣ\alpha\in\Sigma is a mapping α:[V]2[V]{\llbracket\alpha\rrbracket}:[V\rightarrow\mathbb{R}]\rightarrow 2^{[V\rightarrow\mathbb{R}]} and for ν[V]\nu\in[V\rightarrow\mathbb{R}]

α(ν)={ν|δ0,να,δν}.{\llbracket\alpha\rrbracket}(\nu)=\{\nu^{\prime}\,|\,\exists\delta\geq 0,\nu\xrightarrow{~{}\alpha,\delta~{}}\nu^{\prime}\}\mathpunct{.} (6)

It follows that:

Fact 1

δ0,να,δννα(ν)\exists\delta\geq 0,\nu\xrightarrow{~{}\alpha,\delta~{}}\nu^{\prime}\iff\nu^{\prime}\in{\llbracket\alpha\rrbracket}(\nu).

This mapping can be straightforwardly extended to sets of valuations K[V]K\subseteq[V\rightarrow\mathbb{R}] as follows:

α(K)=νKα(ν).{\llbracket\alpha\rrbracket}(K)=\underset{\nu\in K}{\bigcup}{\llbracket\alpha\rrbracket}(\nu)\mathpunct{.} (7)

3.3 Post Operator

Let KK be a set of valuations and wΣw\in\Sigma^{\ast}. We inductively define the (strongest) post operator Post(K,w)\textit{Post}(K,w) as follows:

Post(K,ϵ)\displaystyle\textit{Post}(K,\epsilon) =K\displaystyle=K
Post(K,α.w)\displaystyle\textit{Post}(K,\alpha.w) =Post(α(K),w)\displaystyle=\textit{Post}({\llbracket\alpha\rrbracket}(K),w)

The post operator extends to logical constraints φβ(V)\varphi\in\beta(V) by defining Post(φ,w)=Post(φ,w)\textit{Post}(\varphi,w)=\textit{Post}({\llbracket\varphi\rrbracket},w). In the sequel, we assume that, when φβ(V)\varphi\in\beta(V), then α(φ){\llbracket\alpha\rrbracket}({\llbracket\varphi\rrbracket}) is also definable as a constraint in β(V)\beta(V). This inductively implies that Post(φ,w)\textit{Post}(\varphi,w) can also be expressed as a constraint in β(V)\beta(V) for sequences of instructions wΣw\in\Sigma^{\ast}.

3.4 Timed Words and Feasible Words

A timed word (over alphabet Σ\Sigma) is a finite sequence σ=(α_0,δ_0).(α_1,δ_1)..(α_n,δ_n)\sigma=(\alpha_{\_}0,\delta_{\_}0).(\alpha_{\_}1,\delta_{\_}1).\cdots.(\alpha_{\_}n,\delta_{\_}n) such that for each 0in0\leq i\leq n, δ_i_0\delta_{\_}i\in\mathbb{R}_{\_}{\geq 0} and α_iΣ\alpha_{\_}i\in\Sigma. The timed word σ\sigma is feasible if and only if there exists a set of valuations {ν_0,,ν_n+1}[V]\{\nu_{\_}0,\dots,\nu_{\_}{n+1}\}\subseteq[V\rightarrow\mathbb{R}] such that:

ν_0α_0,δ_0ν_1α_1,δ_1ν_2ν_nα_n,δ_nν_n+1.\nu_{\_}0\xrightarrow{~{}\alpha_{\_}0,\delta_{\_}0~{}}\nu_{\_}1\xrightarrow{~{}\alpha_{\_}1,\delta_{\_}1~{}}\nu_{\_}2\quad\cdots\quad\nu_{\_}n\xrightarrow{~{}\alpha_{\_}n,\delta_{\_}n~{}}\nu_{\_}{n+1}\mathpunct{.}

We let Unt(σ)=α_0.α_1..α_n\textit{Unt}(\sigma)=\alpha_{\_}0.\alpha_{\_}1.\cdots.\alpha_{\_}n be the untimed version of σ\sigma. We extend the notion feasible to an untimed word wΣw\in\Sigma^{\ast}: ww is feasible iff w=Unt(σ)w=\textit{Unt}(\sigma) for some feasible timed word σ\sigma.

Lemma 1

An untimed word wΣw\in\Sigma^{\ast} is feasible iff Post(𝑇𝑟𝑢𝑒,w)𝐹𝑎𝑙𝑠𝑒\textit{Post}(\mathit{True},w)\neq\mathit{False}.

Proof 1

We prove this Lemma by induction on the length of ww. The induction hypothesis is:

ν_0α_0,δ_0ν_1α_1,δ_1ν_2ν_nα_n,δ_nν_n+1ν_n+1Post({ν_0},α_0.α_1..α_n)\nu_{\_}0\xrightarrow{~{}\alpha_{\_}0,\delta_{\_}0~{}}\nu_{\_}1\xrightarrow{~{}\alpha_{\_}1,\delta_{\_}1~{}}\nu_{\_}2\quad\cdots\quad\nu_{\_}n\xrightarrow{~{}\alpha_{\_}n,\delta_{\_}n~{}}\nu_{\_}{n+1}\iff\nu_{\_}{n+1}\in\textit{Post}(\{\nu_{\_}0\},\alpha_{\_}0.\alpha_{\_}1.\cdots.\alpha_{\_}n)

which is enough to prove the Lemma.

Base step. If w=ϵw=\epsilon, then Post({ν_0},ϵ)={ν_0}\textit{Post}(\{\nu_{\_}0\},\epsilon)=\{\nu_{\_}0\}.

Inductive step. Assume ν_0α_0,δ_0ν_1α_1,δ_1ν_2ν_nα_n,δ_nν_n+1α_n+1,δ_n+1ν_n+2\nu_{\_}0\xrightarrow{~{}\alpha_{\_}0,\delta_{\_}0~{}}\nu_{\_}1\xrightarrow{~{}\alpha_{\_}1,\delta_{\_}1~{}}\nu_{\_}2\quad\cdots\quad\nu_{\_}n\xrightarrow{~{}\alpha_{\_}n,\delta_{\_}n~{}}\nu_{\_}{n+1}\xrightarrow{~{}\alpha_{\_}{n+1},\delta_{\_}{n+1}}\nu_{\_}{n+2}. By induction hypothesis, ν_n+1Post({ν_0},α_0.α_1..α_n)\nu_{\_}{n+1}\in\textit{Post}(\{\nu_{\_}0\},\alpha_{\_}0.\alpha_{\_}1.\cdots.\alpha_{\_}n), and ν_n+2α_n+1(ν_n+1)\nu_{\_}{n+2}\in{\llbracket\alpha_{\_}{n+1}\rrbracket}(\nu_{\_}{n+1}). By definition of Post this implies that ν_n+2Post({ν_0},α_0.α_1..α_n.α_n+1)\nu_{\_}{n+2}\in\textit{Post}(\{\nu_{\_}0\},\alpha_{\_}0.\alpha_{\_}1.\cdots.\alpha_{\_}n.\alpha_{\_}{n+1}).

3.5 Real-Time Programs

The specification of a real-time program decouples the control (e.g., for Timed Automata, the locations) and the data (the clocks or integer variables). A real-time program is a pair P=(A_P,)P=(A_{\_}P,{\llbracket\cdot\rrbracket}) where A_PA_{\_}P is a finite automaton A_P=(Q,ι,Σ,Δ,F)A_{\_}P=(Q,\iota,\Sigma,\Delta,F) over the alphabet888Σ\Sigma can be infinite but we require the control-flow graph Δ\Delta (transition relation) of A_PA_{\_}P to be finite. Σ\Sigma, Δ\Delta defines the control-flow graph of the program and {\llbracket\cdot\rrbracket} provides the semantics of each instruction.

A timed word σ\sigma is accepted by PP if and only if:

  1. 1.

    Unt(σ)\textit{Unt}(\sigma) is accepted by A_PA_{\_}P and,

  2. 2.

    σ\sigma is feasible.

The timed language, 𝒯(P){\cal TL}(P), of a real-time program PP is the set of timed words accepted by PP, i.e., σ𝒯(P)\sigma\in{\cal TL}(P) if and only if Unt(σ)(A_P)\textit{Unt}(\sigma)\in{\cal L}(A_{\_}P) and σ\sigma is feasible.

Remark 1

We do not assume any particular values initially for the variables of a real-time program (the variables that appear in II). This is reflected by the definition of feasibility that only requires the existence of valuations without containing the initial one ν_0\nu_{\_}0. When specifying a real-time program, initial values can be explicitly set by regular instructions at the beginning of the program. This is similar to standard programs where the first instructions can set the values of some variables.

3.6 Timed Language Emptiness Problem

The (timed) language emptiness problem asks the following:

Given a real-time program PP, is 𝒯(P){\cal TL}(P) empty?

Theorem 1

𝒯(P){\cal TL}(P)\neq\varnothing iff w(A_P)\exists w\in{\cal L}(A_{\_}P) such that Post(𝑇𝑟𝑢𝑒,w)𝐹𝑎𝑙𝑠𝑒\textit{Post}(\mathit{True},w)\not\subseteq\mathit{False}.

Proof 2

𝒯(P){\cal TL}(P)\neq\varnothing iff there exists a feasible timed word σ\sigma such that Unt(σ)\textit{Unt}(\sigma) is accepted by A_PA_{\_}P. This is equivalent to the existence of a feasible word w(A_P)w\in{\cal L}(A_{\_}P), and by Lemma 1, feasibility of ww is equivalent to Post(𝑇𝑟𝑢𝑒,w)𝐹𝑎𝑙𝑠𝑒\textit{Post}(\mathit{True},w)\not\subseteq\mathit{False}.

3.7 Useful Classes of Real-Time Programs

Timed Automata are a special case of real-time programs. The variables are called clocks. β(V)\beta(V) is restricted to constraints on individual clocks or difference constraints generated by the grammar:

b_1,b_2::=𝑇𝑟𝑢𝑒𝐹𝑎𝑙𝑠𝑒xykxkb_1b_2b_{\_}1,b_{\_}2::=\mathit{True}\mid\mathit{False}\mid x-y\Join k\mid x\Join k\mid b_{\_}1\wedge b_{\_}2 (8)

where x,yVx,y\in V, k_0k\in\mathbb{Q}_{\_}{\geq 0} and {<,,=,,>}\Join\,\in\{<,\leq,=,\geq,>\}999 While difference constraints are strictly disallowed in most definitions of Timed Automata, the method we propose retain its properties regardless of their presence.. We note that wlog. we omit location invariants as for the language emptiness problem, these can be implemented as guards. An update in μ𝒰(V)\mu\in{\cal U}(V) is defined by a set of clocks to be reset. Each pair (ν,ν)μ(\nu,\nu^{\prime})\in\mu is such that ν(x)=ν(x)\nu^{\prime}(x)=\nu(x) or ν(x)=0\nu^{\prime}(x)=0 for each xVx\in V. The valid rates are fixed to 1, and thus (V)={1}V{\cal R}(V)=\{1\}^{V}.

Stopwatch Automata can also be defined as a special case of real-time programs. As defined in [14], Stopwatch Automata are Timed Automata extended with stopwatches which are clocks that can be stopped. β(V)\beta(V) and 𝒰(V){\cal U}(V) are the same as for Timed Automata but the set of valid rates is defined by the functions of the form (V)={0,1}V{\cal R}(V)=\{0,1\}^{V} (the clock rates can be either 0 or 11). An example of a Stopwatch Automaton is given by the timed system 𝒜_1\mathcal{A}_{\_}1 in Figure 1.

As there exists syntactic translations (preserving timed languages or reachability) that map hybrid automata to stopwatch automata [14], and translations that map time Petri nets [6, 16] and extensions [12, 11] thereof to timed automata, it follows that time Petri nets and hybrid automata are also special cases of real-time programs. This shows that the method we present in the next section is applicable to a wide range of timed systems. What is remarkable as well, is that it is not restricted to timed systems that have a finite number of discrete states but can also accommodate infinite discrete state spaces. For example, the real-time program P_2P_{\_}2 in Figure 3, page 3 has two clocks xx and yy and an unbounded integer variable ii. Even though ii is unbounded, our technique discovers the loop invariant yiy\geq i of the ι\iota and _0\ell_{\_}0 locations – an invariant is over a real-time clock yy and the integer variable ii. It allows us to prove that 𝒯(P_2)={\cal TL}(P_{\_}2)=\varnothing as the guard of t_2t_{\_}2 never can be satisfied (y<iy<i).

4 Trace Abstraction Refinement for Real-Time Programs

In this section we give a formal description of a semi-algorithm to solve the language emptiness problem for real-time programs. The semi-algorithm is a version of the refinement of trace abstractions (TAR) approach [26] for timed systems.

4.1 Refinement of Trace Abstraction for Real-Time Programs

We have already introduced our algorithm in Figure 2, page 2. We now give a precise formulation of the TAR semi-algorithm for real-time programs, in Algorithm 1. It is essentially the same as the semi-algorithm as introduced in [26] – we therefore omit theorems of completeness and soundness as these will be equivalent to the theorems in [26] and are proved in the exact same manner.

1
2
Input : A real-time program P=(A_P,)P=(A_{\_}P,{\llbracket\cdot\rrbracket}).
Result : (𝑇𝑟𝑢𝑒,)(\mathit{True},-) if 𝒯(P)={\cal TL}(P)=\varnothing, and otherwise (𝐹𝑎𝑙𝑠𝑒,w)(\mathit{False},w) if 𝒯(P){\cal TL}(P)\neq\varnothing with w(A_P)w\in{\cal L}(A_{\_}P) and Post(𝑇𝑟𝑢𝑒,w)𝐹𝑎𝑙𝑠𝑒\textit{Post}(\mathit{True},w)\not\subseteq\mathit{False} – or non-termination.
Var : RR: a regular language, initially R=R=\varnothing.
ww: a word in (A_P){\cal L}(A_{\_}P), initially w=ϵw=\epsilon.
TT: A finite automaton, initially empty.
3 while (A_P)R{\cal L}(A_{\_}P)\not\subseteq R do
4       Let w(A_P)Rw\in{\cal L}(A_{\_}P)\setminus R;
5       if  Post(𝑇𝑟𝑢𝑒,w)𝐹𝑎𝑙𝑠𝑒\textit{Post}(\mathit{True},w)\not\subseteq\mathit{False} then
             /* ww is feasible and ww is a counter-example */
6             return (𝐹𝑎𝑙𝑠𝑒,w)(\mathit{False},w);
7            
8      else
            /* ww is infeasible, compute an interpolant automaton based on ww */
9             Let T=ITA(w)T=\textit{ITA}(w);
             /* Add TT to refinement and continue */
10             Let R:=R(T)R:=R\cup{\cal L}(T);
11            
12      
13return (𝑇𝑟𝑢𝑒,)(\mathit{True},-);
Algorithm 1 RTTAR – Trace Abstraction Refinement for Real-Time Programs

The input to the semi-algorithm TAR-RT is a real-time program P=(A_P,)P=(A_{\_}P,{\llbracket\cdot\rrbracket}). An invariant of the semi-algorithm is that the refinement RR, which is subtracted to the initial set of traces, is either empty or containing infeasible traces only. In the coarsets, initial abstraction, all the words (A_P){\cal L}(A_{\_}P) are potentially feasible. In each iteration of the algorithm, we then chip away infeasible behaviour (via the set RR) of A_PA_{\_}P, making the set difference (A_P)R{\cal L}(A_{\_}P)\setminus R move closer to the set of feasible traces, thereby shrinking the overapproximation of feasible traces ((A_P)R{\cal L}(A_{\_}P)\setminus R).

Initially the refinement RR is the empty set. The semi-algorithm works as follows:

Step 1

line 1, check whether all the (untimed) traces in (A_P){\cal L}(A_{\_}P) are in RR. If this is the case, 𝒯(P){\cal TL}(P) is empty and the semi-algorithm terminates (line 8). Otherwise (line 2), there is a sequence w(A_P)Rw\in{\cal L}(A_{\_}P)\setminus R, goto Step 2;

Step 2

if ww is feasible (line 3) i.e., there is a feasible timed word σ\sigma such that Unt(σ)=w\textit{Unt}(\sigma)=w, then σ𝒯(P)\sigma\in{\cal TL}(P) and 𝒯(P){\cal TL}(P)\neq\varnothing and the semi-algorithm terminates (line 4). Otherwise ww is not feasible, goto Step 3;

Step 3

ww is infeasible and given the reason for infeasibility we can construct (line 6) a finite interpolant automaton, ITA(w)\textit{ITA}(w), that accepts ww and other words that are infeasible for the same reason. How ITA(w)\textit{ITA}(w) is computed is addressed in the sequel. The automaton ITA(w)\textit{ITA}(w) is added (line 7) to the previous refinement RR and the semi-algorithm starts a new round at Step 1 (line 1).

In the next paragraphs we explain the main steps of the algorithms: how to check feasibility of a sequence of instructions and how to build ITA(w)\textit{ITA}(w).

4.2 Checking Feasibility

Given a arbitrary word wΣw\in\Sigma^{\ast}, we can check whether ww is feasible by encoding the side-effects of each instruction in ww using linear arithmetic as demonstrated in Examples 1 and 2.

We now define a function Enc for constructing such a constraint-system characterizing the feasibility of a given trace. We first show how to encode the side-effects and feasibility of a single instruction αΣ\alpha\in\Sigma. Recall that α=(γ,μ,ρ)\alpha=(\gamma,\mu,\rho) where the three components are respectively the guard, the update, and the rates. Assume that the variables101010The union of the variables in γ,μ,ρ\gamma,\mu,\rho. in α\alpha are X={x_1,x_2,,x_k}X=\{x_{\_}1,x_{\_}2,\cdots,x_{\_}k\}. We can define the semantics of α\alpha using the standard unprimed111111x¯\overline{x} denotes the vector of variables {x_1,x_2,,x_k}\{x_{\_}1,x_{\_}2,\cdots,x_{\_}k\}. and primed variables (XX^{\prime}). We assume that the guard and the updates can be defined by predicates and write α=(φ(x¯),μ(x¯,x¯),ρ(x¯))\alpha=(\varphi(\overline{x}),\mu(\overline{x},\overline{x}^{\prime}),\rho(\overline{x})) with:

  • φ(x¯)β(X)\varphi(\overline{x})\in\beta(X) is the guard of the instruction,

  • μ(x¯,x¯)\mu(\overline{x},\overline{x}^{\prime}) a set of constraints in β(XX)\beta(X\cup X^{\prime}),

  • ρ:X\rho:X\rightarrow\mathbb{Q} defines the rates of the variables.

The effect of α\alpha from a valuation x¯′′\overline{x}^{\prime\prime}, which is composed of 1) discrete step if the guard is true followed by the updates leading to a new valuation x¯\overline{x}^{\prime}, and 2) continuous step i.e., time elapsing δ\delta, leading to a new valuation x¯\overline{x}, can be encoded as follows:

Enc(α,x¯′′,x¯,x¯,δ)=φ(x¯′′)μ(x¯′′,x¯)x¯=x¯+(ρ,δ)δ0\textit{Enc}(\alpha,\overline{x}^{\prime\prime},\overline{x}^{\prime},\overline{x},\delta)=\varphi(\overline{x}^{\prime\prime})\wedge\mu(\overline{x}^{\prime\prime},\overline{x}^{\prime})\wedge\overline{x}=\overline{x}^{\prime}+(\rho,\delta)\wedge\delta\geq 0 (9)

Let K(x¯)K(\overline{x}) be a set of valuations that can be defined as constraint in β(X)\beta(X). It follows that α(K(x¯)){\llbracket\alpha\rrbracket}(K(\overline{x})) is defined by:

δ,x¯′′,x¯ such that K(x¯′′)Enc(α,x¯′′,x¯,x¯,δ)\exists\delta,\overline{x}^{\prime\prime},\overline{x}^{\prime}\text{ such that }K(\overline{x}^{\prime\prime})\wedge\textit{Enc}(\alpha,\overline{x}^{\prime\prime},\overline{x}^{\prime},\overline{x},\delta) (10)

In other terms, α(K(x¯)){\llbracket\alpha\rrbracket}(K(\overline{x})) is not empty iff K(x¯′′)Enc(α,x¯′′,x¯,x¯,δ)K(\overline{x}^{\prime\prime})\wedge\textit{Enc}(\alpha,\overline{x}^{\prime\prime},\overline{x}^{\prime},\overline{x},\delta) is satisfiable.

We can now define the encoding of a sequence of instructions w=α_0.α_1..α_nΣw=\alpha_{\_}0.\alpha_{\_}1.\cdots.\alpha_{\_}n\in\Sigma^{\ast}. Given a set of variables WW, we define the corresponding set of super-scripted variables Wk={wj,wW,0jk}W^{k}=\{w^{j},w\in W,0\leq j\leq k\}. Instead of using x,x,x′′x,x^{\prime},x^{\prime\prime} we use super-scripted variables x¯k\overline{x}^{k} (and y¯k\overline{y}^{k} for the intermediate variables xx^{\prime}) to encode the side-effect of each instruction in the trace:

Enc(w)=_i=0nEnc(α_i,x¯i,y¯i,x¯i+1,δi)\textit{Enc}(w)=\bigwedge_{\_}{i=0}^{n}\textit{Enc}(\alpha_{\_}i,\overline{x}^{i},\overline{y}^{i},\overline{x}^{i+1},\delta^{i})

It is straighgforward to prove that the function Enc:Σβ(Xn+1Yn{δ}n)\textit{Enc}:\Sigma^{\ast}\rightarrow\beta(X^{n+1}\cup Y^{n}\cup\{\delta\}^{n}) constructs a constraint-system characterizing exactly the feasibility of a word ww:

Fact 2

For each wΣw\in\Sigma^{\ast}, Post(𝑇𝑟𝑢𝑒,w)𝐹𝑎𝑙𝑠𝑒\textit{Post}(\mathit{True},w)\not\subseteq\mathit{False} iff Enc(w)\textit{Enc}(w) is satisfiable.

If the terms we build are in a logic supported by SMT-solvers (e.g., Linear Real Arithmetic) we can automatically check satisfiability. If Enc(w)\textit{Enc}(w) is satisfiable we can even collect some model which provides witness values for the δ_k\delta_{\_}k. Otherwise, if Enc(w)\textit{Enc}(w) is unsatisfiable, there are some options to collect some reasons for unsatisfiability: unsat cores or interpolants. The latter is discussed in the next section.

An example of an encoding for the real-time program P_1P_{\_}1 (Figure 1) and the sequence w_1=i.t_0.t_2w_{\_}1=i.t_{\_}0.t_{\_}2 is given by the predicates in Equation (C_0C_{\_}0)–(C_2C_{\_}2). Hence the sequence w_1=i.t_0.t_2w_{\_}1=i.t_{\_}0.t_{\_}2 is feasible iff Enc(w_1)=C_0C_1C_2\textit{Enc}(w_{\_}1)=C_{\_}0\wedge C_{\_}1\wedge C_{\_}2 is satisfiable. Using a SMT-solver, e.g., with Z3, we can confirm that Enc(w_1)\textit{Enc}(w_{\_}1) is unsatisfiable. The interpolating121212The interpolating feature of Z3 has been phased out from version 4.6.x. However, there are alternative techniques to obtain inductive interpolants e.g., using unsat cores [22]. solver Z3 can also generate a sequence of interpolants, I_0=xyI_{\_}0=x\leq y and I_1=xyzI_{\_}1=x-y\leq z, that provide a general reason for unsatisfiability and satisfy:

{𝑇𝑟𝑢𝑒}i{I_0}t_0{I_1}t_2{𝐹𝑎𝑙𝑠𝑒}.\{\mathit{True}\}\quad i\quad\{I_{\_}0\}\quad t_{\_}0\quad\{I_{\_}1\}\quad t_{\_}2\quad\{\mathit{False}\}\mathpunct{.}

We can use the interpolants to build interpolant automata as described in the next section.

4.3 Construction of Interpolant Automata

4.3.1 Inductive Interpolant

When it is determined that a trace ww is infeasible, we can easily discard such a single trace and continue searching for a different one. However, the power of the TAR method is to generalize the infeasibility of a single trace ww into a family (regular set) of traces. This regular set of infeasible traces is computed from a reason of infeasibility of ww and is formally specified by an interpolant automaton, ITA(w)\textit{ITA}(w). The reason for infeasibility itself can be the predicates obtained by computing strongest post-conditions or weakest-preconditions or anything in between but it must be an inductive interpolant131313Strongest post-conditions and weakest pre-conditions can provide inductive interpolants.

𝑇𝑟𝑢𝑒\mathit{True}I_0I_{\_}0I_0I^{\prime}_{\_}0I_1I^{\prime}_{\_}1I_2I^{\prime}_{\_}2I_3I^{\prime}_{\_}3𝐹𝑎𝑙𝑠𝑒\mathit{False}I_1I^{\prime}_{\_}1t_0t_{\_}0t_2t_{\_}2t_0t_{\_}0t_1t_{\_}1t_0t_{\_}0t_0t_{\_}0t_2t_{\_}2iiii
Figure 4: Interpolant automaton for (ITA(w_1))(ITA(w2)){\cal L}(\textit{ITA}(w_{\_}1))\cup{\cal L}(\textit{ITA}(w2)).

Given a conjunctive formula f=C_0C_mf=C_{\_}0\wedge\cdots\wedge C_{\_}m, if ff is unsatisfiable, an inductive interpolant is a sequence of predicates I_0,,I_m1I_{\_}0,\dots,I_{\_}{m-1} s.t:

  • 𝑇𝑟𝑢𝑒C_0I_0\mathit{True}\wedge C_{\_}0\implies I_{\_}0,

  • I_m1C_m𝐹𝑎𝑙𝑠𝑒I_{\_}{m-1}\wedge C_{\_}m\implies\mathit{False},

  • For each 0n<m10\leq n<m-1, I_nC_n+1I_n+1I_{\_}n\wedge C_{\_}{n+1}\implies I_{\_}{n+1}, and the variables in I_nI_{\_}n appear in both C_nC_{\_}n and C_n+1C_{\_}{n+1} i.e., Vars(I_n)Vars(C_n)Vars(C_n+1)\textit{Vars}(I_{\_}n)\subseteq\textit{Vars}(C_{\_}n)\cap\textit{Vars}(C_{\_}{n+1}).

If the predicates C_0,C_1,,C_mC_{\_}0,C_{\_}1,\cdots,C_{\_}m encode the side effects of a sequence of instructions α_0.α_1.,α_m\alpha_{\_}0.\alpha_{\_}1.\cdots,\alpha_{\_}m, then one can intuitively think of each interpolant as a sufficient condition for infeasibility of the post-fix of the trace and this can be represented by a sequence of valid Hoare triples of the form {C}a{D}\{C\}\ a\ \{D\}:

{𝑇𝑟𝑢𝑒}\displaystyle\{\mathit{True}\} α_0{I_0}α_1{I_1}{I_m1}α_m{𝐹𝑎𝑙𝑠𝑒}\displaystyle\quad\alpha_{\_}0\quad\{I_{\_}0\}\quad\alpha_{\_}1\quad\{I_{\_}1\}\quad\cdots\quad\{I_{\_}{m-1}\}\quad\alpha_{\_}m\quad\{\mathit{False}\}

Consider the real-time program P_3P_{\_}3 of Figure 3 and the two infeasible untimed words w_1=i.t_0.t_2w_{\_}1=i.t_{\_}0.t_{\_}2 and w_2=i.t_0.t_1.t_0.t_2w_{\_}2=i.t_{\_}0.t_{\_}1.t_{\_}0.t_{\_}2. Some inductive interpolants for w_1w_{\_}1 and w_2w_{\_}2 can be given by: I_0=y_0x_0(k_0=0)I_{\_}0=y_{\_}0\geq x_{\_}0\wedge(k_{\_}0=0), I_1=y_1k_1I_{\_}1=y_{\_}1\geq k_{\_}1 for w_1w_{\_}1 and I_0=y_0x_0k_00I^{\prime}_{\_}0=y_{\_}0\geq x_{\_}0\wedge k_{\_}0\leq 0, I_1=y_11k_10I^{\prime}_{\_}1=y_{\_}1\geq 1\wedge k_{\_}1\leq 0, I_2=y_2k_2+x_2I^{\prime}_{\_}2=y_{\_}2\geq k_{\_}2+x_{\_}2, I_3=y_3k_3+1I^{\prime}_{\_}3=y_{\_}3\geq k_{\_}3+1 for w_2w_{\_}2. From the inductive interpolants one can obtain valid Hoare triples by de-indexing the predicates in the inductive interpolants141414This is a direct result of the encoding function Enc. The interpolants can only contain at most one version of each indexed variables. as shown in Equations 11-12:

{𝑇𝑟𝑢𝑒}\displaystyle\{\mathit{True}\} i{π(I_0)}t_0{π(I_1)}t_2{𝐹𝑎𝑙𝑠𝑒}\displaystyle\quad i\quad\{\pi(I_{\_}0)\}\quad t_{\_}0\quad\{\pi(I_{\_}1)\}\quad t_{\_}2\quad\{\mathit{False}\} (11)
{𝑇𝑟𝑢𝑒}\displaystyle\{\mathit{True}\} i{π(I_0)}t_0{π(I_1)}t_1{π(I_2)}t_0{π(I_3)}t_2{𝐹𝑎𝑙𝑠𝑒}\displaystyle\quad i\quad\{\pi(I^{\prime}_{\_}0)\}\quad t_{\_}0\quad\{\pi(I^{\prime}_{\_}1)\}\quad t_{\_}1\quad\{\pi(I^{\prime}_{\_}2)\}\quad t_{\_}0\quad\{\pi(I^{\prime}_{\_}3)\}\quad t_{\_}2\quad\{\mathit{False}\} (12)

where π(I_k)\pi(I_{\_}k) is the same as I_kI_{\_}k where each indexed variable x_jx_{\_}j replaced by xx. As can be seen in Equation 12, the sequence contains two occurrences of t_0t_{\_}0: this suggests that a loop occurs in the program, and this loop may be infeasible as well. Formally, because Post(π(I_2),t_0)I_1\textit{Post}(\pi(I^{\prime}_{\_}2),t_{\_}0)\subseteq I^{\prime}_{\_}1, any trace of the form i.t_0.t_1.(t_0.t_1).t_0.t_2i.t_{\_}0.t_{\_}1.(t_{\_}0.t_{\_}1)^{\ast}.t_{\_}0.t_{\_}2 is infeasible. This enables us to construct an interpolant automaton ITA(w_2)\textit{ITA}(w_{\_}2) accepting the regular set of infeasible traces i.t_0.t_1.(t_0.t_1).t_0.t_2i.t_{\_}0.t_{\_}1.(t_{\_}0.t_{\_}1)^{\ast}.t_{\_}0.t_{\_}2. Overall, because w_1w_{\_}1 is also infeasible, the union of the languages accepted by ITA(w_2)\textit{ITA}(w_{\_}2) and ITA(w_1)\textit{ITA}(w_{\_}1) is a set of infeasible traces as defined by the finite automaton in Figure 4.

Given ww such that Enc(w)\textit{Enc}(w) is unsatisfiable we can always find an inductive interpolant: the strongest post-conditions Post(𝑇𝑟𝑢𝑒,w[i])\textit{Post}(\mathit{True},w[i]) or (the weakest pre-conditions from 𝐹𝑎𝑙𝑠𝑒\mathit{False}) defines an inductive interpolant. More generally, we have:

Lemma 2

Let w=α_0.α_1..α_mΣw=\alpha_{\_}0.\alpha_{\_}1.\cdots.\alpha_{\_}m\in\Sigma^{\ast}. If Enc(w)=C_0C_1C_m\textit{Enc}(w)=C_{\_}0\wedge C_{\_}1\wedge\cdots\wedge C_{\_}{m} is unsatisfiable and I_0,,I_m1I_{\_}0,\cdots,I_{\_}{m-1} is an inductive interpolant for Enc(w)\textit{Enc}(w), the following sequence of Hoare triples

{𝑇𝑟𝑢𝑒}α_0{π(I_0)}α_1{π(I_1)}α_m1{π(I_m1)}α_m{𝐹𝑎𝑙𝑠𝑒}\{\mathit{True}\}\quad\alpha_{\_}0\quad\{\pi(I_{\_}0)\}\quad\alpha_{\_}1\quad\{\pi(I_{\_}1)\}\quad\cdots\quad\alpha_{\_}{m-1}\quad\{\pi(I_{\_}{m-1})\}\quad\alpha_{\_}m\quad\{\mathit{False}\}

is valid.

Proof 3

The proof follows from the encoding Enc(w)\textit{Enc}(w) and the fact that each I_kI_{\_}k is included in the weakest pre-condition wp(𝐹𝑎𝑙𝑠𝑒,α_k+1.α_m)\textit{wp}(\mathit{False},\alpha_{\_}{k+1}.\alpha_{\_}m) which can be proved by induction using the property of inductive interpolants.

4.3.2 Interpolant Automata

Let us formalize the interpolant-automata construction. Let w=α_0.α_1..α_mΣw=\alpha_{\_}0.\alpha_{\_}1.\cdots.\alpha_{\_}m\in\Sigma^{\ast}, Enc(w)=C_0C_m\textit{Enc}(w)=C_{\_}0\wedge\dots\wedge C_{\_}{m} and assume Post(𝑇𝑟𝑢𝑒,w)𝐹𝑎𝑙𝑠𝑒\textit{Post}(\mathit{True},w)\subseteq\mathit{False} i.e., Enc(w)\textit{Enc}(w) is unsatisfiable (Fact 2).

Let I_0,I_m1I_{\_}0,\dots I_{\_}{m-1} be an inductive interpolant for C_0C_mC_{\_}0\wedge\dots\wedge C_{\_}{m}. We can construct an interpolant automaton for ww, ITA(w)=(Qw,q_w0,Σw,Δw,Fw)\textit{ITA}(w)=(Q^{w},q^{w}_{\_}0,\Sigma^{w},\Delta^{w},F^{w}) as follows:

  • Qw={𝑇𝑟𝑢𝑒,𝐹𝑎𝑙𝑠𝑒,π(I_0),,π(I_m1)}Q^{w}=\{\mathit{True},\mathit{False},\pi(I_{\_}0),\cdots,\pi(I_{\_}{m-1})\}, (note that if two de-indexed interpolants are the same they account for one state only),

  • Σw={α_0,α_1,,α_m}\Sigma^{w}=\{\alpha_{\_}0,\alpha_{\_}1,\cdots,\alpha_{\_}m\},

  • Fw={𝐹𝑎𝑙𝑠𝑒}F^{w}=\{\mathit{False}\},

  • Δw\Delta^{w} satisfies following conditions:

    1. 1.

      (𝑇𝑟𝑢𝑒,α_0,π(I_0))Δw(\mathit{True},\alpha_{\_}0,\pi(I_{\_}0))\in\Delta^{w},

    2. 2.

      (π(I_m1),α_m,𝐹𝑎𝑙𝑠𝑒)Δw(\pi(I_{\_}{m-1}),\alpha_{\_}m,\mathit{False})\in\Delta^{w},

    3. 3.

      aΣw,0k,jm1\forall a\in\Sigma^{w},\forall 0\leq k,j\leq m-1, if Post(π(I_k),a)π(I_j)\textit{Post}(\pi(I_{\_}k),a)\subseteq\pi(I_{\_}j) then (π(I_k),a,π(I_j))Δw(\pi(I_{\_}k),a,\pi(I_{\_}{j}))\in\Delta^{w}.

Notice that as Post(π(I_k),α_k+1)π(I_k+1)\textit{Post}(\pi(I_{\_}k),\alpha_{\_}{k+1})\subseteq\pi(I_{\_}{k+1}) the word ww itself is accepted by ITA(w)\textit{ITA}(w) and ITA(w)\textit{ITA}(w) is never empty.

Theorem 2 (Interpolant Automata)

Let ww be an infeasible word over PP, then for all w(ITA(w))w^{\prime}\in{\cal L}(\textit{ITA}(w)), ww^{\prime} is infeasible.

Proof 4

This proof is essentially the same as the original one in [26]. The proof uses rule 3 in the construction of ITA(w)\textit{ITA}(w): every word accepted by ITA(w)\textit{ITA}(w) goes through a sequence of states that form a sequence of valid Hoare triples and end up in 𝐹𝑎𝑙𝑠𝑒\mathit{False}. It follows that if wITA(w)w^{\prime}\in\textit{ITA}(w), Post(𝑇𝑟𝑢𝑒,w)𝐹𝑎𝑙𝑠𝑒\textit{Post}(\mathit{True},w^{\prime})\subseteq\mathit{False}.

4.4 Union of Interpolant Automata

In the TAR algorithm we construct interpolant automata at each iteration and the current refinement RR is the union of the regular languages (ITA(w_k)){\cal L}(\textit{ITA}(w_{\_}k)) for each infeasible w_kw_{\_}k. The union can be computed using standard automata-theoretic operations. This assumes that we somehow forget the predicates associated with each state of an interpolant automaton.

In this section we introduce a new technique to re-use the information computed in each ITA(w_k)\textit{ITA}(w_{\_}k) and obtain larger refinements.

Let A=(Q,q_0,Σ,Δ,F)A=(Q,q_{\_}0,\Sigma,\Delta,F) be a finite automaton such that each qQq\in Q is a predicate in φ(X)\varphi(X). We say that AA is sound if the transition relation Δ\Delta satisfies: (I,α,J)Δ(I,\alpha,J)\in\Delta implies that α(I)J{\llbracket\alpha\rrbracket}(I)\subseteq J (or Post(I,α)J\textit{Post}(I,\alpha)\subseteq J).

Let R=(QR,{𝑇𝑟𝑢𝑒},ΣR,ΔR,{𝐹𝑎𝑙𝑠𝑒})R=(Q^{R},\{\mathit{True}\},\Sigma^{R},\Delta^{R},\{\mathit{False}\}) be a sound finite automaton that accepts only infeasible traces. Let wΣw\in\Sigma^{\ast} with ww infeasible. The automaton ITA(w)=(Qw,{𝑇𝑟𝑢𝑒},Σw,Δw,{𝐹𝑎𝑙𝑠𝑒})\textit{ITA}(w)=(Q^{w},\{\mathit{True}\},\Sigma^{w},\Delta^{w},\{\mathit{False}\}) built as described in section 4.3 is sound. We can define an extended union, RITA(w)=(QRQw,{𝑇𝑟𝑢𝑒},ΣRΣw,ΔRITA(w),{𝐹𝑎𝑙𝑠𝑒})R\uplus\textit{ITA}(w)=(Q^{R}\cup Q^{w},\{\mathit{True}\},\Sigma^{R}\cup\Sigma^{w},\Delta^{R\uplus\textit{ITA}(w)},\{\mathit{False}\}) of RR and ITA(w)\textit{ITA}(w) with:

ΔRITA(w)={(p,α,p)}(q,α,q)ΔRΔw s.t.pq and pq}.\Delta^{R\uplus\textit{ITA}(w)}=\{(p,\alpha,p^{\prime})\}\mid\exists(q,\alpha,q^{\prime})\in\Delta^{R}\cup\Delta^{w}\text{ s.t.}p\subseteq q\text{ and }p^{\prime}\supseteq q^{\prime}\}.

It is easy to see that (RITA(w))(R)(ITA(w)){\cal L}(R\uplus\textit{ITA}(w))\supseteq{\cal L}(R)\cup{\cal L}(\textit{ITA}(w)) but also:

Theorem 3

Let w(RITA(w))w^{\prime}\in{\cal L}(R\uplus\textit{ITA}(w)). Then Post(𝑇𝑟𝑢𝑒,w)𝐹𝑎𝑙𝑠𝑒\textit{Post}(\mathit{True},w^{\prime})\subseteq\mathit{False}.

Proof 5

Each transition (p,α,p)(p,\alpha,p^{\prime}) in RITA(w)R\uplus\textit{ITA}(w) corresponds to a valid Hoare triple. It is either in ΔR\Delta^{R} or Δw\Delta^{w} and then is valid by construction or it is weaker than an established Hoare triple in ΔR\Delta^{R} or Δw\Delta^{w}.

This theorem allows us to use the \uplus operator in Algorithm 1 instead of the standard union of regular languages. The advantage is that we re-use already established Hoare triples to build a larger refinement at each iteration.

4.5 Feasibility Beyond Timed Automata

Satisfiability can be checked with an SMT-solver (and decision procedures exist for useful theories). In the case of timed automata and stopwatch automata, the feasibility of a trace can be encoded in linear arithmetic. The corresponding theory, Linear Real Arithmetic (LRA) is decidable and supported by most SMT-solvers. It is also possible to encode non-linear constraints (non-linear guards and assignments). In the latter cases, the SMT-solver may not be able to provide an answer to the SAT problem as non-linear theories are undecidable. However, we can still build on a semi-decision procedure of the SMT-solver, and if it provides an answer, get the status of a trace (feasible or not).

4.6 Sufficient Conditions for Termination

Let us now construct a set of criteria on a real-time program P=((Q,q_0,Σ,Δ,F),)P=((Q,q_{\_}0,\Sigma,\Delta,F),{\llbracket\cdot\rrbracket}) s.t. our proposed method is guaranteed to terminate.

Lemma 3

Termination The algorithm presented in Figure 2 terminates if the following three conditions hold.

  1. 1.

    For any word σΣ\sigma\in\Sigma^{\ast}, then σ{\llbracket\sigma\rrbracket} is expressible within a decidable theory (supported by the solver), and

  2. 2.

    the statespace of PP has a finite representation, and

  3. 3.

    the solver used returns interpolants within the finite statespace representation.

Proof 6

First consider the algorithm presented in Figure 2, then we can initially state that for each iteration of the loop RR grows and thus the NFA representing RR (𝒜R\mathcal{A}^{R}) must also. As per the construction presented in Section 4.4 we can observe that the transition-function of 𝒜R\mathcal{A}^{R} will increase by at least one in each iteration in Step 3. If not, the selection of σ\sigma between step 1 and step 2 is surely violated or the construction of ITA in step 3 is.

From Conditions 2 and 3 we have that the statespace is finitely representable and that these representatives are used by the solver. Thus we know that the interpolant automata also has a finite set of states as per the construction of Section 4.4. Together with the finiteness of the set of instructions, this implies that the transition-function of the interpolant automata must also be finite. Hence, the algorithm can (at most) introduce a transition between each pair of states with each instruction, but must at least introduce a new one in every iteration.

As this termination condition relies on the solver, it is heavily dependent on the construction of the solver. However, if we consider the class of real-time programs captured by Timed Automata, we know that condition 1 is satisfied (in fact it is Linear Real Arithmetic), condition 2 is satisfied via the region-graph construction. This leaves the construction of a solver satisfying condition 3, which in turn should be feasible already from condition 2, but is practically achievable for TA via extrapolation-techniques and difference bound matrices (or for systems with only non-strict guards; timed-darts or integer representatives).

5 Parameter Synthesis for Real-Time Programs

In this section we show how to use the trace abstraction refinement semi-algorithm presented in Section 4 to synthesize good initial values for some of the program variables, and to check robustness of timed automata. We first define the Maximal Safe Initial State problem and then show how to reduce parameter synthesis and robustness to special cases of this problem.

5.1 Maximal Safe Initial Set Problem

Given a real-time program PP, the objective is to determine a set of initial valuations I[V]I\subseteq[V\rightarrow\mathbb{R}] such that, when we start the program in II, 𝒯(P){\cal TL}(P) is empty.

Given a constraint Iβ(V)I\in\beta(V), we define the corresponding assume instruction by: Assume(I)=(I,Id,0¯)\textit{Assume}(I)=(I,\textit{Id},\overline{0}). This instruction leaves all the variables unchanged (discrete update is the identity function and the rate vector is 0¯\overline{0}) and this acts as a guard only.

Let P=(Q,q_0,Σ,Δ,F)P=(Q,q_{\_}0,\Sigma,\Delta,F) be a real-time program and Iβ(V)I\in\beta(V). We define the real-time program Assume(I).P=(Q,{ι},Σ{Assume(I)},Δ{(ι,Assume(I),q_0)},F)\textit{Assume}(I).P=(Q,\{\iota\},\Sigma\cup\{\textit{Assume}(I)\},\Delta\cup\{(\iota,\textit{Assume}(I),q_{\_}0)\},F).

The maximal safe initial state problem asks the following:

Given a real-time program PP, find a maximal Iβ(V)I\in\beta(V) s.t. 𝒯(Assume(I).P)={\cal TL}(\textit{Assume}(I).P)=\varnothing.

5.2 Semi-Algorithm for the Maximal Safe Initial State Problem

Let w(Assume(I).P)w\in{\cal L}(\textit{Assume}(I).P) be a feasible word. It follows that Enc(w)\textit{Enc}(w) must be satisfiable. We can define the set of initial values for which Enc(w)\textit{Enc}(w) is satisfiable by projecting away all the variables in the encoding Enc(w)\textit{Enc}(w) except the ones indexed by 0. Let I_0=(Vars(Enc(w))X0).Enc(w)I_{\_}0=\exists(\textit{Vars}(\textit{Enc}(w))\setminus X^{0}).\textit{Enc}(w) be the resulting (existentially quantified) predicate and π(I_0)\pi(I_{\_}0) be the corresponding constraint on the program variables without indices. We let _i(w)=π(I_0)\exists_{\_}i(w)=\pi(I_{\_}0). It follows that _i(w)\exists_{\_}i(w) is the maximal set of valuations for which ww is feasible. Note that existential quantification for the theory of Linear Real Arithmetic is within the theory via Fourier–Motzkin-elimination – hence the computation of _i(w)\exists_{\_}i(w) by an SMT-solver only needs support for Linear Real Arithmetic when PP encodes a linear hybrid, stopwatch or timed automaton.151515This idea of using Fourier-Motzkin elimination has already been proposed [7] in the context of timed Petri nets.

The TAR-based semi-algorithm for the maximal safe initial state problem is presented in Figure 5.

1: 𝒯(Assume(I).P)={\cal TL}(\textit{Assume}(I).P)=\varnothing?Maximal safe init is III:=𝑇𝑟𝑢𝑒I:=\mathit{True}2: I:=I¬_i(Unt(σ))I:=I\wedge\neg\exists_{\_}i(\textit{Unt}(\sigma))YesNo
Let σ𝒯(Assume(I).P)\sigma\in{\cal TL}(\textit{Assume}(I).P)
Figure 5: Semi-algorithm 𝑆𝑎𝑓𝑒𝐼𝑛𝑖𝑡\mathit{SafeInit}.

The semi-algorithm in Figure 5 works as follows:

  1. 1.

    initially I=𝑇𝑟𝑢𝑒I=\mathit{True}

  2. 2.

    using the semi-algorithm 1, check whether 𝒯(Assume(I).P){\cal TL}(\textit{Assume}(I).P) is empty

  3. 3.

    if so PP does not accept any timed word when we start from I{\llbracket I\rrbracket};

  4. 4.

    Otherwise, there is a witness word σ𝒯(Assume(I).P)\sigma\in{\cal TL}(\textit{Assume}(I).P), implying that IEnc(Unt(σ))I\wedge\textit{Enc}(\textit{Unt}(\sigma)) is satisfiable. It follows that _i.Enc(Unt(σ))\exists_{\_}i.\textit{Enc}(\textit{Unt}(\sigma)) cannot be part of the maximal set. It is used to strengthen II and repeating from step 2.

If the semi-algorithm terminates, it computes exactly the maximal set of values for which the system is safe (II), captured formally by Theorem 4.

Theorem 4

If the semi-algorithm 𝑆𝑎𝑓𝑒𝐼𝑛𝑖𝑡\mathit{SafeInit} terminates and outputs II, then:

  1. 1.

    𝒯(Assume(I).P)={\cal TL}(\textit{Assume}(I).P)=\varnothing and

  2. 2.

    for any Iβ(V)I^{\prime}\in\beta(V), 𝒯(Assume(I).P)={\cal TL}(\textit{Assume}(I^{\prime}).P)=\varnothing implies III^{\prime}\subseteq I.

Proof 7

The fact that 𝒯(Assume(I).P)={\cal TL}(\textit{Assume}(I).P)=\varnothing follows from termination.

The fact that II is maximal is an invariant of the semi-algorithm: at the beginning, I=𝑇𝑟𝑢𝑒I=\mathit{True} and is clearly maximal. At each iteration, we may subtract a set of valuations KK from the previously computed II, but these valuations are all such that 𝒯(Assume(ν).P){\cal TL}(\textit{Assume}(\nu).P)\neq\varnothing for any νK\nu\in K by definition of existential quantification.

Hence every time a set of valuations is removed by strengthening II only unsafe initial valuations are removed. It follows that if safeInit terminates, II is maximal.

5.3 Parameter Synthesis

Let P=(Q,q_0,Σ,Δ,F)P=(Q,q_{\_}0,\Sigma,\Delta,F) be a real-time program over a set of variables XUX\cup U such that: uU,(g,μ,ρ)Δ,(ν,ν)μν(u)=ν(u)\forall u\in U,\forall(g,\mu,\rho)\in\Delta,(\nu,\nu^{\prime})\in\mu\implies\nu(u)=\nu^{\prime}(u) and ρ(u)=0\rho(u)=0. In words, variables in UU are constant variables. Note that they can appear in the guard gg.

The parameter synthesis problem asks the following:

Given a real-time program PP, find a maximal set Iβ(U)I\in\beta(U) s.t. 𝒯(Assume(I).P)={\cal TL}(\textit{Assume}(I).P)=\varnothing.

The parameter synthesis problem is a special case of the maximal safe initial state problem. Indeed, solving the maximal safe initial state problem allows us to find the maximal set of parameters such that 𝒯(P)={\cal TL}(P)=\varnothing. Let II be a solution161616For now assume there is a unique maximal solution. to the maximal safe initial state problem. Then (Vars(P)U).I\exists(\textit{Vars}(P)\setminus U).I is a maximal set of parameter values such that 𝒯(P)={\cal TL}(P)=\varnothing.

5.4 Robustness Checking

Another remarkable feature of our technique is that it can readily be used to check robustness of real-time programs and hence timed automata. In essence, checking robustness amounts to enlarging the guards of a real-time program PP by an ε>0\varepsilon>0. The resulting program is P_εP_{\_}\varepsilon.

The robustness problem asks the following:

Given a real-time program PP, is there some ϵ>0\epsilon>0, s.t. 𝒯(P_ϵ)={\cal TL}(P_{\_}\epsilon)=\varnothing.

Using our method we can solve the robustness synthesis problem which asks the following:

Given a real-time program PP, find a maximal ϵ>0\epsilon>0, s.t. 𝒯(P_ϵ)={\cal TL}(P_{\_}\epsilon)=\varnothing.

This problem asks for a witness (maximal) value for ϵ\epsilon.

The robustness synthesis is a special case of the parameter synthesis problem where ϵ\epsilon is a parameter of the program PP.

Note that in our experiments (next section), we assume that PP is robust and in this case we can compute a maximal value for ϵ\epsilon. Proving that a program is non-robust requires proving feasibility of infinite traces for ever decreasing ϵ\epsilon. We have developed some techniques (similar to proving termination for standard programs) to do so but this is still under development.

6 Experiments

We have conducted three sets of experiments, each testing the applicability of our proposed method (denoted by rttar) compared to state-of-the-art tools with specialized data-structures and algorithms for the given setting. All experiments were conducted on AMD EPYC 7551 Processors and limited to 1 hour of computation. The rttar tool uses the Uppaal parsing-library, but relies on Z3 [20] for the interpolant computation. Our experimental setup is available online [30].

6.1 Verification of Timed and Stopwatch Automata

The real-time programs, P_1P_{\_}1 of Figure 1 and P_2P_{\_}2 of Figure 3 can be analyzed with our technique. The analysis (rttar algorithm 1) terminates in two iterations for the program P_1P_{\_}1, a stopwatch automaton. As emphasized in the introduction, neither Uppaal (over-approximation with DBMs) nor PHAver can provide the correct answer to the reachability problem for P_1P_{\_}1.

To prove that location 22 is unreachable in program P_2P_{\_}2 requires to discover an invariant that mixes integers (discrete part of the state) and clocks (continuous part). Our technique successfully discovers the program invariants. As a result the refinement depicted in Figure 4 is constructed and as it contains (A_P_2){\cal L}(A_{\_}{P_{\_}2}) the refinement algorithm RTTAR terminates and proves that 22 is not reachable. A_P_2A_{\_}{P_{\_}2} can only be analyzed in Uppaal with significant computational effort and bounded integers.

6.2 Parametric Stopwatch Automata

We compare the rttar tool to Imitator [3] – the state-of-the-art parameter synthesis tool for reachability171717We compare with the EFSynth-algorithm in the Imitator tool as this yielded the lowest computation time in the two terminating instances.. We shall here use the semi-algorithm presented in Section 5 For the test-cases we use the gadget presented initially in Figure 1, a few of the test-cases used in [4], as well as two modified versions of Fischers Protocol, shown in Figure 6. In the first version we replace the constants in the model with parameters. In the second version (marked by robust), we wish to compute an expression, that given an arbitrary upper and lower bound yields the robustness of the system – in the same style as the experiments presented in Section 6.3, but here for arbitrary guard-values.

imitator-2.12 rttar
A1 DNF 0.08
Sched2.100.0 7.16 492.73
Sched2.50.0 4.95 273.36
fischer_2 DNF 0.26
fischer_2_robust DNF 0.25
fischer_4 DNF 47.96
fischer_4_robust DNF 50.26
Table 2: Results for parameter-synthesis comparing rttar with Imitator. Time is given in seconds. DNF marks that the tool did not complete the computation within an hour.
Refer to caption
Figure 6: A Uppaal template for a single process in Fischers Algorithm. The variables e, a and b are parameters for ϵ\epsilon, lower and upper bounds for clock-values respectively.

As illustrated by Table 2 the performance of rttar is slower than Imitator when Imitator is able to compute the results. On the other hand, when using Imitator to verify our motivating example from Figure 1, we observe that Imitator never terminates, due to the divergence of the polyhedra-computation. This is the effect illustrated in Table 1.

When trying to synthesize the parameters for Fischers algorithm, in all cases, Imitator times out and never computes a result. For both two and four processes in Fischers algorithm, our tool detects that the system is safe if and only if a<0b<0ba>0a<0\vee b<0\vee b-a>0. Notice that a<0b<0a<0\vee b<0 is a trivial constraint preventing the system from doing anything. The constraint ba>0b-a>0 is the only useful one. Our technique provides a formal proof that the algorithm is correct for ba>0b-a>0.

In the same manner, our technique can compute the most general constraint ensuring that Fischers algorithm is robust. The result of rttar algorithm is that the system is robust iff ϵ0a<0b<0ba2ϵ>0\epsilon\leq 0\vee a<0\vee b<0\vee b-a-2\epsilon>0 – which for ϵ=0\epsilon=0 (modulo the initial non-zero constraint on ϵ\epsilon) reduces to the constraint-system obtained in the non-robust case.

6.3 Robustness of Timed Automata

To address the robustness problem for a real-time program PP, we use the semi-algorithm presented in Section 5 and reduce the robustness-checking problem to that of parameter-synthesis. Notice the delimitation of the input-problems to robust-only instances from Section 5.4.

rttar_robust symrob
csma_05 32.38 1/3 0.51 1/3
csma_06 87.55 1/3 1.91 1/3
csma_07 294.30 1/3 7.37 1/3
fischer_04 17.64 1/2 0.19 1/2
fischer_05 102.50 1/2 0.77 1/2
fischer_06 519.41 1/2 2.83 1/2
M3 17.14 \infty N/A N/A
M3c 17.72 \infty 3.91 250/3
a 3470.95 1/2 19.66 1/4
Table 3: Results for robustness analysis comparing rttar with symrob. Time is given in seconds. N/A indicates that symrob was unable to compute the robustness for the given model.

As Table 3 demonstrates, symrob [33] and rttar do not always agree on the results. Notably, since the TA M3 contains strict guards, symrob is unable to compute the robustness of it. Furthermore, symrob under-approximates ϵ\epsilon, an artifact of the so-called “loop-acceleration”-technique and the polyhedra-based algorithm. This can be observed in the modified model M3c, which is now analyzable by symrob, but differs in results compared to rttar. This is the same case with the model denoted a. We experimented with ϵ\epsilon-values to confirm that M3 is safe for all the values tested – while a is safe only for values tested respecting ϵ<12\epsilon<\frac{1}{2}. We can also see that our proposed method is significantly slower than the special-purpose algorithms deployed by symrob, but in contrast to symrob, it computes the maximal set of good paramaters.

7 Conclusion

We have proposed a version of the trace abstraction refinement approach to real-time programs. We have demonstrated that our semi-algorithm can be used to solve the reachability problem for instances which are not solvable by state-of-the-art analysis tools.

Our algorithms can handle the general class of real-time programs that comprises of classical models for real-time systems including timed automata, stopwatch automata, hybrid automata and time(d) Petri nets.

As demonstrated in Section 6, our tool is capable of solving instances of reachability problems, robustness, parameter synthesis, that current tools are incapable of handling.

For future work we would like to improve the scalability of the proposed method, utilizing well known techniques such as extrapolations, partial order reduction [17] and compositional verification [15]. Another short-term improvement is to use unsat cores to compute interpolant automata as proposed in [22]. Furthermore, we would like to extend our approach from reachability to more expressive temporal logics.

Acknowledgments.

The research was partially funded by Innovation Fund Denmark center DiCyPS and ERC Advanced Grant LASSO. Furthermore, these results was made possible by an external stay partially funded by Otto Mønsted Fonden.

References

  • [1] Rajeev Alur, Thao Dang, and Franjo Ivančić. Reachability analysis of hybrid systems via predicate abstraction. In Claire J. Tomlin and Mark R. Greenstreet, editors, Hybrid Systems: Computation and Control, pages 35–48, Berlin, Heidelberg, 2002. Springer Berlin Heidelberg.
  • [2] Rajeev Alur and David L. Dill. A theory of timed automata. Theor. Comput. Sci., 126(2):183–235, April 1994.
  • [3] Étienne André, Laurent Fribourg, Ulrich Kühne, and Romain Soulat. Imitator 2.5: A tool for analyzing robustness in scheduling problems. In Dimitra Giannakopoulou and Dominique Méry, editors, FM 2012: Formal Methods: 18th International Symposium, Paris, France, August 27-31, 2012. Proceedings, pages 33–36, Berlin, Heidelberg, 2012. Springer Berlin Heidelberg.
  • [4] Étienne André, Giuseppe Lipari, Hoang Gia Nguyen, and Youcheng Sun. Reachability preservation based parameter synthesis for timed automata. In Klaus Havelund, Gerard Holzmann, and Rajeev Joshi, editors, NASA Formal Methods: 7th International Symposium, NFM 2015, Pasadena, CA, USA, April 27-29, 2015, Proceedings, pages 50–65, Cham, 2015. Springer International Publishing.
  • [5] G. Behrmann, A. David, K.G. Larsen, J. Hakansson, P. Petterson, Wang Yi, and M. Hendriks. Uppaal 4.0. In QEST’06, pages 125–126, 2006.
  • [6] Béatrice Bérard, Franck Cassez, Serge Haddad, Didier Lime, and Olivier H. Roux. Comparison of the expressiveness of timed automata and time petri nets. In Paul Pettersson and Wang Yi, editors, Formal Modeling and Analysis of Timed Systems, Third International Conference, FORMATS 2005, Uppsala, Sweden, September 26-28, 2005, Proceedings, volume 3829 of Lecture Notes in Computer Science, pages 211–225. Springer, 2005.
  • [7] Béatrice Bérard and Laurent Fribourg. Reachability analysis of (timed) petri nets using real arithmetic. In Jos C. M. Baeten and Sjouke Mauw, editors, CONCUR’99 Concurrency Theory, pages 178–193, Berlin, Heidelberg, 1999. Springer Berlin Heidelberg.
  • [8] Dirk Beyer, Marieke Huisman, Fabrice Kordon, and Bernhard Steffen, editors. Tools and Algorithms for the Construction and Analysis of Systems - 25 Years of TACAS: TOOLympics, Held as Part of ETAPS 2019, Prague, Czech Republic, April 6-11, 2019, Proceedings, Part III, volume 11429 of Lecture Notes in Computer Science. Springer, 2019.
  • [9] Marco Bozzano, Alessandro Cimatti, Alberto Griggio, and Cristian Mattarei. Efficient anytime techniques for model-based safety analysis. In Daniel Kroening and Corina S. Păsăreanu, editors, Computer Aided Verification, pages 603–621, Cham, 2015. Springer International Publishing.
  • [10] Aaron R. Bradley. Sat-based model checking without unrolling. In Ranjit Jhala and David Schmidt, editors, Verification, Model Checking, and Abstract Interpretation, pages 70–87, Berlin, Heidelberg, 2011. Springer Berlin Heidelberg.
  • [11] J. Byg, M. Jacobsen, L. Jacobsen, K.Y. Jørgensen, M.H. Møller, and J. Srba. TCTL-preserving translations from timed-arc Petri nets to networks of timed automata. TCS, 2013. Available at http://dx.doi.org/10.1016/j.tcs.2013.07.011.
  • [12] Béatrice Bérard, Franck Cassez, Serge Haddad, Didier Lime, and Olivier H. Roux. The expressive power of time Petri nets. Theoretical Computer Science, 474:1–20, 2013.
  • [13] Franck Cassez, Peter Gjøl Jensen, and Kim Guldstrand Larsen. Refinement of trace abstraction for real-time programs. In Matthew Hague and Igor Potapov, editors, Reachability Problems, pages 42–58, Cham, 2017. Springer International Publishing.
  • [14] Franck Cassez and Kim Guldstrand Larsen. The impressive power of stopwatches. In Catuscia Palamidessi, editor, CONCUR 2000 - Concurrency Theory, 11th International Conference, University Park, PA, USA, August 22-25, 2000, Proceedings, volume 1877 of Lecture Notes in Computer Science, pages 138–152. Springer, 2000.
  • [15] Franck Cassez, Christian Müller, and Karla Burnett. Summary-based inter-procedural analysis via modular trace refinement. In Venkatesh Raman and S. P. Suresh, editors, 34th International Conference on Foundation of Software Technology and Theoretical Computer Science, FSTTCS 2014, December 15-17, 2014, New Delhi, India, volume 29 of LIPIcs, pages 545–556. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 2014.
  • [16] Franck Cassez and Olivier Henri Roux. Structural translation from time petri nets to timed automata. Journal of Software and Systems, 79(10):1456–1468, October 2006.
  • [17] Franck Cassez and Frowin Ziegler. Verification of concurrent programs using trace abstraction refinement. In Martin Davis, Ansgar Fehnker, Annabelle McIver, and Andrei Voronkov, editors, Logic for Programming, Artificial Intelligence, and Reasoning - 20th International Conference, LPAR-20 2015, Suva, Fiji, November 24-28, 2015, Proceedings, volume 9450 of Lecture Notes in Computer Science, pages 233–248. Springer, 2015.
  • [18] A. Cimatti, A. Griggio, S. Mover, and S. Tonetta. Parameter synthesis with ic3. In 2013 Formal Methods in Computer-Aided Design, pages 165–168, Oct 2013.
  • [19] Edmund M. Clarke, Orna Grumberg, Somesh Jha, Yuan Lu, and Helmut Veith. Counterexample-guided abstraction refinement. In E. Allen Emerson and A. Prasad Sistla, editors, Computer Aided Verification, 12th International Conference, CAV 2000, Chicago, IL, USA, July 15-19, 2000, Proceedings, volume 1855 of Lecture Notes in Computer Science, pages 154–169. Springer, 2000.
  • [20] Leonardo De Moura and Nikolaj Bjørner. Z3: An efficient smt solver. In Proceedings of the Theory and Practice of Software, 14th International Conference on Tools and Algorithms for the Construction and Analysis of Systems, TACAS’08/ETAPS’08, pages 337–340, Berlin, Heidelberg, 2008. Springer-Verlag.
  • [21] Henning Dierks, Sebastian Kupferschmid, and Kim G Larsen. Automatic abstraction refinement for timed automata. In International Conference on Formal Modeling and Analysis of Timed Systems, pages 114–129. Springer, 2007.
  • [22] Daniel Dietsch, Matthias Heizmann, Betim Musa, Alexander Nutz, and Andreas Podelski. Craig vs. newton in software model checking. In Eric Bodden, Wilhelm Schäfer, Arie van Deursen, and Andrea Zisman, editors, Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering, ESEC/FSE 2017, Paderborn, Germany, September 4-8, 2017, pages 487–497. ACM, 2017.
  • [23] Goran Frehse. Phaver: Algorithmic verification of hybrid systems past hytech. In Manfred Morari and Lothar Thiele, editors, Hybrid Systems: Computation and Control, volume 3414 of Lecture Notes in Computer Science, pages 258–273. Springer Berlin Heidelberg, 2005.
  • [24] Goran Frehse, Sumit Kumar Jha, and Bruce H. Krogh. A counterexample-guided approach to parameter synthesis for linear hybrid automata. In Magnus Egerstedt and Bud Mishra, editors, Hybrid Systems: Computation and Control, pages 187–200, Berlin, Heidelberg, 2008. Springer Berlin Heidelberg.
  • [25] Goran Frehse, Colas Le Guernic, Alexandre Donzé, Scott Cotton, Rajarshi Ray, Olivier Lebeltel, Rodolfo Ripado, Antoine Girard, Thao Dang, and Oded Maler. Spaceex: Scalable verification of hybrid systems. In Ganesh Gopalakrishnan and Shaz Qadeer, editors, Computer Aided Verification, volume 6806 of Lecture Notes in Computer Science, pages 379–395. Springer Berlin Heidelberg, 2011.
  • [26] Matthias Heizmann, Jochen Hoenicke, and Andreas Podelski. Refinement of trace abstraction. In Jens Palsberg and Zhendong Su, editors, Static Analysis, 16th International Symposium, SAS 2009, Los Angeles, CA, USA, August 9-11, 2009. Proceedings, volume 5673 of Lecture Notes in Computer Science, pages 69–85. Springer, 2009.
  • [27] Matthias Heizmann, Jochen Hoenicke, and Andreas Podelski. Software model checking for people who love automata. In Natasha Sharygina and Helmut Veith, editors, CAV, volume 8044 of LNCS, pages 36–52. Springer, 2013.
  • [28] Thomas A. Henzinger, Pei-Hsin Ho, and Howard Wong-toi. Hytech: A model checker for hybrid systems. Software Tools for Technology Transfer, 1:460–463, 1997.
  • [29] Thomas A. Henzinger, Peter W. Kopke, Anuj Puri, and Pravin Varaiya. What’s decidable about hybrid automata? Journal of Computer and System Sciences, 57(1):94 – 124, 1998.
  • [30] Peter Gjøl Jensen, Franck Cassez, and Kim Guldstrand Larsen. Repeatability for ”Verification and Parameter Synthesis for Real-Time Programs using Refinement of Trace Abstraction”, July 2020.
  • [31] Bishoksan Kafle, John P. Gallagher, Graeme Gange, Peter Schachte, Harald Søndergaard, and Peter J. Stuckey. An iterative approach to precondition inference using constrained horn clauses. CoRR, abs/1804.05989, 2018.
  • [32] Piotr Kordy, Rom Langerak, Sjouke Mauw, and Jan Willem Polderman. A symbolic algorithm for the analysis of robust timed automata. In Cliff B. Jones, Pekka Pihlajasaari, and Jun Sun, editors, FM 2014: Formal Methods - 19th International Symposium, Singapore, May 12-16, 2014. Proceedings, volume 8442 of Lecture Notes in Computer Science, pages 351–366. Springer, 2014.
  • [33] Ocan Sankur. Symbolic quantitative robustness analysis of timed automata. In Christel Baier and Cesare Tinelli, editors, Tools and Algorithms for the Construction and Analysis of Systems - 21st International Conference, TACAS 2015, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2015, London, UK, April 11-18, 2015. Proceedings, volume 9035 of Lecture Notes in Computer Science, pages 484–498. Springer, 2015.
  • [34] Ashish Tiwari. Abstractions for hybrid systems. Formal Methods in System Design, 32(1):57–83, Feb 2008.
  • [35] Weifeng Wang and Li Jiao. Trace abstraction refinement for timed automata. In Franck Cassez and Jean-François Raskin, editors, Automated Technology for Verification and Analysis - 12th International Symposium, ATVA 2014, Sydney, NSW, Australia, November 3-7, 2014, Proceedings, volume 8837 of Lecture Notes in Computer Science, pages 396–410. Springer, 2014.