Telecommunications Software and Systems Group 'www.tssg.org'
Nazim Agoulmine - Laboratoire de Réseaux et Systèmes Multimédia - Université d'Evry-Val d'Essonne
John Strassner - Autonomic Research Lab - Motorola Labs
Mícheál Ó Foghlú - Telecommunications Software and Systems Group - Waterford Institute of Technology
Elyes Lehtihet 'elehtihet@tssg.org'
Constructs
Unified Modeling Language (UML2) Superstructure
Operation::elements_public_or_private self.ownedElements->forAll(e | e.visibility->notEmpty() implies e.visbility = #public or e.visibility = #private)
Operation::visibleMembers member->select( m | self.makesVisible(m))
Operation::makesVisible el.visibility->isEmpty() or el.visibility = #public
Operation::inherit inhs->excluding(inh | ownedMember->select(oclIsKindOf(RedefinableElement))->select(redefinedElement->includes(inh)))
Operation::type_of_result if returnResult->size() = 1 then type = returnResult.type else type = nil endif
Operation::isOrdered if returnResult->size() = 1 then returnResult->any().isOrdered else false endif
Operation::isUnique if returnResult->size() = 1 then returnResult->any().isUnique else true endif
Operation::lower if returnResult->size() = 1 then returnResult->any().lower else Set{} endif
Operation::upper if returnResult->size() = 1 then returnResult->any().upper else Set{} endif
Operation::type if returnResult->size() = 1 then returnResult->any().type else Set{} endif
Operation::only_body_for_query bodyCondition->notEmpty() implies isQuery
Operation::isConsistentWith (redefinee.oclIsKindOf(Operation) and let op: Operation = redefinee.oclAsType(Operation) in self.formalParameter.size() = op.formalParameter.size() and self.returnResult.size() = op.returnResult.size() and forAll(i | op.formalParameter[i].type.conformsTo(self.formalParameter[i].type)) and forAll(i | op.returnResult[i].type.conformsTo(self.returnResult[i].type)) )
Operation::conformsTo (self=other) or (self.allParents()->includes(other))
Operation::public_or_private self.visibility = #public or self.visibility = #private
Operation::visibility_public_or_private self.visibility = #public or self.visibility = #private
Operation::imported_element_is_public self.importedElement.visibility.notEmpty() implies self.importedElement.visibility = #public
Operation::getName if self.alias->notEmpty() then self.alias else self.importedElement.name endif
Operation::isDistinguishableFrom if n.oclIsKindOf(BehavioralFeature) then if ns.getNamesOfMember(self)->intersection(ns.getNamesOfMember(n))->notEmpty() then Set{}->include(self)->include(n)->isUnique( bf | bf.parameter->collect(type)) else true endif else true endif
Operation::opposite_is_other_end opposite = if owningAssociation->notEmpty() and association.memberEnd->size() = 2 then let otherEnd = (association.memberEnd - self)->any() in if otherEnd.owningAssociation->notEmpty then otherEnd else Set{} endif else Set {} endif
Operation::opposite if owningAssociation->notEmpty() and association.memberEnd->size() = 2 then let otherEnd = (association.memberEnd - self)->any() in if otherEnd.owningAssociation->notEmpty then otherEnd else Set{} endif else Set {} endif
Operation::multiplicity_of_composite isComposite implies (upperBound()->isEmpty() or upperBound() <= 1)
Operation::subsetting_context subsettedProperty->notEmpty() implies (subsettingContext()->notEmpty() and subsettingContext()->forAll (sc | subsettedProperty->forAll(sp | sp.subsettingContext()->exists(c | sc.conformsTo(c)))))
Operation::navigable_property_redefinition (subsettedProperty->exists(sp | sp.class->notEmpty()) implies class->notEmpty()) and (redefinedProperty->exists(rp | rp.class->notEmpty()) implies class->notEmpty())
Operation::subsetting_rules subsettedProperty->forAll(sp | type.conformsTo(sp.type) and ((upperBound()->notEmpty() and sp.upperBound()->notEmpty()) implies upperBound()<=sp.upperBound() ))
Operation::navigable_readonly isReadOnly implies class->notEmpty()
Operation::derivedUnion_is_derived isDerivedUnion implies isDerived
Operation::isConsistentWith (redefinee.oclIsKindOf(Property) and let prop: Property = redefinee.oclAsType(Property) in type.conformsTo(prop.type) and (lowerBound()->notEmpty and prop.lowerBound()->notEmpty() implies lowerBound() >= prop.lowerBound()) and (upperBound()->notEmpty and prop.upperBound()->notEmpty() implies upperBound() <= prop.upperBound()) and (prop.isDerived implies isDerived))
Operation::subsettingContext if association->notEmpty() then association.endType-type else if classifier->notEmpty then Set{classifier} else Set{} endif endif
Operation::importedMember_derived self.importedMember->includesAll(self.importedMembers(self.elementImport.importedElement.asSet()->union(self.packageImport.importedPackage->collect(p | p.visibleMembers()))))
Operation::importedMember self.importedMembers(self.elementImport.importedElement.asSet()->union(self.packageImport.importedPackage->collect(p | p.visibleMembers())))
Operation::getNamesOfMember if self.ownedMember->includes(element) then Set{}->include(element.name) else let elementImports: ElementImport = self.elementImport->select(ei | ei.importedElement = element) in if elementImports->notEmpty() then elementImports->collect(el | el.getName()) else self.packageImport->select(pi | pi.importedPackage.visibleMembers()->includes(element))->collect(pi | pi.importedPackage.getNamesOfMember(element)) endif endif
Operation::importMembers self.excludeCollisions(imps)->select(imp | self.ownedMember->forAll(mem | mem.imp.isDistinguishableFrom(mem, self)))
Operation::excludeCollisions imps->reject(imp1 | imps.exists(imp2 | not imp1.isDistinguishableFrom(imp2, self)))
union, subsets member, subsets ownedElement
ordered, subsets memberEnd, subsets feature, subsets ownedMember
subsets association, subsets namespace, subsets featuringClassifier
ordered, subsets feature, subsets ownedMember
subsets redefinitionContext, subsets namespace, subsets featuringClassifier
ordered subsets feature, subsets ownedMember
ordered, subsets attribute, subsets ownedMember
subsets namespace, subsets featuringClassifier, subsets classifier
ordered subsets attribute, subsets ownedMember