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.

7.5. Static Semantics for Models<br />

A proper EVC implementation always needs exact one initial state. In a gEVCStateMachine<br />

graph this is modelled by the Boolean property IsInitial of the oMode object type. Thus, in a<br />

certain graph exact one oMode object must have this property set to true while all others are<br />

false.<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 (<br />

5 o b j e c t |<br />

6 o b j e c t . m_Type = ’ oMode ’ and o b j e c t . m_Properti<strong>es</strong>−>any (m_Type = ’ I s I n i t i a l ’ ) . m_Value<br />

= ’T ’<br />

7 )−>s i z e ( ) = 1<br />

8 )<br />

Listing 7.4: gEVCStateMachine constraint 3<br />

Furthermore, it must be ensured that all possible transitions from a certain oMode object<br />

have different prioriti<strong>es</strong>. Otherwise, it is not possible to uniquely decide in a concurrent<br />

situation, which transition is going to be 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_ObjectSet−>s e l e c t (m_Type = ’ oMode ’ )−>f o r A l l (<br />

5 mode |<br />

6 graph . m_BindingSet−>s e l e c t ( m_Connection . m_Calls−>e x i s t s ( m_pObject =<br />

mode ) ) . m_pRelationship . m_Properti<strong>es</strong>−>s e l e c t (m_Type =<br />

’ P r i o r i t y ’ )−>isUnique (m_Value)<br />

7 )<br />

8 )<br />

Listing 7.5: gEVCStateMachine constraint 4<br />

7.5.2. gMainFunctionBlock and gSubFunctionBlock<br />

As both graph typ<strong>es</strong> define data flows, the first constraint is that each input port – independent<br />

from its data type – should be connected only with one data flow. Multiple inputs are not<br />

semantically meaningful.<br />

1 context CProject<br />

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

’ gSubFunctionBlock ’ )−>f o r A l l (<br />

3 graph |<br />

4 graph . m_ObjectSet−>s e l e c t (m_Type = ’ oSubFunction ’ ) . m_pDecomposition−>c l o s u r e (<br />

5 subgraph |<br />

6 subgraph . m_ObjectSet−>s e l e c t (m_Type = ’ oSubFunction ’ ) . m_pDecomposition<br />

7 )−>i n c l u d i n g ( graph )−>f o r A l l (<br />

8 graph |<br />

9 graph . m_PortSet−>f o r A l l (<br />

10 port |<br />

11 graph . m_BindingSet−>s e l e c t ( m_Connection . m_Calls−>e x i s t s (<br />

12 m_pPort = port and m_pRole . m_Type = ’ DataInput ’<br />

13 ) )−>s i z e ( ) = 1<br />

14 )<br />

15 )<br />

16 )<br />

99

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

Saved successfully!

Ooh no, something went wrong!