Automatic Compositional Verification of Timed Systems ´ Shang-Wei Lin1 , Yang Liu1 , Jun Sun2 , Jin Song Dong3 , and Etienne Andr´e4 1

2

Temasek Laboratories, National University of Singapore ? {tsllsw,tslliuya}@nus.edu.sg Singapore University of Technology and Design [email protected] 3 National University of Singapore [email protected] 4 LIPN, CNRS UMR 7030, Universit´e Paris 13, France [email protected]

Abstract. Specification and verification of real-time systems are important research topics with crucial applications; however, the so-called state space explosion problem often prevents model checking to be used in practice for large systems. In this work, we present a self-contained toolkit to analyze real-time systems specified using event-recording automata (ERAs), which supports system modeling, animated simulation, and fully automatic compositional verification based on learning techniques. Experimental results show that our tool outperforms the state-of-the-art timed model checker.

1

Introduction

Ensuring the correctness of safety-critical systems with timing requirements is crucial and challenging. Model checking is emerging as an effective verification method and has been widely used for timed system. However, model checking suffers from the infamous state space explosion problem, and the problem is even graver in timed model checking because of the timed transitions. To alleviate this problem, we proposed an automatic learning-based compositional verification framework for timed systems (cf. technical repoert [7]). We focus on timed systems that are modeled by event-recording automata (ERAs) [1], which is a determinizable class of timed automata. ERAs are as powerful as timed transition systems and are sufficiently expressive to model many interesting timed systems. The proposed framework consists of a compositional verification based on the non-circular assumeguarantee (AG-NC) proof rule [9] and uses a learning algorithm, TL* [8], to automatically generate timed assumptions for assume-guarantee reasoning (AGR). Our engineering efforts realize the proposed techniques into a self-contained toolkit for analyzing real-time systems, which is built as the ERA module (can be downloaded at [6]) in the PAT model checker [10]. Fig. 1 shows the architecture of our tool, which consists of four components, namely the editor, the parser, the simulator and verifiers. ?

This work is mainly supported by TRF Project “Research and Development in the Formal Verification of System Design and Implementation” from Temasek Lab@National University of Singapore; partially supported by project IDG31100105/IDD11100102 from Singapore University of Technology and Design, project MOE2009-T2-1-072 from School of Computing@National University of Singapore, and Merlion Project R-252-000-482-133.

Simulator

Editor

Simulator ERA Graphic Drawing Tool

Parser

Counterexample

Graphic Viewer

Verifiers Compositional Monolithic Verifier Verifier

Internal Representation

Fig. 1. Architecture of the ERA Module in PAT input [xa ≤ 1] I0

send [xi ≤ 1] I1

ack (a) INPUT

I2

O0

send

input [xo ≤ 5]

output [xs ≤ 1] O1

O2

P0

ack[xo ≤ 1]

output [xi ≤ 5]

(b) OUTPUT

(c) Property ϕ

P1

Fig. 2. Models and property of the I/O system

The editor is featured with a powerful graphic drawing component that allows users to design system models and specify properties by drawing ERAs. The editor also supports syntax highlighting, intellisense, and undo/redo functionality such that designers can efficiently model the systems. The parser compiles both the system models and the properties (in the form of ERAs) into internal representations for simulation and verification. The simulator allows users to perform various simulation tasks on the input model such as user interactive simulation, trace replay and so on. Most importantly, compositional verification is fully automated for safety properties specified using ERAs. To the best of our knowledge, our tool is the first one supporting fully automatic compositional verification for timed systems. Our tool also supports the traditional monolithic approach that generates the global state space based on zone abstraction. Users can choose to use either the monolithic or our compositional approach inside the verification interface. If the verification result is false, counterexamples will be produced and can be visualized using the simulator. Experimental results (Section 3) show that our tool of compositional verification for real-time systems outperforms traditional timed monolithic approaches in many cases.

2

Compositional Verification of ERAs

An event-recording automaton (ERA) is a special case of timed automaton where each event a on a transition is associated with a corresponding event-recording clock xa recording the time elapsed since the last occurrence of event a. Each event-recording clock xa is implicitly and automatically reset when a transition with event a is taken. Fig. 2 gives an I/O system with two components, INPUT and OUTPUT, modeled by ERAs. The pairs of event-recording clocks and the corresponding events are xi : input, xs : send, xo : output, and xa : ack. The model of the INPUT component is shown in Fig. 2 (a). It performs an input event within one time unit once it receives an ack event from OUTPUT. Subsequently, it performs a send event to notify OUTPUT

Fig. 3. GUI of the PAT Model Checker

and waits for another ack event from OUTPUT. The model of OUTPUT is shown in Fig. 2 (b), which is similar to INPUT. The system property ϕ, as shown in Fig. 2 (c), is that input and output events should alternate and the time difference between every two consecutive events should not exceed five time units. Fig. 3 shows the INPUT component modeled in PAT, where a double circle represents the initial state and a state labeled with “A” represents an accepting state. The flow of the proposed timed compositional verification is a two-phase process using the TL∗ algorithm [8] to automatically learn the timed assumption needed by AGR. The first, untimed verification, phase constructs the untimed assumption, and then the second, timed verification, phase refines the untimed assumption into timed one and concludes the verification result. The flow is complete, i.e., users are guaranteed to get the verification result. Interested readers are referred to the technical report [7]. After verification, PAT shows that the I/O system satisfies the property ϕ.

