Parameter Synthesis for Timed Kripke Structures

Similar documents
Parameter Synthesis for Timed Kripke Structures

Model checking the basic modalities of CTL with Description Logic

Models for Efficient Timed Verification

Liveness in L/U-Parametric Timed Automata

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

Bounded Model Checking for Parametric Timed Automata

Model Checking. Temporal Logic. Fifth International Symposium in Programming, volume. of concurrent systems in CESAR. In Proceedings of the

IMITATOR: A Tool for Synthesizing Constraints on Timing Bounds of Timed Automata

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

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

Parametric model-checking of time Petri nets with stopwatches using the state-class graph

Automata-based Verification - III

Automata-based Verification - III

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

MODEL-CHECKING IN DENSE REAL-TIME SHANT HARUTUNIAN

Decision Problems for Parametric Timed Automata

Computation Tree Logic (CTL) & Basic Model Checking Algorithms

Alternating-Time Temporal Logic

Subsumption of concepts in FL 0 for (cyclic) terminologies with respect to descriptive semantics is PSPACE-complete.

The State Explosion Problem

540 IEEE TRANSACTIONS ON AUTOMATIC CONTROL, VOL. 43, NO. 4, APRIL Algorithmic Analysis of Nonlinear Hybrid Systems

Linear Temporal Logic and Büchi Automata

Automata, Logic and Games: Theory and Application

First-order resolution for CTL

Chapter 6: Computation Tree Logic

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

Reasoning about Strategies: From module checking to strategy logic

Alan Bundy. Automated Reasoning LTL Model Checking

Wojciech Penczek. Polish Academy of Sciences, Warsaw, Poland. and. Institute of Informatics, Siedlce, Poland.

Chapter 4: Computation tree logic

Petri Nets Tutorial, Parametric Verification (session 3)

Approximately Bisimilar Finite Abstractions of Stable Linear Systems

SFM-11:CONNECT Summer School, Bertinoro, June 2011

A generalization of modal definability

Revising Specifications with CTL Properties using Bounded Model Checking

Lecture Notes on Emptiness Checking, LTL Büchi Automata

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

Model Checking in the Propositional µ-calculus

From Liveness to Promptness

Reducing CTL-live Model Checking to Semantic Entailment in First-Order Logic (Version 1)

Laboratoire Spécification & Vérification. Language Preservation Problems in Parametric Timed Automata. Étienne André and Nicolas Markey

Binary Decision Diagrams

Recent results on Timed Systems

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

Syntax and Semantics of Propositional Linear Temporal Logic

Constraint Solving for Program Verification: Theory and Practice by Example

Parametric Verification and Test Coverage for Hybrid Automata Using the Inverse Method

Probabilistic Model Checking Michaelmas Term Dr. Dave Parker. Department of Computer Science University of Oxford

Temporal Logic Model Checking

T Reactive Systems: Temporal Logic LTL

Nested Epistemic Logic Programs

An optimal tableau-based decision algorithm for Propositional Neighborhood Logic

The Minimal Cost Reachability Problem in Priced Timed Pushdown Systems

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

Language Emptiness of Continuous-Time Parametric Timed Automata

Limiting Behavior of Markov Chains with Eager Attractors

COMPUTER SCIENCE TEMPORAL LOGICS NEED THEIR CLOCKS

State Explosion in Almost-Sure Probabilistic Reachability

Fixpoint Extensions of Temporal Description Logics

Bounded Synthesis. Sven Schewe and Bernd Finkbeiner. Universität des Saarlandes, Saarbrücken, Germany

Probabilistic Model Checking Michaelmas Term Dr. Dave Parker. Department of Computer Science University of Oxford

Time and Timed Petri Nets

Logics of Rational Agency Lecture 3

Notes. Corneliu Popeea. May 3, 2013

Semi-Automatic Distributed Synthesis

Bounded Model Checking for Parametric Timed Automata

Monodic fragments of first-order temporal logics

Compact Regions for Place/Transition Nets

Timo Latvala. February 4, 2004

An Introduction to Hybrid Systems Modeling

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

Matching Logic: Syntax and Semantics

Model Checking: An Introduction

King s Research Portal

Goal specification using temporal logic in presence of non-deterministic actions

Reachability-Time Games on Timed Automata (Extended Abstract)

A Generalized Decision Logic in Interval-set-valued Information Tables

Automata-Theoretic Model Checking of Reactive Systems

Existential Second-Order Logic and Modal Logic with Quantified Accessibility Relations

Alternating Time Temporal Logics*

The Impact of Craig s Interpolation Theorem. in Computer Science

