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.

7.5. Static Semantics for Models<br />

1 context CProject<br />

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

’ gSubFunctionBlock ’ ) . m_ObjectSet−>s e l e c t (m_Type = ’ oSubFunction ’ )−>f o r A l l (<br />

3 s u b o b j e c t |<br />

4 s u b o b j e c t . m_pDecomposition−>s i z e ( ) = 1<br />

5 )<br />

Listing 7.9: gFunctionBlock constraint 4<br />

An instance without decomposition would not oppose the static semantics but might falsify<br />

the information provided by the graph for human beings.<br />

The same is required for the oEmbeddedStateMachine object type.<br />

1 context CProject<br />

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

’ gSubFunctionBlock ’ ) . m_ObjectSet−>s e l e c t (m_Type = ’ oEmbeddedStateMachine ’ )−>f o r A l l (<br />

3 embedded |<br />

4 embedded . m_pDecomposition−>s i z e ( ) = 1<br />

5 )<br />

Listing 7.10: gFunctionBlock constraint 5<br />

As required for the gEVCStateMachine graph type, all oModeGuard objects used as properti<strong>es</strong><br />

in ModeTransition relationships must exist at least in one explosion of the related oMode<br />

object. It is also nec<strong>es</strong>sary that all oModeGuard objects in a gMainFunctionBlock graph exist<br />

at least once as property of a ModeTransition relation connected to the parent oMode object.<br />

Otherwise, the activation of such oModeGuard object would be without any effect.<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_ObjectSet−>s e l e c t (m_Type = ’ oMode ’ )−>f o r A l l (<br />

5 mode |<br />

6 mode . m_Explosions−>f o r A l l (<br />

7 f u n c t i o n |<br />

8 f u n c t i o n . m_ObjectSet−>s e l e c t (m_Type = ’ oModeGuard ’ )−>f o r A l l (<br />

9 guard |<br />

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

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

’ CurrentState ’ )<br />

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

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

14 )<br />

15 )<br />

16 )<br />

17 )<br />

18 )<br />

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

Listing 7.11: gFunctionBlock constraint 6<br />

’EVCGuard ’ ) = guard<br />

A very similar constraint is required for oStateGuard objects that are used in gSubFunction-<br />

Block and gEmbeddedStateMachine graphs.<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_ObjectSet−>s e l e c t (m_Type = ’ oEmbeddedState ’ )−>f o r A l l (<br />

101

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

Saved successfully!

Ooh no, something went wrong!