3

Experimental Results and Discussion

To show the feasibility and scalability of our tool, we present verification results of four different applications, namely the CSS, GSS, FMS, and AIP systems, in Table 1. The details of the four systems, their models, and the verified properties can be found in [6]. The experimental results were obtained by running PAT on a Windows 7 machine with a 2.27 GHz Intel(R) Core(TM) i3 processor and 4 GB RAM. We also compared our approach with the UPPAAL model checker [11]; however, we do not list the verification time of UPPAAL for verifying the AIP system because UPPAAL does not support events on transitions such that the AIP system cannot be modeled in UPPAAL. When the system size is small, compositional approach does not outperform monolithic verification or UPPAAL because of the overhead of learning iterations; when the number of components increases, the learning iterations compensate for the large global state space and compositional approach can reduce the verification time and the memory usage significantly. For the FMS-4 system, the monolithic approach and UPPAAL cannot even finish the verification using 4 GB memory.

Table 1. Verification Results System n |CΣ | |P6|= | |P | CSS 3 6 0/6 GSS 3 3 2/3 FMS-1 5 3 1/3 FMS-2 10 6 3/6 FMS-3 11 6 5/7 FMS-4 14 8 3/9 AIP 10 4 5/10

|L|max 11 29 193 76, 305 201, 601 − 104, 651

Monolithic |δ|max Time Mem |L|max (secs) (MB) 20 0.03 0.16 19 46 0.03 0.13 56 514 0.03 1.18 60 396, 789 40.71 114.08 1, 492 1, 300, 566 70.02 295.89 3, 150 − − ROM 26, 320 704, 110 78.05 149.68 2, 992

Compositional |δ|max Time (secs) 50 0.06 107 0.03 138 0.03 4, 952 0.66 16, 135 1.14 127, 656 51.02 12, 971 1.90

Mem (MB) 0.77 0.69 0.89 6.60 12.07 41.41 7.39

UPPAAL Time (secs) 0.05 0.06 0.08 2.05 9.87 ROM N/A

n: # of components; |CΣ |: # of event-recording clocks; |P |: # of properties; |P6|= |: # of violated properties; |L|max : # of visited locations during verification; |δ|max : # of visited transitions during verification; ROM: run out of memory

Discussion. AGR has been applied to model checking to alleviate the state space explosion problem [3]. However, the construction of the assumptions for AGR usually requires nontrivial creativity and experience, which limits the impact of AGR. Cobleigh et al. [4] proposed a framework that generates the assumptions of components automatically using the L∗ algorithm [2]. This work was a breakthrough of automating compositional verification for untimed systems. Grinchtein et al. [5] proposed three algorithms for learning ERAs; however, the time complexity of the algorithms depend exponentially on the largest constant appearing in the time constraints. In [8], we proposed a more efficient polynomial time algorithm, TL∗ , for learning ERAs. Starting from 2010, ERA module in PAT has come to a stable stage with solid testing. We successfully applied it to verify real-time systems ranging from classical concurrent algorithms to real world problems. In the future, we plan to use different techniques to generate the assumptions and to extend the framework using other proof rules of AGR.

References 1. R. Alur, L. Fix, and T. A. Henzinger. Event-clock automata: A determinizable class of timed automata. Theoretical Computer Science, 211(1-2):253–273, 1999. 2. D. Angluin. Learning regular sets from queries and counterexamples. Information and Computation, 75(2):87–106, 1987. 3. E. M. Clarke, D. E. Long, and M. K. L. Compositional model checking. In LICS, pages 353–362, 1989. 4. J. M. Cobleigh, D. Giannakopoulou, and C. S. P˘as˘areanu. Learning assumptions for compositional verification. In TACAS, volume 2619 of LNCS, pages 331–346, 2003. 5. O. Grinchtein, B. Jonsson, and M. Leucker. Learning of event-recording automata. Theorectical Computer Science, 411(47):4029–4054, 2010. 6. S. W. Lin. https://sites.google.com/site/shangweilin/era-pat. 7. S. W. Lin. https://sites.google.com/site/shangweilin/technical-reports. 8. S. W. Lin, E. Andr´e, J. S. Dong, J. Sun, and Y. Liu. An efficient algorithm for learning event-recording automata. In ATVA, volume 6996 of LNCS, pages 463–472, 2011. 9. K. S. Namjoshi and R. J. Trefler. On the completeness of compositional reasoning. In CAV, volume 1855 of LNCS, pages 139–153, 2000. 10. J. Sun, Y. Liu, J. S. Dong, and J. Pang. PAT: Towards flexible verification under fairness. In CAV, volume 5643 of LNCS, pages 709–714, 2009. 11. UPPAAL. http://www.uppaal.org/.

Automatic Compositional Verification of Timed Systems

