ten diverse formal models for a cbtc automatic train...

Post on 27-Jan-2020

2 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Franco Mazzanti ISTI CNR Pisa Italy

MARS / VPT 2018Thessaloniki, 20 April 2018

Ten Diverse Formal Models for a CBTC Automatic Train Supervision System

Origins of the study

Thessaloniki, 20 April 2018Ten Diverse Formal Models … 2

Trace-IT

ASTRail

Define an ATS scheduling approach to achievedeadlock free train dispatching.

Case Study: a project defined CBTC scenario

Investigate and experiment with a rich set of formalmethods an tools to compose a survey on the suggested use of formal methods in the railway field.

Trace-IT case study re-used as one of the experiments.

Official Disclaimer: The opinions and results discussed in this presentation reflects only the author’s view and the Shift2Rail Joint Undertaking is not responsible for any use that may be made of the presented information.

The Trace-IT goal

4 Thessaloniki, 20 April 2018Ten Diverse Formal Models …

� We have a metro layout.

� We have an automatic (unmanned) metro service.

� Each train has its mission statically defined, provided to the ATS as static configuration data (timetable)

� We have to design the logic of the ATS scheduling kernel, to successfully dispatch all the trains, leading them to destinationavoiding deadlocks (also in case of arbitrary delays)

The Trace-IT project demonstrator case study

4 Thessaloniki, 20 April 2018Ten Diverse Formal Models …

yellow

blue >>

yellow >>

blue

red >>

green >>

green

red

Vicolo Corto

Via AccademiaBCA01

I

II

Piazza Università

I

II

BCA02Via Verdi

I

II

BCA03Piazza Dante

I

II

III

BCA05BCA04

I

II

I I

II

Vicolo Stretto

Via Marco PoloVia Roma

Viale dei Giardini

Parco della Vittoria

I

II

III I

II

III

IVViale Monterosa

5

7

8

10

11

12

15

16

1718

20

22

23

24

25

262728

29

3031

32

139641 3

2

31

25

23

201613

12

109

8

76

2728

29

30

32

5

43

2

1

26

24

2217

15

1811

� 8 trains providing circular services

Itineraries vs circuits

4 Thessaloniki, 20 April 2018Ten Diverse Formal Models …

BCA01Piazza Università

I

II

BCA023 4

5

6Segments correspond to entry/exit itineraries of stations

Itineraries are composed of several track circuits

Handling the problem size

4 Thessaloniki, 20 April 2018Ten Diverse Formal Models …

Via AccademiaBCA01I

II

Piazza UniversitàI

II

BCA02Via Verdi

I

II

3

2 5

1

BCA0374 6 9

BCA03 Piazza DanteI

II

IIIBCA05

Via Marco PoloVia Roma

Viale dei Giardini

Parco della Vittoria

I

II

III I

II

III

IV

10

11

12

15

16

1718

20

22

23

24

25

2627

9

Vicolo Corto BCA05

BCA04

I

II

I I

II

Vicolo Stretto Viale Monterosa

2728

29

3031

32

8

13

SECTION 2

SECTION 3

SECTION 1

The Section 2 layout and train missions.

4

20

8

5

6

7

1

210

11

12

15

16

22

23

24

25

2627

93

4

train0

train2

train3

train1

train4

train6

train7

train5

1

1

1

1

1

1

1

11

3

5

7

23

24

25

26

13

18 17

Thessaloniki, 20 April 2018Ten Diverse Formal Models …

4

20

8

5

6

7

1

210

11

12

15

16

22

23

24

25

26

27

93

4

train0 11 23

13

18 17

Thessaloniki, 20 April 2018Ten Diverse Formal Models …

The Section 2 layout and train missions.

4 Thessaloniki, 20 April 2018Ten Diverse Formal Models …

20

8

5

6

7

1

210

11

12

15

16

22

23

24

25

26

27

93

4

train41

3

23

13

18 17

The Section 2 layout and train missions.

4

20

8

5

6

7

1

210

11

12

15

16

22

23

24

25

2627

93

4

train1 13

23

13

18 17

Thessaloniki, 20 April 2018Ten Diverse Formal Models …

The Section 2 layout and train missions.

The Trace-IT case study

4 Thessaloniki, 20 April 2018Ten Diverse Formal Models …

20

8

5

6

7

1

210

11

12

15

16

22

23

24

25

2627

93

4

train5124

13

18 17

4 Thessaloniki, 20 April 2018Ten Diverse Formal Models …

20

8

5

6

7

1

210

11

12

15

16

22

23

24

25

2627

93

4

train2 15

13

18 17

The Section 2 layout and train missions.

4 Thessaloniki, 20 April 2018Ten Diverse Formal Models …

20

8

5

6

7

1

210

11

12

15

16

22

23

24

25

2627

93

4 train6125

13

18 17

The Section 2 layout and train missions.

4 Thessaloniki, 20 April 2018Ten Diverse Formal Models …

