oclIsTypeOf probadorTipos
<details key="invariantypeof1" value="self.oclIsTypeOf(Employee)"/>
<details key="invariantypeof2" value="self.oclIsTypeOf(Person)"/>
genera
invariant2 = context _Employee [invariantypeof1]
invariantypeof1 self = (ocl self |.| (oclIsTypeOf (_Employee)))
invariant3 = context _Employee [invariantypeof2]
invariantypeof2 self = (ocl self |.| (oclIsTypeOf (_Person)))
en este modelo
haskell
example = Model [
(ModelElement 0 (RootCh (Root [1, 2] [] [3] [4] )))
, (ModelElement 1 (PersonCh (Person 1 Nothing)))
, (ModelElement 2 (PersonCh (Person 2 (Just (EmployeeCh (Employee 2 ))))))
, (ModelElement 3 (CatCh (Cat )))
, (ModelElement 4 (CollectionPeopleCh (CollectionPeople [2, 1] )))
]
evalua false