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.

Appendix A. GOPPRR to MOF Transformation<br />

Figure A.1.: A possible transformation from GOPPRR to MOF using redefinitions of<br />

associations<br />

This leav<strong>es</strong> the main problem that associations to different typ<strong>es</strong> have to be defined separately<br />

and therefore named differently. For example, in ModelTransitionBinding the compositions<br />

connection1 and connection2. Since those associations can be then named more l<strong>es</strong>s arbitrary,<br />

model and generator development might emerge as more difficult and even non-unique.<br />

To avoid this problem, constraints could be used instead of the redefinition of associations<br />

to define the allowed association ends for certain sub typ<strong>es</strong> of a meta model. Fortunately,<br />

OCL can also be used for meta models or rather concrete models of MOF. In Figure A.1, to<br />

only allow “Mode” objects to be in a “CurrentMode” or “NextMode” tole, the following OCL<br />

statement could be used:<br />

context GOPPRR: : CProject<br />

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

graph |<br />

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

c a l l |<br />

c a l l . m_pObject . oclIsTypeOf (Mode)<br />

and<br />

( c a l l . m_pRole . oclIsTypeOf ( CurrentMode ) or c a l l . m_pRole . oclIsTypeOf ( NextMode ) )<br />

)<br />

)<br />

This example shows that it not only ren<strong>der</strong>s the redefinitions of associations unnec<strong>es</strong>sary but<br />

also the intermediate connection typ<strong>es</strong> ModeConnection1 and ModeConnection2 because the<br />

OCL can be directly defined for the each call in m_Calls. A minor disadvantage is that, b<strong>es</strong>id<strong>es</strong><br />

the graphical modelling of sub-typ<strong>es</strong>, the bindings are specified by textual OCL statements<br />

outside the graphical model, which are not as intuitively un<strong>der</strong>standable, like the GOPPRR<br />

abstract syntax d<strong>es</strong>cription.<br />

244

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

Saved successfully!

Ooh no, something went wrong!