20

8

5

6

7

1

210

11

12

15

16

22

23

24

25

2627

93

4

train3 17

13

18 17

The Section 2 layout and train missions.

4 Thessaloniki, 20 April 2018Ten Diverse Formal Models …

20

8

5

6

7

1

210

11

12

15

16

22

23

24

25

2627

93

4

train7126

13

18 17

The Section 2 layout and train missions.

A sample deadlock occurrence

4 Thessaloniki, 20 April 2018Ten Diverse Formal Models …

20

8

5

6

7

1

210

11

12

15

16

22

23

24

25

2627

93

4

13

18 17

1

1

1

1

1

11 1

The Trace-IT solution

4 Thessaloniki, 20 April 2018Ten Diverse Formal Models …

T0 = [1 , 9, 10, 13, 15, 20, 23] Mission for train0A0 = [ 0, 0, 0, 1, 0, -1, 0] Region-A Constraints for train0

20

8

5

6

7

1

210

11

12

15

16

22

23

24

25

26

27

93

4

train0

23

13

18 17

110

RA = current occupation countLA = max occupation count = 7

A [RA +1 <= 7] RA++ RA --

The progression rule (e.g. for train0)

4 Thessaloniki, 20 April 2018Ten Diverse Formal Models …

T0 = [1 , 9, 10, 13, 15, 20, 23] Mission for train0A0 = [ 0, 0, 0, 1, 0, -1, 0] Region-A Increments/Decr. for train0P0 = n current progress point of train0 (index in T0)

when <next endpoint of train0 is free> i.e. for all i: T0[P0+1] !=Ti[Pi]

and <train0 move does not saturate any region>i.e. for all regions A, … : RA + A0[P0+1] <= LA

the train can advance: i.e. P0 = P0+1, RA = RA+A0[P0]

RA = n current degree of occupancy of region ALA = 7 maximum degree of occupancy for region A

The reference structure of the model

4 Thessaloniki, 20 April 2018Ten Diverse Formal Models …

T0 = [1 , 9, 10, 13, 15, 20, 23];A0 = [ 0, 0, 0, 1, 0, -1, 0]; B0 = [ 0, 0, 0, 1, 0, -1, 0]; …T7 = [26, 22, 17, 18, 12, 27, 7];A7 = [ 1, 0, 0, -1, 0, 0, 0]; B7 = [ 1, 0, 0, -1, 0, 0, 0]; LA = 7; LB =7

Global Constants

Global Variables P0, P1, ..., P7 := 0;RA:=1, RB :=1

Train RulesTrain0: [guard train0] / actions train0

…Train7: [guard train7] / actions train7

The encoding of the model: UMC

4 Thessaloniki, 20 April 2018Ten Diverse Formal Models …

train0: s1 -> s1 {- [P0<6 & T0[P0+1] !=T5[P5] &…& T0[P0+1] !=T7[P7] &

RA+A0[P0+1]<=LA & RB+B0[P0+1]<=LB] / P0 := P0+1; RA := RA+A0[P0]; RB := RB+B0[P0];

}…

train7: s1 -> s1 {…}

The encoding of the model: SPIN

4 Thessaloniki, 20 April 2018Ten Diverse Formal Models …

do :: atomic { (P0<6 && T0[P0+1] !=T1[P1] && … && T0[P0+1] !=T7[P7] &&

(RA+A0[P0+1])<=LA && (RB+B0[P0+1]<=LB) ) ->P0 = (P0+1); RA = RA+A0[P0]; RB = RB+B0[P0]; };

:: atomic { };

od;

The encoding of the model: CADP/LNT

4 Thessaloniki, 20 April 2018Ten Diverse Formal Models …

loopselect

only ifP0<6 and T0[P0+1] !=T1[P1] and … and T0[P0+1] !=T7[P7] and

(RA+A0[P0+1])<=LA and (RB+B0[P0+1]<=LB) then

MOVE (0 of Train_Number);P0 := (P0+1); RA := RA+A0[P0]; RB := RB+B0[P0];

end if[ ]

only if…

end selectend loop

The encoding of the model: ProB

4 Thessaloniki, 20 April 2018Ten Diverse Formal Models …

OPERATIONS

move0 = PRE

P0<6 & T0(P0+1) /=T1(P1) &…& T0(P0+1) /=T7(P7) &RA+A0(P0+1)<=LA & RB+B0(P0+1)<=LB

THENP0 := P0+1; RA := RA+A0(P0); RB := RB+B0(P0);

END;

move1 = …

The encoding of the model: NuSMV/ nuXmv

4 Thessaloniki, 20 April 2018Ten Diverse Formal Models …

TRANSRUNNING=0 ->

P0<6 && T0[P0+1] !=T1[P1] &…& T0[P0+1] !=T7[P7] & (RA+A0[P0+1])<=LA & (RB+B0[P0+1])<=LB

