Time Analysis of the State Space of Real-time Preemptive Systems. Abdelkrim Abdelli LSI laboratory - Computer Science department - USTHB university of Algiers. Abdelli@lsi-usthb.dz Abstract We present in this paper an algorithm making it pos- sible an efficient time analysis of the state space of pre- emptive real time systems modeled using Time Petri Nets with inhibitor arcs. For this effect, we discuss how to determine fromthe reachability graph linear and quantitative properties of the remote model. Then, we propose an algorithm to compute an approximation of the minimal and the maximal time distances of any firing sequence. Contrarily to other techniques, our al- gorithm enjoys a linear complexity time cost and can be performed on the fly when building the reachability graph without requiring to extend the original model with observers. 1 Introduction Preemptive systems are systems whose tasks have strict temporal constraints and which can be stopped for a while and resumed afterwards (stopwatch mech- anism). To prove the correctness of such systems, various models, as extensions of Time Petri Nets (7) have been proposed in the literature (5)(11)(9). For instance, in (11) the authors defined the ITPN (In- hibitor Time Petri Nets) model, wherein the progres- sion and the suspension of time is driven by using stan- dard and inhibitor arcs. Then, the state space of the model is computed by applying the state class graph method (3) in the same way as for a TPN . Each class E of this graph is a pair consisting of a marking M and a set of inequalities D. However, unlike in TPN where D is always given in the form of a DBM (Dif- ference Bound Matrix) system (6), for an ITPN the system D can enjoy a polyhedral form which can not be encoded in DBM . In this case, D needs complex data structures to be represented in memory and re- quires a much higher time to be solved 1 . As a result, the exact state class graph computation algorithm (9) has reported memory overflows and prohibitive calcu- lation times. To circumvent this issue, DBM approx- imation techniques (1)(5)(11) have proposed to over- approximate the system D by the tightest DBM sub- 1 The complexity of computing a class is exponential in the number of variables whereas it is polynomial for a DBM system. system including it. These approaches make it possible to build efficiently in a lesser time, a graph which can however derive additional firing sequences that are not accessible in the exact graph. This construction makes it possible to preserve a subset of properties than can be sufficient to model-checking the system. Within this contest, one of the main property of in- terest is to check over WCRT or BCRT (Worst and Best case response times) of an action or a run. For this effect, the authors in (4)(12)(11) have proposed to extend the original model with an observer con- taining additional places and transitions modeling the quantitative property. Then they need to compute the reachabiliy graph of it in order to workout whether the property holds or not. This method is quite costly as it requires, for each property to check, to extend the net with the appropriate observer before computing its reachability graph wherein the property is worked out. In (5), the authors proposed an interesting method for quantitative timed analysis. They compute first the DBM approximation of the graph. Then, given an un- timed transition sequence from the over-approximated state class graph, they can obtain the feasable timings between the firing of the transitions of the sequence as the solution of a linear programming problem. In par- ticular, if there is no solution, the transition sequence has been introduced by the over-approximation and can be cleaned up, otherwise the solution set allows to check timed properties on the firing times of transi- tions. However, this method needs, for each sequence analysis, an exponential complexity time as a result of solving a linear programming problem. Within this context, we propose in this paper an al- gorithm making it possible the real time analysis of pre- emptive systems modeled by using the ITPN model. This consists in computing an over approximation of the minimal and the maximal time distances of any fir- ing sequence of the graph in a linear complexity time. Moreover, our algorithm is performed only once and can be either applied on the fly when building the graph, or after its construction without requiring to extend the ITPN with observers. The remainder of this paper is organized as follows: In Section 2 , we present the syntax and the formal se- mantics of the ITPN model. In Section 3, we discuss of the state class graph method as well as its DBM over 1 Time Analysis of the State Space of Real-time Preemptive Systems. Special Issue of IJCCT Vol. 2 Issue 2, 3, 4; 2010 for International Conference [ICCT-2010], 3 rd -5 th December 2010 36