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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 7. openETCS Meta Model<br />

5 s t a t e |<br />

6 s t a t e . m_pDecomposition . m_ObjectSet−>s e l e c t (m_Type = ’ oStateGuard ’ )−>f o r A l l (<br />

7 guard |<br />

8 graph . m_BindingSet−>s e l e c t (<br />

9 m_Connection . m_Calls−>e x i s t s ( m_pObject = mode and m_pRole . m_Type =<br />

’ CurrentState ’ )<br />

10 )−>e x i s t s (<br />

11 m_pRelationship . m_Properti<strong>es</strong>−>any (m_Type =<br />

’ StateGuard ’ ) . m_NonProperti<strong>es</strong>−>any (m_Type = ’ StateGuard ’ ) = guard<br />

12 )<br />

13 )<br />

14 )<br />

15 )<br />

Listing 7.12: gFunctionBlock constraint 7<br />

Since the concrete syntax only us<strong>es</strong> the atomic typ<strong>es</strong> 11 for input and output ports, it must<br />

be ensured that in each data flow both are of the same type.<br />

1 context CProject<br />

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

3 binding |<br />

4 binding . m_Connection . m_Calls . m_pPort . m_Type−>a s S e t ( )−>s i z e ( ) = 1<br />

5 )<br />

Listing 7.13: gFunctionBlock constraint 8<br />

A final constraint for gMainFunctionBlock was already <strong>der</strong>ived in Subsection 7.3.2 that<br />

requir<strong>es</strong> that no oStateGuard objects may exist in a gMainFunctionBlock graph.<br />

1 context CProject<br />

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

’ oStateGuard ’ )−>s i z e ( ) = 0<br />

Listing 7.14: gFunctionBlock constraint 9<br />

7.5.3. gEmbeddedStateMachine Graph Type<br />

Similar to the gEVCStateMachine graph type, it is required that the oStateGuard objects used<br />

as guards in StateTransition relationships exist in the decomposition of the oEmbeddedState<br />

object on the connected CurrentState role.<br />

1 context CProject<br />

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

3 graph |<br />

4 graph . m_RelationshipSet−>s e l e c t (m_Type = ’ S t a t e T r a n s i t i o n ’ )−>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_pDecomposition . m_ObjectSet−>i n c l u d e s (<br />

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

’ StateGuard ’ ) . m_NonProperti<strong>es</strong>−>any (m_Type = ’ oStateGuard ’ )<br />

12 )<br />

13 )<br />

11 atomicInput and atomicOutput<br />

102

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

Saved successfully!

Ooh no, something went wrong!