Timed Test Generation Based on Timed Temporal Logic

Similar documents
A Testing Theory for Real-Time Systems

Linear Temporal Logic and Büchi Automata

An On-the-fly Tableau Construction for a Real-Time Temporal Logic

CS256/Spring 2008 Lecture #11 Zohar Manna. Beyond Temporal Logics

LTL is Closed Under Topological Closure

Lecture Notes on Emptiness Checking, LTL Büchi Automata

Alan Bundy. Automated Reasoning LTL Model Checking

Property Checking of Safety- Critical Systems Mathematical Foundations and Concrete Algorithms

The State Explosion Problem

Automata, Logic and Games: Theory and Application

Deciding Safety and Liveness in TPTL

Real-Time Systems. Lecture 15: The Universality Problem for TBA Dr. Bernd Westphal. Albert-Ludwigs-Universität Freiburg, Germany

Temporal Logic. Stavros Tripakis University of California, Berkeley. We have designed a system. We want to check that it is correct.

Theoretical Foundations of the UML

Partial model checking via abstract interpretation

DISTINGUING NON-DETERMINISTIC TIMED FINITE STATE MACHINES

From Liveness to Promptness

What You Must Remember When Processing Data Words

CDS 270 (Fall 09) - Lecture Notes for Assignment 8.

Trace Diagnostics using Temporal Implicants

Partially Ordered Two-way Büchi Automata

PSL Model Checking and Run-time Verification via Testers

Model Checking Algorithms

T Reactive Systems: Temporal Logic LTL

ESE601: Hybrid Systems. Introduction to verification

Models for Efficient Timed Verification

Chapter 3: Linear temporal logic

Temporal logics and explicit-state model checking. Pierre Wolper Université de Liège

Safety and Liveness Properties

Logic Model Checking

Alternating-Time Temporal Logic

Timed Automata VINO 2011

Correspondence between Kripke Structures and Labeled Transition Systems for Model Minimization

Timo Latvala. March 7, 2004

Helsinki University of Technology Laboratory for Theoretical Computer Science Research Reports 66

Timo Latvala. February 4, 2004

PSPACE-completeness of LTL/CTL model checking

First-order resolution for CTL

Introduction. Büchi Automata and Model Checking. Outline. Büchi Automata. The simplest computation model for infinite behaviors is the

Abstracting real-valued parameters in parameterised boolean equation systems

LTL with Arithmetic and its Applications in Reasoning about Hierarchical Systems

Weak Alternating Timed Automata

Model for reactive systems/software

Fuzzy Limits of Functions

Timed Automata. Chapter Clocks and clock constraints Clock variables and clock constraints

State-Space Exploration. Stavros Tripakis University of California, Berkeley

Tecniche di Specifica e di Verifica. Automata-based LTL Model-Checking

A Logical Characterization for Weighted Event-Recording Automata

Peled, Vardi, & Yannakakis: Black Box Checking

Syntax. Notation Throughout, and when not otherwise said, we assume a vocabulary V = C F P.

Temporal Logic. M φ. Outline. Why not standard logic? What is temporal logic? LTL CTL* CTL Fairness. Ralf Huuck. Kripke Structure

Towards a formal language for systemic requirements

Applied Logic. Lecture 1 - Propositional logic. Marcin Szczuka. Institute of Informatics, The University of Warsaw

Büchi Automata and Linear Temporal Logic

Model Checking. Boris Feigin March 9, University College London

Chapter 5: Linear Temporal Logic

Abstractions and Decision Procedures for Effective Software Model Checking

Computation Tree Logic (CTL) & Basic Model Checking Algorithms

Complexity Issues in Automated Addition of Time-Bounded Liveness Properties 1

Bounded Model Checking with SAT/SMT. Edmund M. Clarke School of Computer Science Carnegie Mellon University 1/39

Lattice Automata. Orna Kupferman and Yoad Lustig

Probabilistic Bisimilarity as Testing Equivalence

Semantical study of intuitionistic modal logics

Automata-based Verification - III

Model Checking Real-Time Systems

Helsinki University of Technology Laboratory for Theoretical Computer Science Research Reports 83

TIMED automata, introduced by Alur and Dill in [3], have

Strategy Logic. 1 Introduction. Krishnendu Chatterjee 1, Thomas A. Henzinger 1,2, and Nir Piterman 2

Automata on Infinite words and LTL Model Checking

Automata-based Verification - III

a Hebrew University b Weizmann Institute c Rice University

Introduction to Temporal Logic. The purpose of temporal logics is to specify properties of dynamic systems. These can be either

Almost Linear Büchi Automata

Verification Using Temporal Logic

On decision problems for timed automata

New Complexity Results for Some Linear Counting Problems Using Minimal Solutions to Linear Diophantine Equations

Time(d) Petri Net. Serge Haddad. Petri Nets 2016, June 20th LSV ENS Cachan, Université Paris-Saclay & CNRS & INRIA

Matching Trace Patterns With Regular Policies

An Introduction to Temporal Logics

Computer-Aided Program Design

From Monadic Second-Order Definable String Transformations to Transducers

A Hierarchy for Accellera s Property Specification Language

Branching Bisimilarity with Explicit Divergence

Representing Temporal System Properties Specified with CCTL formulas using Finite Automaton

A Enforceable Security Policies Revisited

Model checking the basic modalities of CTL with Description Logic

On the model checking of sequential reactive systems

Linear Temporal Logic (LTL)

Temporal Logic with Past is Exponentially More Succinct

09 Modal Logic II. CS 3234: Logic and Formal Systems. October 14, Martin Henz and Aquinas Hobor

Course Runtime Verification

Alternating Time Temporal Logics*

Synthesis weakness of standard approach. Rational Synthesis

On simulations and bisimulations of general flow systems

Optimal Control of Mixed Logical Dynamical Systems with Linear Temporal Logic Specifications

A framework based on implementation relations for implementing LOTOS specifications

The non-logical symbols determine a specific F OL language and consists of the following sets. Σ = {Σ n } n<ω

The theory of regular cost functions.

Semi-Automatic Distributed Synthesis

On Real-time Monitoring with Imprecise Timestamps

Transcription:

Timed Test Generation Based on Timed Temporal Logic STEFAN D. BRUDA and CHUN DAI Department of Computer Science Bishop s University Sherbrooke, Quebec J1M 1Z7 CANADA stefan@bruda.ca, cdai@cs.ubishops.ca Abstract: Based on a previously developed testing theory for real-time systems, we show how timed tests can be algorithmically generated out of a timed variant of linear-time temporal logic (namely, TPTL), so that a process must pass the generated test if and only if the process satisfies the given temporal logic formula. Beside the obvious use of such an algorithm (to generate tests), our result also establishes a correspondence between timed must testing and timed temporal logic. Key-words: Formal methods, Real-time systems, Model-based testing, May testing, Must testing, Testing preorders, Test generation, Timed temporal logic, TPTL 1 Introduction How to guarantee validity and reliability of software and hardware is one of the most pressing problems. Conformance testing [14] is known in this area for its succinctness and high automatization. Its aim is to check whether an implementation conforms to a given specification. System specifications can be mainly classified into two kinds: algebraic and logic. The first favours refinement, where a single algebraic formalism is equipped with a refinement relation to represent and relate both specifications and implementations [13]. An implementation is validated if it refines its specification. Process algebrae, labelled transition systems, and finite automata are commonly used in this classification, with traditional refinement relations being either behavioural equivalences or preorders [6, 10]. A typical example is model-based testing [6]. The second approach prefers assertive constructs. Different formalisms describe the properties of specifications and implementations; specifications are defined logically while implementations are given in an operational notation. The semantics of assertions is to determine whether an implementation satisfies its specification. A typical example is model checking [8]. The domain of conformance testing consists in reactive systems, which interact with their environment. Often such systems are required to be real time, meaning that in addition to the correct order of events, they This research was supported by the Natural Sciences and Engineering Research Council of Canada. Part of this research was also supported by Bishop s University. must satisfy constraints on delays separating certain events. Real-time specifications are then used as the basis of conformance testing for such systems. We previously developed [9] a semantic theory for real-time system specification. Using a theory of timed ω-final states as well as a timed testing framework based on De Nicola and Hennessy s testing [10], we developed timed may and must preorders that relate timed processes on the basis of their responses to timed tests. Our framework is as close to the original framework of (untimed) testing as possible, and is also as general as possible. While studies of realtime testing abound, they mostly restrict the real-time domain to make it tractable. We believe that starting from a general theory is more productive than starting directly from some practically feasible (and thus restricted) subset of the issue, so our theory is general. Still, it is more practical than one might expect. Indeed, the characterization of the timed preorders [9] uses a surprisingly concise set of timed tests. To further address the practicality issue we tackle now automatic test generation. We show how to algorithmically build tests starting from timed propositional temporal logic [3] formulae. This algorithm is also a first (but significant) step toward an integration of operational and assertive specification styles in the area of real-time systems, to obtain heterogeneous (algebraic and logic) specifications and tools. 2 Preliminaries and Notations Preorders are reflexive and transitive relations. N = ω. Our constructions are based on some alpha- ISSN: 1790-5117 15 ISBN: 978-960-474-193-9

bet A representing a set of actions excluding the internal action and on a time alphabet L which contains some kind of positive numbers (such as N or R + ). A set of clocks C is a set of variables over L. A clock interpretation for a set C of clocks is a mapping C L. If t > 0 and c is a clock interpretation over C, in the clock interpretation c = c+t we have c (x) = c(x)+t for all clocks x C. Clocks can also be reset to zero. If x is a clock and r is a real then x r is a time constraint, {, <, =,, >, }. Constraints can be joined in conjunctions or disjunctions (C) is the set of time constraints over a set C of clocks. Timed Transition Systems Labelled transition systems (LTS) [6] serve as a semantic model for formal specification languages. A timed transition system is an LTS extended with time values associated to actions. Timed automata [2] introduce the notion of time constraints. We find convenient to combine the two concepts into a unified model for real time, which we call by abuse of terminology timed transition system. For a set A of observable actions ( A), a set L of times values, and a set C of clocks, a timed transition system is a tuple ((A L) {},C,S,,p 0 ), where: S is a countable set of states; every state p S has an associated clock interpretation c p : C L; (S (A L) S (C) 2 C ) (S {} S) (a, δ) is the transition relation (we use p Ø, C p instead of (p,(a,δ),p, Ø,C), omitting C whenever C = and also Ø whenever Ø = ); p 0 is the initial state. (a, δ) Whenever p Ø, C p, the transition system performs a with delay δ; the delay causes the clocks to progress so that c p (x) = c p (x) + δ whenever x C and c p (x) = 0 otherwise; the transition is enabled only if Ø holds under the interpretation c p ; transitions do not affect clock interpretations and cannot be time constrained. Normally a trace is described as a sequence of the events or states (but not the delays between them). To add time to a trace, we add time information to the usual notion of trace (that contains actions only). A timed trace over A, L, and C is a member of (A L (C) 2 C ) (A L (C) 2 C ) ω. If both L and (C) (or equivalently C) are empty the timed transition system becomes an LTS, and its timed traces are normal traces. One of L or (C) could be empty and we still obtain a timed trace; we use this to differentiate processes and specifications. (a, δ) As usual p = Ø, C p iff p (a, δ) p n Ø, C p and p ε p iff p = p 0 pn = p, for some n 0, and p = w q whenever w = (a i,δ i, Ø i,c i ) 0<i k and p (a 1, δ 1 ) (a = p 2, δ 2 ) Ø 1, C 1 = p 1 Ø 2, C 2 (a k, δ k ) = p 2 Ø k, C k = p. k A timed path π of a timed transition system M = ((A L) {},C,S,,p 0 ) is a potentially infinite sequence (p i 1,(a i,δ i, Ø i,c i ),p i ) 0<i<k, where (a p i, δ i ) i 1 = p Ø i, C i for all 0 < i k; If π = ω (with i π = k), π is infinite; otherwise π is finite. If π N and p π (i.e., p π is a deadlock state), then the timed path π is called maximal. trace(π), the (timed) trace of π is defined as the sequence (a i,δ i, Ø i,c i ) 0 i π,ai (A L (C) 2 C ). Π f (p ), Π m (p ), Π I (p ) denote the sets of all finite timed paths, all maximal timed paths, and all infinite timed paths starting from state p S, respectively. We also put Π(p ) = Π f (p ) Π m (p ) Π I (p ). State p of transition system p is timed divergent, denoted by p p (or just p when there is no ambiguity), if π Π I (p ) : trace(π) = ε. State p is called timed w-divergent (denoted by p p w) for some w = (a i,δ i, Ø i,c i ) 0<i<k (A L (C) 2 C ) (A L (C) 2 C ) ω if l N,p S : l k,p w = p,p p, with w = (a i,δ i, Ø i,c i ) 0<i<l. State p is timed convergent or timed w-convergent (p p and p p w, respectively) if it is not the case that p p and p p w, respectively. The set of initial actions of p is init p (p ) = {(a,δ, Ø,C) (a, δ) A L (C) 2 C : p : p = p }. Ø, C For a timed transition system (state) p the timed finite-trace language L f (p), maximal-trace (complete-trace) language L m (p), infinite-trace language L I (p), and divergence language L D (p) of p are L f (p) = {trace(π) : π Π f (p)} L m (p) = {trace(π) : π Π m (p)} L I (p) = {trace(π) : π Π I (p)} L D (p) = {w (A L (C) 2 C ) (A L (C) 2 C ) ω : p w} We defined timed languages slightly differently from the original [2] to reflect their use for system specification and also to simplify the presentation. However if we omit the clocks and their constraints (which we will do for processes) there is a natural bijection between our definition and the original. Once more similar to the theory of timed automata [2] we introduce a set of timed ω-final states. Then the timed ω-regular trace language of some timed transition system p is L ω (p) = {trace(π) : π ISSN: 1790-5117 16 ISBN: 978-960-474-193-9

Π ω (p)} (A L (C) 2 C ) ω, where Π ω (p) contains exactly all the ω-regular timed paths; i.e., ω-final states must occur infinitely often in any π Π ω (p). We also exclude henceforth Zeno behaviours from all the languages that we consider: no trace is allowed to show Zeno behaviour. In other words, time progresses and must eventually grow past any constant value. Timed Propositional Temporal Logic Timed Propositional Temporal Logic (TPTL) [3] is one of the most general temporal logics with time constraints [4]. TPTL extends linear-time temporal logic (LTL) [4, 8] by adding time constraints, so that its semantics is given with respect to timed traces 1, i.e., timed words in (A L) (A L) ω. We use TPTL without congruence, but we just call it TPTL for short. With φ, φ 1, φ 2 ranging over TPTL formulae, a ranging over A, x ranging over a set of clocks C, and c ranging over positive constants, the syntax of the term θ and the TPTL formula φ is the following: θ = x + c c φ = θ 1 θ 2 a φ φ 1 φ 2 X φ φ 1 U φ 2 x.φ Fis the set of all TPTL formulae. A timed trace w = (a i,δ i ) 0<i k (A L) (A L) ω satisfies φ iff w γ φ. The relation γ ((A L) (A L) ω ) F is the least relation satisfying the conditions in the semantics of TPTL formulae shown below, with w j standing for (a i,δ i ) j i k for any 1 j k, and γ : C L being some clock interpretation. θ 1 θ 2 iff γ(θ 1 ) γ(θ 2 ), w γ and w γ for any w, w γ a iff w ε and a 1 = a, w γ φ iff (w γ φ), w γ φ 1 φ 2 iff w γ φ 1 and w γ φ 2, w γ X φ iff w 2 γ φ, w γ φ 1 U φ 2 if 0 < i k: i r k: w r γ φ 2, 0 < s < i: w s γ φ 1, w γ x.φ iff w γ[0/x] φ. We require that γ(x+c) = γ(x)+c and γ(c) = c; γ[t/x] is the clock interpretation that agrees with γ on all clocks except x, which is mapped to t L. 1 Time traces as presented in the previous section also contain time constraints; however, as we will see in Section 3, the time constraints appear only in tests and so the trace of processes are over A L only. As usual one can also introduce the derived operators G ( globally ) and F ( eventually ) as G φ = R φ and F φ = U φ, respectively. The operator R ( releases ) is the dual of the operator U. A timed process 2 p satisfies the TPTL formula φ, written p γ φ, iff w L f (p) L m (p) L ω (p) L D (p) : w γ φ. 3 Previous Work We adapted [9] the theory of De Nicola and Hennessy [10] to timed testing. Then we introduced [9] the concept of Büchi success for tests, so that the properties of infinite runs of a process can be readily identified by tests. We used timed transition systems as the formalism for both processes and tests. Definition 1 [9]. A timed process ((A L) {},S,,p 0 ) is a timed transition system ((A L) {},,S,,p 0 ) with an empty set of clocks (and thus with no time constraints). It follows that all the traces of any timed process are in the set (A L) (A L) ω. A timed test (A {},C,T, t,σ,ω,t 0 ) is a timed transition system ((A ) {},C,T,,t 0 ) with the addition of Σ T of success states and Ω T of ω-final states. Note that L = for tests and therefore t (T A (C) 2 C T) (T {} T). The transition relation of a process and a test are restricted (in different manners) because the test runs in parallel with the process under the test 3. This latter process (called the implementation) features time sequences but no time constraints, while the test features only time constraints. The set of all timed tests is denoted by T. Definition 2 [9]. A partial computation c of a timed process p and a timed test t is a potentially infinite sequence ( p i 1,t i 1 (a i, δ i ) R p i,t i ) 0<i k, where k Ø i, C i N {ω}, such that p i P and t i T for all 0 < i k; and δ i L is taken from p, Ø i and C i are taken from t, and R {1,2,3} for all 0 < i k. The relation is defined by the following rules: p i 1,t i 1 1 p i,t i if a i =, p i 1 p p i, t i 1 = t i, and t i 1 Σ, p i 1,t i 1 2 p i,t i if a i =, p i 1 = p i, t t i, and t i 1 Σ, t i 1 2 A timed process is a timed transition system without time constraints, as detailed in Section 3 3 Note however that the difference is syntactical only, for indeed the transition relation for a timed process allows for an empty set L. ISSN: 1790-5117 17 ISBN: 978-960-474-193-9

p i 1,t i 1 (a i, δ i ) 3 Ø i, C i p i,t i if (a i,δ i ) A L, p i 1 (a i,δ i ) (a p p i, t i, δ i ) i 1 Ø t t i, C i, and t i 1 Σ. i The projection proj p (c) of c on p is defined as (p i 1,(a i,δ i ),p i ) I c p Π(p), where Ip c = {0 < i k : R i {1,3}}. Similarly, the projection proj t (c) of c on t if defined as (t i 1,(a i,δ i, Ø i,c i ),t i ) i I c t Π(t), where It c = {0 < i k : R i {2,3}}. Definition 3 [9]. A partial computation c is a computation whenever: If k N then c is maximal, i.e., p k p, t k t, and init p (p k ) init t (t k ) = or the time delay of p k does not satisfy the time constraint of t k ; If k = ω then proj p (c) Π I (p). C(p,t) is the set of all computations of p and t. Computation c is successful if t c Σ whenever c N, and proj t (c) Π ω (t) whenever c = ω. Definition 4 [9]. p may pass t (p may t), iff there exists at least one successful computation c C(p, t); p must pass t (p must t) iff every computation c C(p,t) is successful. p may q iff t T : p may t = q may t; and p must q iff t T : p must t = q must t. The following characterizations provide the basis for comparing the existing testing theory to our timed testing. The first characterization is similar to the characterization of other preorders [1, 7] and relates testing directly with the behaviour of processes. Proposition 1 [9] 1. p may q iff L f (p) L f (q) and L ω (p) L ω (q). 2. p must q iff for all w (A L) (A L) ω such that p w it holds that: (a) q w, (b) if w < ω then q w : q = q implies p : w p = p and init p (p ) init q (q ), and (c) if w = ω then w L ω (p) implies w L ω (q). The second characterization is given in terms of timed trace inclusions, once more similarly to the characterization of other preorders [7, 13]. A timed process p is purely nondeterministic, if for all states p of p, p p implies p (a,δ) p and {((a,δ),p ) : p (a,δ) p p } = 1. Every process p can be transformed into a purely nondeterministic process p, such that L f (p) = L f (p ), L D (p) = L D (p ), L m (p) = L m (p ), and L ω (p) = L ω (p ) by splitting a transition p p p,(a,δ),p and p p,(a,δ),p (a,δ) p p into two transitions p (a,δ) p p. Proposition 2 [9] Let p and q be timed processes such that p is purely nondeterministic. Then p must q iff all of the following hold: (a) L D (q) L D (p), (b) L f (q) \ L D (q) L f (p), (c) L m (q) \ L D (q) L m (p), and (d) L ω (q) \ L D (q) L ω (p). p 4 Timed Test Generation We now establish an algorithm that generates equivalent timed tests starting from any TPTL formula. This can also be regarded as a relation between TPTL and timed must testing. Our result builds on timed Büchi automata [2] approaches to LTL model checking [8, 11, 15]. Theorem 3 Given a TPTL formula φ there exists a test T φ such that p γ φ for any suitable γ iff p must T φ for any timed process p. T φ can be algorithmically constructed starting from φ. Proof. Let p be an arbitrary timed process. T φ is first constructed to consider only infinite computations, and will then be modified to consider maximal traces. A sub-formula of φ is defined inductively: 1. φ is a sub-formula of φ, 2. any formula t formed by terms of form θ and relational and boolean operators (henceforth called time formula ) occurring in φ is a sub-formula of φ, but no sub-formula of t is a sub-formula of φ (a time formula is indivisibly a sub-formula), 3. if ξ is a sub-formula of φ, then so is ξ, 4. if O ξ is a sub-formula then so is ξ, O {X,x.} 5. if ξ 1 O ξ 2 is a sub-formula of φ then so are ξ 1 and ξ 2, O {,,U}. Let C φ be the set of exactly all the clocks that occur in a TPTL formula φ, and let C(φ) be the closure of φ, i.e., the set of exactly all the sub-formulae of φ. Furthermore, let Θ(φ) C(φ) contain exactly all the sub-formulae of φ that are time formulae. The construction of T φ is then based on the untimed construction developed by Vardi and Wolper [15]. We first consider the local automaton L φ = (2 C(φ),C φ,n L, L,,N L,s 0 ). The set of states contain all the subsets of C(φ) that have no internal inconsistency, plus one designated initial state. The local automaton does not impose any acceptance condition. A state s has no internal inconsistency iff: ISSN: 1790-5117 18 ISBN: 978-960-474-193-9

1. ψ s iff ψ s for all ψ C(φ), 2. ξ ψ s iff ξ s, ψ s for all ξ ψ C(φ), 3. x.ψ s implies ψ s. a The transition relation is defined as s Ø, C L t iff a = t, C = {x C φ : x.ψ s ψ t}, Ø = (Θ(φ) s), ψ t x.ψ s implies x.ψ t, and 1. s = s 0 and φ a, or 2. s s 0, for all ψ C(φ), X ψ s iff ψ t, and for all ξ U φ C(φ) either ψ s, or ξ s and ξ U ψ t. L φ does not impose any acceptance conditions as mentioned, but enforces all the time constraints present in the original formula φ. Indeed, at every moment frozen in time by a construction x.ψ we reset the respective clock in the local automaton (for the set C of clocks reset by a transition out of s contains exactly all the sets of clocks x reset by an x. construction in s). Later, whenever a time formula is encountered, that formula is added to the time constraints that enable the transition. Checking the time formula to determine that the transition is enabled has the intended effect: the time formula needs to be true for the whole formula φ to be true, and the semantics of time in a timed transition system ensures that every clock measures the time from when it was reset in the transition system (i.e., frozen in the formula) to the current time. Acceptance is handled by the eventuality automaton E φ = (2 C(φ),,2 E(φ), E,, { }, ), with E(φ) = {ξ U ψ C(φ)} and s a, E t iff 1. s = and ξ U ψ t iff ψ a for all ξ U ψ a, 2. s and ξ U ψ t iff ψ a for all ξ U ψ s. The eventuality automaton is identical to the one developed elsewhere [15]. It tries to satisfy the eventualities of the formula (with no regard for time constraints). The current state keeps track of which eventualities have yet to be satisfied. The test T φ is obtained by taking the crossproduct of L φ and E φ. The cross-product is taken using the usual (untimed) construction [15], for only the transitions in L contain time constraints and/or clock resets (and these go into the composite automaton together with the actions that accompany them in L φ ). This test characterizes traces over 2 C(φ) L; in order to switch to A L we project over A the action labels of all the transitions, as done previously [15]. The construction of T φ follows carefully the construction for the untimed case. It is then immediate that T φ is correct as far as untimed words are concerned, in the sense that trace(proj p (c)) φ for exactly all the successful infinite computations c C(p,T φ ) stripped of time information. The timing information is added (via L φ ), as detailed above. In all, trace(proj p (c)) γ φ for exactly all the successful infinite computations c C(p,T φ ) (1) We now enhance T φ so that it also accepts finite maximal traces: For every state s in T φ, we check if all the formulae contained in s are satisfied by the trace ε. Checking for acceptance of the trace ε (like for any fixed trace) can be done algorithmically along the structure of the formula φ. Then, for every state s in T φ such that each TPTL formula φ labeling s is satisfied by ε, we add a transition s, where is a new state. We use to distinguish from other states also having no outgoing transitions; these states represent deadlock due to inconsistent sub-formulae of φ. The final states of T φ will then be the set containing only the state thus introduced. We have: trace(proj p (c)) γ φ for exactly all the successful maximal computations c C(p,T φ ) (2) Indeed, χ(p) γ φ (with χ(x) = trace(proj x (c))) implies s 0 = s (where s 0 is the initial state of T φ ). That is s 0 = s. Thus, c is maximal. Conversely, if c is successful and maximal, then there exits s 0 = s in T φ. According to the algorithm there exits then s 0 = s. Thus, c is maximal. That p γ φ iff p must T φ follows from Properties (1) and (2), as desired. 5 Conclusion Our previous work [9] proposed a model of timed tests. We addressed the problem of characterizing infinite behaviour of timed processes, then we extended the testing theory of De Nicola and Hennessy to timed testing. We then studied the derived timed may and must preorders and developed alternative characterizations. We now presented an algorithm for test generation out of TPTL formulae. Both processes and tests are represented by timed transition systems instead of automata (i.e., their number of states is not necessarily finite). This is consistent with the huge body of similar constructs in the untimed domain. The timed ISSN: 1790-5117 19 ISBN: 978-960-474-193-9

tests produced out of TPTL formulae (Theorem 3) are always finite automata (meaning that their set of states is always finite). This is quite nice to have for a very practical reason, as infinite-state tests must be further refined to become practical characterization tools. One significance of our results stems from the fact that while algorithms and techniques for real-time testing have been studied actively [5, 12], the domain still lacks solid techniques and theories. Our work (previous and also in this paper) attempts to present a general theoretical framework for real-time testing to facilitate the subsequent evolution of the area. To serve such a purpose our framework is as close as possible to the original framework of (untimed) testing, as shown in our characterization and also in the test generation algorithm. Our characterization is also surprisingly concise in terms of the test cases needed [9]. Beside the obvious use for test generation, our algorithm also relates the satisfaction relation of TPTL to the must operator. We note that the algebraic and logic specification techniques attempt to achieve the same thing (conformance testing) in two different ways. Each of them is more convenient for certain systems, as they both have advantages and disadvantages. Our test generation algorithm also forms the basis of bringing logic and algebraic specifications together, thus obtaining heterogeneous specifications for real-time systems that combine the advantages of the two paradigms. This has the potential of providing a uniform basis for analyzing heterogeneous real-time system specifications with a mixture of timed transition systems and timed logic formulae. We consider TPTL without congruence because the theory of timed transition systems does not offer a congruence mechanism. Such a mechanism could likely be introduced without much difficulty, but to our knowledge none of the temporal logics used in practical settings take congruence into consideration, so we preferred to leave time transition systems intact and exclude congruence from TPTL instead. We (continue to) avoid the discussion of discrete versus continuous time. All the results and definitions are oblivious to whether time is considered discrete or continuous. We therefore leave the decision of discreteness to the future uses of this work. References: [1] S. Abramsky. Observation equivalence as a testing equivalence. Theoretical Computer Science, 53:225 241, 1987. [2] R. Alur and D. L. Dill. A theory of timed automata. Theoretical Computer Science, 126:183 235, 1994. [3] R. Alur and T. A. Henzinger. Real-time logics: Complexity and expressiveness. Information and Computation, 104:35 77, 1993. [4] P. Bellini, R. Mattolini, and P. Nesi. Temporal logics for real-time system specification. ACM Computing Surveys, 32:12 42, 2000. [5] L. Brandan Briones and E. Brinksma. A test generation framework for quiescent real-time systems. In Formal Approaches to Testing of Software, pages 71 85, 2004. [6] M. Broy, B. Jonsson, J.-P. Katoen, M. Leucker, and A. Pretschner, editors. Model-Based Testing of Reactive Systems: Advanced Lectures, volume 3472 of Lecture Notes in Computer Science. Springer, 2005. [7] S. D. Bruda. Preorder relations. In Broy et al. [6]. [8] E. M. Clarke, O. Grumberg, and D. A. Peled. Model Checking. MIT Press, 1999. [9] C. Dai and S. D. Bruda. A testing framework for real-time specifications. In Proceedings of the 9th IASTED International Conference on Software Engineering and Applications (SEA 2008), Orlando, Florida, November 2008. [10] R. De Nicola and M. C. B. Hennessy. Testing equivalences for processes. Theoretical Computer Science, 34:83 133, 1984. [11] R. Gerth, D. Peled, M. Y. Vardi, and P. Wolper. Simple on-the-fly automatic verification of linear temporal logic. In Proceedings of the IFIP symposium on Protocol Specification, Testing and Verification (PSTV 95), pages 3 18, Warsaw, Poland, 1995. [12] J. Springintveld, Frits Vaandrager, and Pedro R. D Argenio. Testing timed automata. Theoretical Computer Science, 254:225 257, 2001. [13] J. Tretmans. Conformance testing with labelled transition systems: Implementation relations and test generation. Computer Networks and ISDN Systems, 29:49 79, 1996. [14] J. Tretmans. A formal approach to conformance testing. In Protocol Test System, VI, pages 257 276. Elsevier, 1994. [15] M. Vardi and P. Wolper. An automata-theoretic approach to automatic program verification. In Proceedings of the First Annual Symposium on Logic in Computer Science (LICS 86), pages 332 344, 1986. ISSN: 1790-5117 20 ISBN: 978-960-474-193-9