Combining Propositional Dynamic Logic with Formal Concept Analysis

Decision Procedures for CTL

Bounded Model Checking for the Existential Part of Real-Time CTL and Knowledge

Halting and Equivalence of Program Schemes in Models of Arbitrary Theories

Model Checking. Boris Feigin March 9, University College London

Completeness Results for Memory Logics

Formal Epistemology: Lecture Notes. Horacio Arló-Costa Carnegie Mellon University

Rough Sets for Uncertainty Reasoning

Introduction to Kleene Algebra Lecture 14 CS786 Spring 2004 March 15, 2004

Behavioral Cartography of Timed Automata

Computation Tree Logic

Timed Automata VINO 2011

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

Model Checking: the Interval Way

Partial Collapses of the Σ 1 Complexity Hierarchy in Models for Fragments of Bounded Arithmetic

Timo Latvala. March 7, 2004

Reversal-Bounded Counter Machines Revisited

3. Only sequences that were formed by using finitely many applications of rules 1 and 2, are propositional formulas.

Transcription:

Parameter Synthesis for Timed Kripke Structures Extended Abstract Micha l Knapik 1 and Wojciech Penczek 1,2 1 Institute of Computer Science, PAS, Warsaw, Poland 2 University of Natural Sciences and Humanities, II, Siedlce, Poland {knapik,penczek}@ipipan.waw.pl Abstract. We show how to synthesise parameter values under which a given property, expressed in a certain extension of CTL called RTCTL P, holds in a parametric timed Kripke structure. Similarly as in fixed-point symbolic model checking approach, we introduce special operators which stabilise on the solution. The process of stabilisation is essentially a translation from RTCTL P parameter synthesis problem to a discrete optimization task. We argue that this leads to new opportunities in model checking, including the use of integer programming and related tools. 1 Introduction Complex systems, both hardware and software, present in critical areas need to be verified. The best moment for the verification is the design phase, perhaps even before any prototype is developed. This helps to reduce errors and costs; the found flaws can also provide valuable pointers to a designer. Model checking is one of the established methods for verification of complex, timed, and reactive systems. In this approach, a model for a verified system is built (e.g. a Kripke structure or a Petri net), and a property to be checked is specified in a version of a modal logic (e.g. CTL or TCTL). The pair consisting of a model and a formula is the input for a model checking tool. The output is simply the property holds or property does not hold answer. However, such an approach has its drawbacks. In the beginning phases of a system design some of the features required in a model might be unknown (e.g. timing constraints), which forces the designer to substitute them with some guessed or standard values. Even if it is possible to present a full model of the system, there is no guarantee that this specification will not be subject to some changes. Often the minimal alteration of the original model may lead to violation of a checked property, therefore the process of verification has to be repeated. A system designer using model checking methods would substantially benefit from a tool that is able to accept an underspecified model with some values abstracted as parameters. In this case the expected output consists of a set of parameter valuations under which a given property holds. This approach is called parametric model checking or parameter synthesis. Parametric model checking

260 M. Knapik, W. Penczek eliminates the needs for guessing and for performing batches of tests for ranges of values. In this paper we show how to perform parameter synthesis for timed Kripke structures, i.e., Kripke structures where transition is augmented with an additional label specifying how long it takes to traverse it. The input logic is a certain extension of Computation Tree Logic, which allows for expressing properties over the restricted fragments of paths. 1.1 Related Work and Paper Outline The logic considered in this paper and its models are based on the Real Time Computation Tree Logic (RTCTL) and timed Kripke structures introduced in [1]. As we show, the problem of parameter synthesis is decidable for RTCTL P. It is however not decidable for even as simple properties as reachability for many other models, e.g. parametric timed automata (PTA) [2, 3] and bounded parametric time Petri nets [4]. Difference bound matrix - based semi-algorithms for reachability were extended to the PTA case in [5] and implemented in UPPAAL- PMC. In [6] we showed how to synthesise by means of bounded model checking a part of the set of valuations for PTA reachability. The problem of synthesis of bounded integer valuations for PTA is analysed in [7] and shown to be in PSPACE. In [8] the authors show how to synthesise the constraints on valuations under which a PTA is time-abstract equivalent to some initial one; the work is implemented in IMITATOR prototype tool. Parametric analysis is also possible with HyTech [9] by means of hybrid automata. In the next section we introduce the RTCTL P logic and its models. In Section 3 we show how to solve the synthesis problem via a translation to sets of linear inequalities over natural numbers. We conclude the work with a comment on the possible benefits and downsides of our approach and future plans. 2 Parameterized Temporal Logics Let N denote the set of all natural numbers (including 0), and let P (D) denote the power set of a set D. For any sequence x = (x 1,..., x n ) and 0 i n, let x i = x i be the projection of x on the i th variable. 2.1 The Syntax of RTCTL P The Real Time CTL [1] allows to express branching-time temporal properties involving the integer time-step depth of considered paths. Definition 1 (Syntax of RTCTL P ). Let PV be a set of propositional variables containing the symbol true. The formulae of RTCTL P are defined as follows: 1. every member of PV is a formula, 2. if α and β are formulae, then so are α, α β,

