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.

4.5. The Object Constraint Language for Static Semantics<br />

context CProject<br />

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

inv : m_GraphSet−>f o r A l l (<br />

graph |<br />

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

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

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

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

and<br />

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

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

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

e x p l o s i o n . m_ObjectSet−>e x i s t s (<br />

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 = ’ ModeGuard ’ )<br />

)<br />

)<br />

)<br />

)<br />

)<br />

)<br />

4.5.4. OCL Example: Port Connection Specification<br />

For all graphs and for all ports, the amount of connected “DataInput” rol<strong>es</strong> must be exact one:<br />

context CProject<br />

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

inv : m_GraphSet−>f o r A l l (<br />

graph |<br />

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

port |<br />

graph . m_BindingSet−>s e l e c t ( m_Connection . m_Calls−>e x i s t s (m_pPort = port and<br />

m_pRole . m_Type = ’ DataInput ’ ) )−>s i z e ( ) = 1<br />

)<br />

)<br />

4.5.5. OCL Example: Graphical Containment<br />

In all “CommunicationIn” graphs, all “Packet” objects that are graphically contained by any<br />

“Telegram” object must exist also in the decomposition of the related “Telegram” object:<br />

context CProject<br />

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

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

graph |<br />

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

telegram |<br />

graph . m_Containers−>any ( m_pContainer = telegram ) . m_ContainedObjects−>f o r A l l (<br />

o b j e c t |<br />

telegram . m_pDecomposition . m_ObjectSet−>i n c l u d e s ( o b j e c t )<br />

)<br />

)<br />

)<br />

49

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

Saved successfully!

Ooh no, something went wrong!