and challenging. Model checking is emerging as an effective verification method and ... To alleviate this problem, we proposed an automatic learning-based compositional ... To the best of our knowledge, our tool is the first one supporting fully automatic compo- .... Theoretical Computer Science, 211(1-2):253–273, 1999. 2.

303KB Sizes 1 Downloads 252 Views

Recommend Documents

Automatic Verification of Algebraic Transformations
restructuring transformations are called global data-flow transformations. In our earlier work [2], we have presented an intra- procedural method for showing the ...

Compositional Synthesis of Concurrent Systems ...
cient for a system designer, because if there is a counterexample, he/she needs ... As a better solution4 to Problem 1, we propose a compositional synthesis.

Automatic Verification of Confidentiality Properties of ...
of roles for key servers is discussed briefly, and we illustrate a run of ...... [3] B. Schneier, “The IDEA encryption algorithm,” Dr. Dobb's Journal of. Software Tools ...

automatic pronunciation verification - Research at Google
Further, a lexicon recorded by experts may not cover all the .... rently containing interested words are covered. 2. ... All other utterances can be safely discarded.

efficient automatic verification of loop and data-flow ...
and transformations that is common in the domain of digital signal pro- cessing and ... check, it generates feedback on the possible locations of errors in the program. ...... statements and for-loops as the only available constructs to specify the.

Automatic Functional Verification of Memory Oriented ...
software for power and performance-efficient embed- ded multimedia systems. ... between structure-preserving (viz., interchange, skew- ing, reversal, bumping) ...

Automatic Verification and Discovery of Byzantine ...
which tests the correctness of the implied Consensus algo- rithm. In automatic discovery, the ... algorithms, which benefit from automated verification most. Secondly, any ...... an independent Python implementation of the algorithm in. Figure 7.

efficient automatic verification of loop and data-flow ...
Department of Computer Science in partial fulfillment of the .... Most importantly, in these applications, program routines subject to transformations are typically.

Quantitative Verification of Reconfigurable Manufacturing Systems ...
Min and Max processing times as quantitative verification indices th,at reflect the .... quantitative analysis to the processing time of an activity that starts and ends with ..... [2] E.W. Endsley and M. R. Lucas and D.M. Tilbury, “Software Tools.

Geometric Model Checking: An Automatic Verification ...
based embedded systems design, where the initial program is subject to a series of transformations to .... It is required to check that the use of the definition and operand variables in the ..... used when filling the buffer arrays. If a condition d

Code Mutation in Verification and Automatic Code ...
Model checking is a successful technique for comparing a model of a system with .... metric communication construct of the programming language ADA.

Code Mutation in Verification and Automatic Code ...
sender and receiver side. The protocol we check appears both in a .... The action is a sequence of statements, exe- cuted when the condition holds. in addition, ...

An Automatic Verification Technique for Loop and Data ...
tion/fission/splitting, merging/folding/fusion, strip-mining/tiling, unrolling are other important ... information about the data and control flow in the program. We use ...

Compositional States
Tycoons own this bank. (EIS) ... What does this account tell us about states? ... Starting with Glasbey (1997), previous approaches have focused on the role of.

Tutorial: Verification of Real-time Systems Based on ...
Electrical and Computer Engineering,. Wayne State ... I. Introduction. Discrete Event System Specification(DEVS) is a promising formalism for modelling and analysis of dis- crete event systems and especially it has been regarded as a powerful ... the

Failure-aware Runtime Verification of Distributed Systems
35th International Conference on Foundations of Software Technology and Theoretical Computer Sci- ..... sage the monitor gains knowledge about the in-.

TRENDS IN COHABITATION OUTCOMES: COMPOSITIONAL ...
Jan 10, 2012 - 39.2. Some college. 15.7. 15.8. 19.0. 21.9. 24.9. 27.3. 21.2. College or more. 13.2. 13.6. 15.9. 18.2. 19.1. 20.1. 17.1. Mother had teen birth. 16.6.

Compositional States
Tycoons own this bank. (EIS). • How to account for the alternation of the availability of EIS? • What does this account tell us about states? 1.2 Roadmap.

Factor-based Compositional Embedding Models
Human Language Technology Center of Excellence. Center for .... [The company]M1 fabricates [plastic chairs]M2 ... gf ⊗ hf . We call efi the substructure em-.

TRENDS IN COHABITATION OUTCOMES: COMPOSITIONAL ...
Jan 10, 2012 - The data are cross-sectional but contain a detailed retrospective ... To analyze change over time, I created six cohabitation cohorts: 1980-1984, ..... Qualitative evidence also shows that the exact start and end dates of.

Timed Quests in Thalumbra.pdf
Memory Bloom (515, 73, -167) (moderate). • Millions of Leeches, Leeches for Me (342, 483, 100) (moderate). • Extinguish the Flames (-107, 232, -692) (Hard).

Verification of Employment.pdf
TO WHOM IT MAY CONCERN: The applicant/participant is applying for housing assistance subsidized through the Department of. Housing and Urban Development. Federal regulations require that all income, expenses,. preferences and other information relate

Verification of Employment.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Verification of ...Missing: