MOdel-based GENeration of Tests for Embedded Systems #216679 FP7-ICT-2007-1-3.3 Embedded Systems Design Slide 4 MOGENTES Review, Brussels, 13 March 2009 WP3 / Modelling examples Modelling Example – Elektra (2)  Examples for OCL-constraints (Papyrus 1.10) context TR_TrainRoute inv ValidGoal : /* selected goal signal must be projected as goal or start/goal signal */ self.oclIsInState(Selection) implies goal.oclIsTypeOf(MPS) implies goal.oclAsType(MPS).goal = true or goal.oclAsType(MPS).startgoal = true context TR_TrainRoute inv GoalElement : /* assure that front of goal signal actually points at first entry of trackelements or goal point is actually last entry of trackelements */ self.oclIsInState(Selection) implies if goal.oclIsTypeOf(MPS) then goal.oclAsType(MPS).front.owner = trackelements->last() else goal.oclAsType(TEP_).owner = trackelements->last() endif
{}