? next(P0)=(P0+1) & next(P1)=P1 &…& next(P7)=P7 &next(RA)= RA+A0[P0; next(RB)=RB+B0[P0];

: next(P0)=P0 &...& next(P7)=P7 & next(RA)=RA & next(RB)=RB

TRANSRUNNING=7 ->

The encoding of the model: FDR4 / CSPm

4 Thessaloniki, 20 April 2018Ten Diverse Formal Models …

AllTrains (P0, P1, P2, P3, P4, P5, P6, P7, RA, RB) =

( P0 < 6 andel(T0,P0+1) != el(T1,P1) and … and el(T0,P0+1) != el(T7,P7) andRA + el(A0,P0+1) <= LA and RB + el(B0,P0+1) <= LB

) &move0 ->

AllTrains(P0+1,P1,P2,P3,P4,P5,P6,P7, RA+el(A0,P0+1), RB+el(B0,P0+1))

[ ]( P1 < 6 and

The encoding of the model: mCRL2

4 Thessaloniki, 20 April 2018Ten Diverse Formal Models …

proc AllTrains(P0,P1,P2,P3,P4,P5,P6,P7:Nat, RA,RB: Int) =

( P0 < 6 &&T0(P0+1) != T1(P1) &&… && T0(P0+1) != T7(P7) &&RA+A0(P0+1) <= LA && RB+ B0(P0+1)<=LB

) &move(0) ->

AllTrains(P0+1,P1,P2,P3,P4,P5,P6,P7, RA+A0(P0+1), RB+B0(P0+1))

[ ]( P1 < 6 &&

The encoding of the model: TLAplus

4 Thessaloniki, 20 April 2018Ten Diverse Formal Models …

Move0 == /\P0 < 6 /\ T0[P0+2] /=T1[P1+1] /\ … /\ T0[P0+2] /=T7[P7+1] /\RA + A0[P0+2] <= LA /\ RB + B0[P0+2] <= LB /\P0' = (P0+1) /\RA' = RA+A0[P0+2] /\ RB' = RB+B0[P0+2] /\

UNCHANGED <<P1,P2,P3,P4,P5,P6,P7>>

Move1 ==…

Next == Move0 \/ Move1 \/ Move2 \/ Move3 \/ Move4 \/ Move5 \/ Move6 \/ Move7

Considerations:

4 Thessaloniki, 20 April 2018Ten Diverse Formal Models …

So what ????

Considerations:

4 Thessaloniki, 20 April 2018Ten Diverse Formal Models …

Blackboard models / Event-Condition-Action models / can have a commonGuard-Transition models / reference baseline

Considerations:

4 Thessaloniki, 20 April 2018Ten Diverse Formal Models …

Diversity in tool selection / model encodingmore trustable verification results

Blackboard models / Event-Condition-Action models / can have a commonGuard-Transition models / reference baseline

Considerations:

4 Thessaloniki, 20 April 2018Ten Diverse Formal Models …

Blackboard models / Event Condition Action models / can have a common baselineGuard Transition models /

Diversity in tool selection / model encodingmore trustable verification resultsbetter exploitation of the verification features of multiple

existing frameworks.

e.g. Branching vs. Linear vs. Refinements vs. Compositional

e.g. tool. friendliness vs. ability to deal with very large models

e.g. timed vs untimed

Further Works:

4 Thessaloniki, 20 April 2018Ten Diverse Formal Models …

More frameworks taken into consideration:Simulink / SCADE / SAL / UPPAAL / ….

More features compared:

Code Generation?

Report Generation?

Language Expressiveness

Time Retated Aspects?

Probability?Modularity

Simulation?

Model-based Testing?

Standard input format?

Inport/Export

Maturity

Industrial Diffusion

Customer Support

Cost

Certification

Documentation

Official Formal Disclaimer:

4 Thessaloniki, 20 April 2018Ten Diverse Formal Models …

The opinions and results discussed in this presentation reflectonly the author’s view and the Shift2Rail Joint Undertaking is not

responsible for any use that may be made of the presented information.

This work has received funding from the S2RJU under the European Union’s Horizon 2020 research and innovation programme under grant agreement No 777561.

Senior Researcher

Franco Mazzanti

THANK YOU!

ISTI CNR Via Moruzzi 1, Pisa , Italy

http://fmt.isti.cnr.it/~mazzanti

This project has received funding from the European Union’s Horizon 2020 research and innovation programme under Grant Agreement No 777561

Call identifier: H2020-S2RJU-2017Topic: S2R-OC-IP2-01-2017 – Operational conditions of the signalling and automation systems; signalling system hazard analysis and GNSS SIS characterization along with

Formal Method application in railway field

CONTACTS

The incremental design/verification approach:

4 Thessaloniki, 20 April 2018Ten Diverse Formal Models …

Initial model(handling basic deadlocks)

Model Checking

New sections, counters,and updated missions

No more deadlocks or false positives

Newdeadlocks or

false positives

Validated ATS Data

Train Missions

top related