31.01.2014 Views

Ph.D. - geht es zur Homepage der Informatik des Fachbereiches 3 ...

Ph.D. - geht es zur Homepage der Informatik des Fachbereiches 3 ...

Ph.D. - geht es zur Homepage der Informatik des Fachbereiches 3 ...

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.

Chapter 7. openETCS Meta Model<br />

The static semantics for openETCS meta model instanc<strong>es</strong> will be introduced by the graph<br />

type they are mainly related to. It must be remarked that the majority of the following<br />

constraints are only meaningful combined with others. Those dependenci<strong>es</strong> between constraints<br />

are not specially highlighted and therefore the following constraints should be always interpreted<br />

in combination.<br />

7.5.1. gEVCStateMachine<br />

This graph type is used to define all available ETCS Mod<strong>es</strong> of the EVC and the transitions<br />

between those mod<strong>es</strong>. An important constraint is that only one instance of this graph type<br />

must exist in a model.<br />

1 context CProject<br />

2 inv : m_GraphSet−>s e l e c t (m_Type = ’ gEVCStateMachine ’ )−>s i z e ( ) = 1<br />

Listing 7.1: gEVCStateMachine constraint 1<br />

It is also crucial that each mode defin<strong>es</strong> the functionality it provid<strong>es</strong> when it is active. This<br />

means that in a model all oMode objects have at least one explosion to a gMainFunctionBlock<br />

graph.<br />

1 context CProject<br />

2 inv : m_GraphSet−>any (m_Type = ’ gEVCStateMachine ’ ) . m_ObjectSet−>s e l e c t (m_Type =<br />

’ oEVCState ’ )−>f o r A l l ( m_Explosions−>s i z e ( ) >= 1)<br />

Listing 7.2: gEVCStateMachine constraint 2<br />

It must be guaranteed that all oModeGuard objects used as properti<strong>es</strong> in ModeTransition<br />

relationships exist in at least one explosion of the oMode object connected by the CurrentState<br />

role to ensure the correctn<strong>es</strong>s of the Mode. Otherwise, ModeTransition relationships could be<br />

modelled but are never used.<br />

1 context CProject<br />

2 inv : m_GraphSet−>s e l e c t (m_Type = ’ gEVCStateMachine ’ )−>f o r A l l (<br />

3 graph |<br />

4 graph . m_RelationshipSet−>s e l e c t (m_Type = ’ ModeTransition ’ )−>f o r A l l (<br />

5 r e l a t i o n s h i p |<br />

6 graph . m_BindingSet−>e x i s t s (<br />

7 m_Connection . m_pRole . m_Type = ’ CurrentState ’<br />

8 and<br />

9 m_Connection . m_Calls−>e x i s t s (<br />

10 m_pObject . m_Explosions−>e x i s t s (<br />

11 e x p l o s i o n |<br />

12 e x p l o s i o n . m_ObjectSet−>i n c l u d e s (<br />

13 r e l a t i o n s h i p . m_Properti<strong>es</strong>−>any (m_Type =<br />

’EVCGuard ’ ) . m_NonProperti<strong>es</strong>−>any (m_Type = ’ oModeGuard ’ )<br />

14 )<br />

15 )<br />

16 )<br />

17 )<br />

18 )<br />

19 )<br />

Listing 7.3: gEVCStateMachine constraint 2<br />

98

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

Saved successfully!

Ooh no, something went wrong!