27.03.2014 Views

SEKE 2012 Proceedings - Knowledge Systems Institute

SEKE 2012 Proceedings - Knowledge Systems Institute

SEKE 2012 Proceedings - Knowledge Systems Institute

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

MappingRule MappingTGtoHP {<br />

[Rule Input]<br />

TransitionGraph tg<br />

[Declaration]<br />

HPContent hpcontent<br />

Trans TG : TG T TG<br />

Mode TG : TG M TG<br />

[Mapping]<br />

// Transforming the discrete transition<br />

for each t in Trans TG ( tg )<br />

hpcontent ( ? hp.ActiveState = srcMode T (t) ;?grd T (t) ;<br />

act T (t) ; hp.ActiveState tarMode(t)) hpcontent<br />

// Transforming the continous evolution<br />

for each m in Mode TG ( tg )<br />

hpcontent ( ?hp.ActiveState = m; flow M (m) &<br />

inv M (m)) hpcontent<br />

[Return Result]<br />

return hpcontent<br />

}<br />

Figure 4. Rule MappingTGtoHP<br />

C. Template of rules applied<br />

In section IV we have built model transformation rules. To<br />

organize those rules, a te mplate of rules is needed. Before<br />

building the template, we gi ve two methods: method<br />

RenameSharedVariables sets the shared variables to the same<br />

name and method MergeHPModel merges the primitive mode<br />

in HP.After model transformation, we get the following HP:<br />

ETCS ( train rbc)*<br />

train ctrl; drive<br />

ctrl 1 2 3 4<br />

1 (?ActiveState = drive; ?(v recommendSpeed);<br />

a *; ?(-b a A); SB v2<br />

2b + ( A b + 1) ( A 2 2 + v);<br />

(?(m–z SB message = emergency); a -b;<br />

ActiveState drive))<br />

2 (?ActiveState = drive;?(v recommendSpeed);<br />

a *; ?(-b a A); SB v2<br />

2b + ( A b + 1) ( A 2 2 + v);<br />

(?(m – z SB message != emergency);a A;<br />

ActiveState drive))<br />

3 (?ActiveState = drive;?(v recommendSpeed);<br />

a *;?(-b a 0); SB v2<br />

2b + ( A b + 1) ( A 2 2 + v);<br />

(?(m – z SB message = emergency ); a -b;<br />

ActiveState drive ) )<br />

4 ( ? ActiveState = drive; ? ( v recommendSpeed );<br />

a *; ? ( -b a 0 ); SB v2<br />

2b + ( A b + 1) ( A 2 2 + v);<br />

(?(m –z SB message != emergency); a A;<br />

ActiveState drive))<br />

drive ? ActiveState = drive; t 0; ( z = v, v = a, t = 1 & v <br />

0 t )<br />

rbc message emergency ( m *, recommendSpeed <br />

*; ? ( recommendSpeed > 0 ) )<br />

IV. SPECIFICATION AND VERIFICATION OF ETCS<br />

This case verifies the safety of the ETCS cooperation<br />

protocol, that is, whether train can always move within MA.<br />

The safety of ETCS is specified by DDL formula as follows:<br />

[ ETCS*]<br />

z m <br />

ActiveState = drive v 2 2b(m – z) b > 0 A 0<br />

ETCS ( ctrl ; drive) rbc, ctrl 1 2 3 4<br />

In the formula , is the initial condition. There are lots of<br />

branches while reasoning, and the process ends when all th e<br />

branches are reduced to an obvious expression. It costs 236<br />

steps to reduce in KeYmaera and generates 10 branches in all.<br />

To sum up, we know that train will stay within its MA all the<br />

time when the initial condition is satisfied. There will not be<br />

any crash when all trains moves within their own MA and the<br />

train cooperation protocol is safe.<br />

V. CONCLUSION<br />

In this paper, we propose a DDL based framework for CPS<br />

modeling and verification. We model an ETCS using a unified<br />

modeling language HybridUML, transform HybridUML model<br />

to the operating model of DDL-Hybrid Program, and reason<br />

the resulting ETCS property formula by DDL proof rules. We<br />

propose a tra nsformation method to translate a Hybr idUML<br />

model to it s corresponding hybrid program. Through the<br />

framework, we not only get a unified modeling method that can<br />

be comprehended by most system designers but also can verify<br />

property through DDL calculus using KeYmaera.<br />

[1] Lee EA. Cyber physical systems: Design challenges. UCB/EECS. 2008<br />

[2] Lygeros J, C ollins P. Computability of finite-time reachable sets for<br />

hybrid systems. <strong>Proceedings</strong> of the 44th IEEE Conference on Decision<br />

and Control, and the European Control Conference. 2005: 4688-4693.<br />

[3] Chutinan A, Bruce H. Computational techniques for hybrid system<br />

verification. IEEE Transactions on Automatic Control(HSCC'03). 2003:<br />

64-75.<br />

[4] Tiwari A. Approxi mate reachability for linear systems. In <strong>Proceedings</strong><br />

of Hybrid <strong>Systems</strong>: Computation and Control (HSCC’03). 2003: 51 4-<br />

525.<br />

[5] Ravn AP, Zhou CC, Hansen MR. An extended duration calculus for<br />

hybrid real-time systems. Hybrid <strong>Systems</strong>. 1993. 7: 36–59:<br />

[6] Hansen MR, Zhou CC. Duration Calculus: A Formal Approach to Real-<br />

Time <strong>Systems</strong>. Monographs in Theoretical Computer Science. 2004.<br />

[7] Clarke EM, Platzer A. The image computation problem in hy brid<br />

systems model checking. In <strong>Proceedings</strong> of Hybrid <strong>Systems</strong>:<br />

Computation and Control (HSCC’07). 2007: 473–486.<br />

[8] Caplat G, Sourrouille JL. Model Mapping Using Formalism Extensions.<br />

Software,IEEE. 2005. 22(2): 44-51.<br />

[9] Bisanz S, Berkenkötter K, Hannemann U, Pele ska J. The HybridUML<br />

profile for UML 2.0. International Journal on Software Tools f or<br />

Technology Transfer (STTT). 2006. 8(2):<br />

[10] Bisanz S. Execu table HybridUML Semantics: A T ransformation<br />

Definition. PhD thesis. University of Bremen. 2005.<br />

[11] Platzer A, Quesel JD. European Train Control System: A case study in<br />

formal verification. ICFEM, LNCS. Springer: 2009: 246–265.<br />

[12] Quesel JD, Platzer A. KeYmaera: A hybrid theorem prover for hybrid<br />

systems. Proc. of IJCAR 2008, LNCS 5195. Springer: Heidelberg. 2008:<br />

171-178.<br />

[13] Huang ZQ, Liu YP, Zhu Y. Research on Model Transformation Method<br />

of Real-time System Based on Metamodeling. Journal of Chinese<br />

Computer <strong>Systems</strong>. 2010. 31(11): 2146-2153.<br />

[14] Platzer A. Logical Analysis of Hybrid <strong>Systems</strong>: Proving Theorems for<br />

Complex Dynamics. Springer. 2010.<br />

<br />

<br />

238

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!