Parameter Synthesis for Timed Kripke Structures 261 3. if α and β are formulae, then so are EX k α, EG k α, EαU k β for k N. As to give an example of the meaning of an RTCTL P formula, EG 5 p states that there exists a path such that p holds in each state reached from the beginning in time not greater than 5. 2.2 The Semantics of RTCTL P We evaluate the truth of the formulae in the parametric timed Kripke structures. These are standard Kripke structures with the transitions decorated by additional labels interpreted as time variables. Definition 2. A parametric timed Kripke structure (a model) is a 5-tuple M = (S, s 0, T,, L) where: S is a finite set of states, s 0 S is the initial state, T is a set of time step parameters (variables), S T S is a transition relation such that for every s S there exists s S and t T with (s, t, s ) (i.e., the relation is total), L : S 2 PV is a valuation function satisfying true L(s) for each s S. Let s, s be two states of a model, and let t be a time step parameter. By s t s we denote that (s, t, s ). The intuitive meaning of s t s is that it takes t time units to reach s from s. We define in(s), out(s), link(s, s ) as the sets of the labels of the transitions entering s, leaving s, and connecting s with s, respectively. More formally, in(s) = {t T s t s for s S}, out(s) = {t T s t s for s S}, and link(s, s ) = {t T s t s }. A function ω : T N is called a parameter valuation. The set of all the parameter valuations is denoted by Ω. Consider an infinite sequence π = t (s 0, t 0, s 1, t 1,...) such that s i S and s i i si+1 for i N. By π i = s i we denote the i th state of π. We define the time distance function between the positions π 0 and π j on a sequence π as δπ j = j 1 i=0 t i, and we assume that δπ 0 = 0. If ω is a parameter valuation, then let δπ(ω) j = j 1 i=0 ω(t i). A sequence π is called an ω path if lim j δπ(ω) j =, or simply a path if ω is evident from the context. Definition 3 (Semantics of RTCTL P ). Let M = (S, s 0, T,, L) be a model and s S. Let α, β RTCTL P, let ω Ω be a parameter valuation, and k N. M, s = ω α denotes that α is true at the state s of M under the valuation ω. (In what follows we omit M where it is implicitly understood.) The relation = ω is defined inductively as follows: 1. s = ω p iff p L(s), 2. s = ω α iff s = ω α, 3. s = ω α β iff s = ω α and s = ω β, 4. s = ω EX k α iff there exists a path π s.t. π 0 = s, δ 1 π(ω) k, and π 1 = ω α,

262 M. Knapik, W. Penczek 5. s = ω EG k α iff there exists a path π such that π 0 = s, and for all i 0 if δ i π(ω) k, then π i = ω α, 6. s = ω EαU k β iff there exists a path π such that π 0 = s and for some i N it holds that δ i π(ω) k and π i = ω β, and π j = ω α for all 0 j < i. The RTCTL P logic slightly differs from RTCTL presented in [1]. Firstly, we have omitted the non-superscripted modalities. It is straightforward to extend the logic with these, and to see that the standard fixpoint algorithms for EG and EU verification can be applied with no changes. Secondly, we define the semantics on ω paths, explicitly requiring the total traversal time to grow to the infinity with the depth of the path. This is consistent with the usual requirement of progressiveness of timed systems. 3 Translation to Linear Algebra In what follows we fix a model M = (S, s 0, T,, L). We need several simple notions concerning the sets of statements (called linear statements) of the form c 1 t 1 +... + c n t n, where t i T are time step parameters, c i N, and t i t j for all 1 i, j n, i j. The set of all linear statements over T is denoted by LS T ; we omit the T subscript if it is implicitly understood. In this paper we consider only finite subsets of LS T. Let η = c 1 t 1 +... + c n t n, and let ω Ω. We define the application of ω to η as η[ω] = c 1 ω(t 1 ) +... + c n ω(t n ). We also define the k-bounding operation for k N as follows: [η] k := min(c 1, k + 1)t 1 +... + min(c n, k + 1)t n. To show an example, consider the statement η = 6t 1 + 9t 2 and 5-bounding [η] 5 = min(6, 6)t 1 + min(9, 6)t 2 = 6t 1 + 6t 2. The operation of k-bounding has a property such that if {, <, >, }, then for any k N the inequalities η k and [η] k k have the same sets of solutions. This can be easily verified on a case-by-case basis, by noticing that if a given coefficient c i of η exceeds k +1, then any nonzero value of t i makes η k true for {>, }, while {, <} means that only zero can be substituted for t i. Previous observation is crucial to the theory, as it means that every set of linear statements over the finite parameter set T, obtained by means of k- bounding with respect to some fixed natural k, is finite. We extend the [ ] k operation to subsets A LS as follows: [A] k = {[η] k η A}. Let A, B LS, then we define A + B = {η + µ η A and µ B}. Now let us consider A LS, k N, and {, <, >, }. We define [A] k as follows: [A] k = {ω η[ω] k}. η A

Parameter Synthesis for Timed Kripke Structures 263 As to give an example, let A = {t 1 + 2t 2, t 3 }, then [A] <4 consists of all the valuations ω such that ω(t 1 ) + 2ω(t 2 ) < 4, or ω(t 3 ) < 4. We call the set S P (Ω) the parametric state space, and its elements are called the parametric states. As to give an example, consider A LS such that A = {2t 1 + 3t 2, 2t 1 + 3t 4 }. The pair of form (s 0, [A] 10 ) is a parametric state. The last preliminary notion needed in the rest of the paper is the auxiliary operator Flatten. Let B S P (Ω), then we define: (s, A) F latten(b) iff A = {C (s, C) B}, A. To make this definition clearer, consider an example where B = {(s 0, C 1 ), (s 0, C 2 ), (s 1, C 3 ), (s 1, C 4 ), (s 2, C 5 )}. In this case F latten(b) = {(s 0, C 1 C 2 ), (s 1, C 3 C 4 ), (s 2, C 5 )}. If F latten(b) = B, then the set B is called flat. If B is flat, then by B(s) we denote the parameter selector, that is B(s) = C iff (s, C) B. The parameter selector is a well defined partial function on S. Algorithm 1 Synthesize(M, φ) 1: if φ = p then 2: return A p 3: end if 4: if φ = α then 5: A α = Synthesize(M, α) 6: return ıa α 7: end if 8: if φ = α β then 9: A α = Synthesize(M, α) 10: A β = Synthesize(M, β) 11: return A α A β 12: end if 13: if φ = EX k α then 14: A α = Synthesize(M, α) 15: return EX k A α 16: end if 17: if φ = EG k α then 18: A α = Synthesize(M, α) 19: return EG k A α 20: end if 21: if φ = EαU k β then 22: A α = Synthesize(M, α) 23: A β = Synthesize(M, β) 24: return EA αu k A β 25: end if

264 M. Knapik, W. Penczek 3.1 The translation Our aim is to find all the valuations under which a given formula φ RTCTL P holds in a model M. In our solution we augment each state s with the set A φ (s) of parameter valuations such that s = ω φ iff ω A φ (s). This is done recursively in Algorithm 1, with respect to the formula structure. For each s the set A φ (s) can be represented as a finite union of solution sets of a finite number of linear (integer) inequalities. This means that A φ (s) has a finite representation for each s, and for this reason we call the method a translation from RTCTL P parametric model checking to linear algebraic problem. Let p PV, then A p = {(s, Ω) p L(s)} is the set of such pairs (s, Ω) that p L(s). Intuitively, A p contains the pairs consisting of a state in which p holds, together with the full set Ω; this expresses the lack of restrictions on the parameter values. Obviously, A p is flat. In the algorithm we use several new operators that are counterparts of propositional connectives and RTCTL P modalities: 1. operator a counterpart of, 2. operator ı related to, 3. operator EX k a counterpart of EX k, 4. operator EG k a counterpart of EG k. 5. operator EU k related to EU k. The detailed description of these notions is a subject of the rest of this section, starting with the operator. Definition 4. Let A, B be two flat subsets of S P (Ω). Define: A B = {(s, C C ) (s, C) A, and (s, C ) B}. The next corollary follows immediately from the above definition. Corollary 1. Let φ, ψ be RTCTL P formulae, and A φ, A ψ be such flat subsets of the parametric state space that s = ω φ iff ω A φ (s) and s = ω ψ iff ω A ψ (s) for all s S. Then s = ω φ ψ iff ω (A φ A ψ )(s). It should be noted that in our applications, the operation is purely symbolic, as we deal with the sets of inequalities only. Example 1. Consider the following sets: A φ = {(s 0, Ω), (s 1, {ω ω(t 1 ) + 3ω(t 2 ) < 5})}, A ψ = {(s 1, {ω 2ω(t 1 ) + 3ω(t 3 ) < 4})}, We have A φ A ψ = {(s 1, {ω ω(t 1 ) + 3ω(t 2 ) < 5 2ω(t 1 ) + 3ω(t 3 ) < 4})}. In the translation of EG k and EU k we make use of the bounded backstep operation. This operation is defined on sets of triples (s, A, C), where s is a state, A is a set of linear statements used to track possible constraints on parameters, and C is a set of parameter valuations used to track the allowed values of time step parameters.

Parameter Synthesis for Timed Kripke Structures 265 Definition 5. Let D S P (LS) P (Ω), k N, and Init be a flat subset of S P (Ω) such that for each e D there is f Init satisfying e 1 = f 1. Now, (s, A, C) BackStep k (D, Init) iff: 1. there exists e D such that e 1 = s, 2. for some A LS, C Ω, and s S there exists (s, A, C ) D, such that: (a) the set link(s, s ) of time step parameters (treated as linear statements) is nonempty (i.e. there is a transition from s to s ), (b) A = [link(s, s ) + A ] k, (c) C = C Init(s). While the bounded backstep operation may seem involved, it originates from a natural idea. Let φ be some property and let Init be such a set that s = ω φ iff ω Init(s) for each state s. Let D S P (LS) P (Ω) and (s, A, C ) D. A = {[δ n+1 π ] k π 0 = s and π 1 = s } A = {[δ n π] k π 0 = s } s s t 1 s = ω φ iff ω Init(s) s = ω φ iff ω Init(s ) Assume that C = Init(s ), let n N, and A be the set of k bounded time distance functions for all paths leaving s and measuring the distance up to the n th position. It is easy to see, that BackStep k (D, Init) contains a tuple (s, A, Init(s) Init(s )), where A = [link(s, s ) + A ] k. The set A consists of k bounded time distance functions for all paths leaving s, entering s in the next step, and measuring the distance up to the (n + 1) th position. The set Init(s) Init(s ) contains such parameter valuations ω that s = ω φ and s = ω φ. Example 2. Consider the sets: C 1 = {ω ω(t 1 ) > 2}, C 2 = {ω ω(t 2 ) + ω(t 3 ) 4}, D = {(s 1, {6t 1 + 8t 2 }, C 1 ), (s 2, {4t 2 + 7t 3, t 4 }, C 2 )}, and assume that the only transitions involving s 1 and s 2 are (s 1, t 1, s 2 ), (s 1, t 2, s 2 ), and let Init = {(s 1, C 1 ), (s 2, C 2 )}. Let us compute BackStep 5 (D, Init). We can see that link(s 1, s 2 ) = {t 1, t 2 }, link(s 1, s 1 ) = link(s 2, s 2 ) = link(s 2, s 1 ) =. Let A = [{t 1, t 2 } + {4t 2 + 7t 3, t 4 }] 5 = {t 1 + 4t 2 + 6t 3, 5t 2 + 6t 3, t 1 + t 4, t 2 + t 4 }, and C = C 2 Init(s 1 ) = C 2 C 1 = {ω ω(t 1 ) > 2 and ω(t 2 ) + ω(t 3 ) 4}. In this case BackStep 5 (D, Init) = {(s 1, A, C)}. We say that a sequence of sets H 0, H 1,... stabilizes if there exists i 0 such that H j = H i for all j > i, and denote this as lim j H j = H i. Let D be a finite subset of S P (LS) P (Ω). Notice that if we fix some k N and Init, then the sequence defined by H 0 = D, and H i+1 = H i BackStep k (H i, Init) stabilizes. This is due to the fact that there is a finite

266 M. Knapik, W. Penczek number of time parameters in a model (therefore a finite number of k-bounded expressions built with respect to [ ] k ), and a finite number of parameter valuation sets in D. Let (s, A, C) S P (LS) P (Ω), {, <, >, }, and k N. Denote [(s, A, C)] k =(s, [A] k C). Intuitively, this encodes a state together with those parameter valuations which satisfy constraints present in [A] k (the path length constraints), and in C (the initial constraints). We extend this notion to the space on which BackStep operates, by putting [D] k = {[(s, A, C)] k (s, A, C) D} for any D S P (LS) P (Ω). Let us move to the first application of BackStep k operation, i.e., the translation of EG k. The following example provides some intuitions behind the parametric counterpart of this modality. Example 3. Consider model shown in Fig. 1, where L(s 0 ) = L(s 1 ) = {p}, and formula EG 2 p. For the simplicity, the loops on states s 2, s 3 are unlabeled. p p t 1 s 2 s 0 s 1 t 1 t 2 s 3 Fig. 1: A simple model It is easy to see that s 1 = ω EG 2 p iff ω(t 1 ) > 2 or ω(t 2 ) > 2, i.e., using the newly introduced notation, ω [out(s 1 )] >2. It also holds that s 0 = ω EG 2 p if ω [out(s 0 )] >2, but this is not an exhaustive description of all such parameter valuations. Indeed, s 0 = ω EG 2 p also if 2ω(t 1 ) > 2 or ω(t 1 ) + ω(t 2 ) > 2, i.e., ω [t 1 + out(s 1 )] >2. By a straightforward case-by-case analysis we can check that s 0 = ω EG 2 p iff ω [out(s 0 )] >2 [t 1 + out(s 1 )] >2. Definition 6. Let A be a flat subset of S P (Ω) and k N. Define: G 0 (A) = {(s, out(s), A(s)) there exists e A such that e 1 = s}, G j+1 (A) = BackStep k (G j (A), A). We define EG k A = F latten( j=0 [G j(a)] >k ). The F latten operator is used only in order to obtain the result in a less complex form, where for each state s there exists at most one e EG k A such that e 1 = s. Theorem 1. Let φ be a formula of RTCTL P, and A φ be such a flat subset of S P (Ω) that s = ω φ iff ω A φ (s). For any state s S, k N, and a parameter valuation ω we have s = ω EG k φ iff ω (EG k A φ )(s). Proof. If s = ω EG k φ, then there exists a path π = (s 0, t 0, s 1, t 1,...), such that for some n N it holds that π 0 = s, δπ n+1 (ω) > k and δπ(ω) i k for all

Parameter Synthesis for Timed Kripke Structures 267 0 i n, and π i = ω φ for all 0 i n. π = δ n+1 π (ω)>k {}}{ t s 0 t 0 s1 1 t s2 2 t n 1... }{{} δπ n(ω) k s n t n t n+1 sn+1... For each 0 i n we have that π i = ω φ, therefore A φ (s i ) is well defined for each 0 i n, and ω n i=0 A φ(s i ). It is easy to see that (s n, out(s n ), A φ (s n )) t n 1 G 0 (A φ ), and t n out(s n ). Notice that s n 1 sn, thus (s n 1, [link(s n 1, s n )+ out(s n )] k, A φ (s n 1 ) A φ (s n )) BackStep k (G 0 (A φ ), A φ ) = G 1 (A φ ). Again, we have that [t n 1 + t n ] k [link(s n 1, s n ) + out(s n )] k. After n + 1 such inductive steps we obtain that there is a tuple (s 0, A, n i=0 A φ(s i )) G n (A φ ) such that [t 0 + t 1 +... + t n ] k A, and ω n i=0 A φ(s i ). Recall that δπ n = t 0 + t 1 +... + t n, and as δπ(ω) n > k, we have that [t 0 + t 1 +... + t n ] k (ω) > k, therefore ω [A] >k. This means that ω [A] >k n i=0 A φ(s i ), which in view of the fact that [(s, A, n i=0 A φ(s i ))] >k [G n (A φ )] >k concludes this part of the proof. Now let ω (EG k A φ )(s). This means that for some m N, and e m = (s m, B m ), where s m = s we have that e m [G m (A φ )] >k, and ω B m. This in turn means that there is a sequence (s 0, A 0, C 0 ), (s 1, A 1, C 1 ),..., (s m, A m, C m ) such that: 1. A i = [link(s i, s i 1 ) + A i 1 ] k for all 0 < i m, and A 0 = out(s 0 ), 2. C i = i j=0 A φ(s j ) and ω C i for all 0 i m, 3. (s i, A i, C i ) G i (A φ ) for all 0 i m, 4. [A n ] >k C m = B m. From the above points it follows that there exists such a finite sequence π = (s m, t m, s m 1, t m 1..., s 0, t 0 ) that [δπ m ] k = [t m + t m 1 +... + t 0 ] k A m, and [δπ m ] k(ω) > k. Notice that the latter is equivalent to δπ m (ω) > k, and that the second point implies that s i = ω φ for all 0 i m. The sequence π is a prefix of some infinite path π (due to the totality of the transition relation), such that π i = ω φ for all 0 i m, and δπ m (ω) > k. This means that s = ω EG k φ, which concludes the proof. Definition 7. Let A, B be two flat subsets of S P (Ω) and k N. Denote: H 0 (A, B) = {(s, link(s, s ), A(s) B(s )) there exists e B, e 1 = s, and link(s, s ) }, H i+1 (A, B) = BackStep k (H i (A, B), A). We define EAU k B = F latten(( i=0 [H i(a, B)] k ) B). Again, the F latten operator is used only for the convenience, and the sequence ( j i=0 H i) j 0 is guaranteed to stabilize.

268 M. Knapik, W. Penczek Theorem 2. Let φ, ψ be RTCTL P formulae, and A φ, A ψ be such flat subsets of parametric state space that s = ω φ iff ω A φ (s) and s = ω ψ iff ω A ψ (s), for each state s. For any state s, any k N, and parameter valuation ω it holds that s = ω EφU k ψ iff ω (EA φ U k A ψ )(s). Proof. Assume that s = ω EφU k ψ. This means that there exists a sequence π = (s 0, t 0, s 1, t 1,..., s n, t n,...) such that π 0 = s, for some n 0 we have δπ(ω) n k, π n = ω ψ, and π i = ω φ for all 0 i < n. If n = 0, then s = ω ψ, therefore ω A ψ (s); now it suffices to notice that A ψ is a (flattened) subset of EA φ U k A ψ. We can therefore assume that n > 0, which means that s n 1 = ω φ, and s n = ω ψ, thus ω A φ (s n 1 ) A ψ (s n ). As t n 1 link(s n 1, s n ), we obtain that ( s n 1, link(s n 1, s n ), (A φ (s n 1 ) A ψ (s n )) ) H 0 (A φ, A ψ ). Similarly as in a first part of the proof of Theorem 1 we can now create a sequence (s 0, A 0, C 0 ), (s 1, A 1, C 1 ),..., (s n 1, A n 1, C n 1 ) such that for all 0 i n 1: 1. A i = [link(s i, s i+1 ) + link(s i+1, s i+2 ) +... + link(s n 1, s n )] k, 2. C i = n 1 j=i A φ(s j ) A ψ (s n ) and ω C i, 3. (s i, A i, C i ) H n i 1 (A φ, A ψ ). Now let us notice that [t 0 + t 1 +... + t n 1 ] k A 0, and as δπ(ω) n k, also [t 0 + t 1 +... + t n 1 ] k (ω) k. This means that ω [A 0 ] k C 0, therefore there is e [H 0 (A φ, A ψ )] k such that e 1 = s 0 = s, and ω e 2, which concludes the case. Now let us assume that ω (EA φ U k A ψ )(s). If ω A ψ (s), then obviously s = ω ψ and s = ω EφU k ψ, therefore let us assume that for some m N we have that e = (s m, B m ) [H m (A φ ), A ψ ] k where s m = s, and ω B n. Again, this means that there exist a state s such that ω A ψ (s ), and a sequence (s 0, A 0, C 0 ), (s 1, A 1, C 1 ),..., (s m, A m, C m ) such that: 1. link(s i+1, s i ) for all 0 i < m, and link(s 0, s ), 2. A i = [link(s i, s i 1 ) + link(s i 1, s i 2 ) +... + link(s 0, s )] k for all 0 i m, 3. C i = i j=0 A φ(s j ) A ψ (s ) and ω C i for all 0 i m, 4. (s i, A i, C i ) H i (A φ, A ψ ) for all 0 i m, 5. [A m ] k C m = B m. From the above points we can infer the existence of such a finite sequence π = (s m, t m, s m 1, t m 1,..., s 0, t 0, s, t ) (the t is an arbitrary time step parameter from out(s )) that: 1. t i link(s i, s i 1 ) for all 0 < i m, and t link(s 0, s ), 2. π (i) = ω φ for all 0 i m, and π (m + 1) = ω ψ, 3. δ m π (ω) k, as [δm π ] k(ω) = [t 0 + t 1 +... + t m ] k (ω) k. By the virtue of the totality of the transition relation this means that s = ω EφU k ψ, which concludes the proof. Definition 8. Let A be a flat subset of S P (Ω), and k N. Denote: I k (A) = {(s, link(s, s ), A(s )) exists e A s. t. e 1 = s and link(s, s ) }. We define EX k A = F latten([i k (A)] k ).

Parameter Synthesis for Timed Kripke Structures 269 Intuitively, in I k (A) for each state s we gather its connections with other states s and constraints A(s ) imposed in s. It suffices to ensure that these constraints are consistent with conditions of transition from s to s in under k time units. Corollary 2. Let φ be a formula of RTCTL P, let k N, and let A φ be such a flat subset of S P (Ω) that s = ω φ iff ω A φ (s). For any state s and parameter valuation ω we have s = ω EX k φ iff ω (EX k A φ )(s). We have proved that the proposed translation is valid for all nonnegated expression. To complete the theory we show how to deal with negations. Definition 9. Let A be a flat subset of S P (Ω). We define: ıa = F latten({(s, Ω \ A(s)) exists e A such that e 1 = s} {(s, Ω) there is no e A such that e 1 = s}). Let us present some intuitions concerning the translation of the negation. Let A φ characterize the states augmented with parameter valuations under which the φ property holds. The ıa φ set is built by: 1. augmenting any state s represented in A φ, by those valuations under which φ does not hold (the complement of A φ (s)), 2. including all the states which are not represented in A φ together with the full set of parameter valuations. This gives rise to the following corollary. Corollary 3. Let A φ be such a flat subset of S P (Ω) that s = ω φ iff ω A φ (s). For any state s and ω Ω it holds that s = ω φ iff ω (ıa φ )(s). 4 Conclusions The method presented in this paper allows for the synthesis of parameter values in timed Kripke structures for properties expressed in RTCTL P logic. To be more precise, for a given property φ the result of synthesis is the set A φ of constraints on time step parameters. These constraints are expressed as linear inequalities over natural numbers, therefore our method is in fact a translation from the problem of RTCTL P parameter synthesis to a problem stated in the language of linear algebra. If properly implemented, this enables to take advantage of the vast work and available tools from the discrete optimization field. It is rather straightforward to show that for a given RTCTL P formula φ it suffices to consider only the parameter step values which do not exceed the greatest superscript in φ plus 1. While Ω can be limited to a finite set, an enumerative verification of all possible valuations from this set would soon prove to be intractable. A symbolic model checking approach gives a chance of alleviating these limitations via an efficient representation of statespace and operations on its subsets. We plan to research the possibilities of implementing the presented work using various versions of decision diagrams and SMT-theories.

270 M. Knapik, W. Penczek Acknowledgements Micha l Knapik is supported by the Foundation for Polish Science under International PhD Projects in Intelligent Computing. Project financed from the European Union within the Innovative Economy Operational Programme 2007-2013 and European Regional Development Fund. References 1. Emerson, E.A., Trefler, R.: Parametric quantitative temporal reasoning. In: Proc. of the 14th Symp. on Logic in Computer Science (LICS 99), IEEE Computer Society (July 1999) 336 343 2. Alur, R., Henzinger, T., Vardi, M.: Parametric real-time reasoning. In: Proc. of the 25th Ann. Symp. on Theory of Computing (STOC 93), ACM (1993) 592 601 3. Doyen, L.: Robust parametric reachability for timed automata. Inf. Process. Lett. 102 (May 2007) 208 213 4. Tranouez, L.M., Lime, D., Roux, O.H.: Parametric model checking of time Petri nets with stopwatches using the state-class graph. In: Proc. of the 6th Int. Workshop on Formal Analysis and Modeling of Timed Systems (FORMATS 08). Volume 5215 of LNCS., Springer-Verlag (2008) 280 294 5. Hune, T., Romijn, J., Stoelinga, M., Vaandrager, F.: Linear parametric model checking of timed automata. In: Proc. of the 7th Int. Conf. on Tools and Algorithms for the Construction and Analysis of Systems (TACAS 01). Volume 2031 of LNCS., Springer-Verlag (2001) 189 203 6. Knapik, M., Penczek, W.: Bounded model checking for parametric timed automata. T. Petri Nets and Other Models of Concurrency 5 (2012) 141 159 7. Jovanović, A., Lime, D., Roux, O.H.: Integer parameter synthesis for timed automata. In: Proceedings of the 19th international conference on Tools and Algorithms for the Construction and Analysis of Systems. TACAS 13, Berlin, Heidelberg, Springer-Verlag (2013) 401 415 8. André, E., Chatain, T., Encrenaz, E., Fribourg, L.: An inverse method for parametric timed automata. International Journal of Foundations of Computer Science 20(5) (Oct 2009) 819 836 9. Henzinger, T., Ho, P., Wong-Toi, H.: HyTech: A model checker for hybrid systems. In: Proc. of the 9th Int. Conf. on Computer Aided Verification (CAV 97). Volume 1254 of LNCS., Springer-Verlag (1997) 460 463