-- @atlcompiler emftvm -- @nsURI UML2=http://www.eclipse.org/uml2/3.0.0/UML -- $Id:UML2Comparison.atl 7084 2007-07-10 13:19:05Z dwagelaa $ -- Library for comparing a UML2 model to other versions of the UML2 model library UML2Comparison; uses UML2; -- ====================================================================== -- helper attributes begin -- ====================================================================== helper def : UML2ComparisonVersionString : String = '$Id$'; -- All Package instances helper def : allPackages : Set(UML2!"uml::Package") = UML2!"uml::Package".allInstances(); -- Name of the first Model in IN helper def : modelName : String = UML2!"uml::Model".allInstancesFrom('IN')->asSequence()->first().name; -- ====================================================================== -- general context helper attributes begin -- ====================================================================== -- ------------------------ prefix -------------------------------------- helper context String def : prefix : String = '[' + self + '] '; -- ------------------------ umlQualifiedName ---------------------------- -- The UML '::' separated qualified name for elements that are -- contained in a Package (exact) or a Classifier, the simple name otherwise. helper context UML2!"uml::NamedElement" def : umlQualifiedName : String = let owner : UML2!"uml::Element" = self.owner in if owner.oclIsTypeOf(UML2!"uml::Package") or owner.oclIsKindOf(UML2!"uml::Classifier") then owner.umlQualifiedName + '::' + self.name else self.name endif; -- The UML '::' separated qualified name for elements that are -- contained in a Package (exact) or a Classifier, the simple name otherwise. helper context UML2!"uml::Feature" def : umlQualifiedName : String = self.name; -- ------------------------ allOwnedPackages ---------------------------- -- The transitive closure of contained Packages, excluding inferred packages. helper context UML2!"uml::Package" def : allOwnedPackages : Sequence(UML2!"uml::Package") = self.allOwnedElements() ->reject(e|e.isInferred) ->select(o|o.oclIsKindOf(UML2!"uml::Package")); -- ------------------------ allOwnedClassifiers ------------------------- -- The transitive closure of contained Classifiers, excluding inferred Classifiers. helper context UML2!"uml::Package" def : allOwnedClassifiers : Sequence(UML2!"uml::Classifier") = self.allOwnedElements() ->reject(e|e.isInferred) ->select(o|o.oclIsKindOf(UML2!"uml::Classifier")) ->select(c|c.getNearestPackage() = self); -- The transitive closure of contained Classifiers, excluding inferred Classifiers. helper context UML2!"uml::Classifier" def : allOwnedClassifiers : Sequence(UML2!"uml::Classifier") = self.allOwnedElements() ->reject(e|e.isInferred) ->select(o|o.oclIsKindOf(UML2!"uml::Classifier")); -- ------------------------ myOclType ----------------------------------- -- Same as oclType(), except DataType becomes Classifier. -- Jar2UML uses DataType to represent inferred Classifier instances -- of which it isn't known whether they are Classes or Interfaces. helper context UML2!"uml::Element" def : myOclType : OclType = let type : OclType = self.oclType() in if type = UML2!"uml::DataType" then UML2!"uml::Classifier" else type endif; -- ------------------------ isInferred ---------------------------------- -- True iff self or its container is annotated with an inferred tag. helper context OclAny def : isInferred : Boolean = not self.oclIsUndefined() and self.refImmediateComposite().isInferred; -- True iff self or its container is annotated with an inferred tag. helper context UML2!"ecore::EModelElement" def : isInferred : Boolean = let ann : UML2!"ecore::EAnnotation" = self.jar2umlAnnotation in (not ann.oclIsUndefined() and ann.details->exists(d|d.key='inferred' and d.value='true')) or self.refImmediateComposite().isInferred; -- ------------------------ allOther -------------------------------------- -- All non-inferred Models except self. helper context UML2!"uml::Model" def : allOther : Sequence(UML2!"uml::Model") = thisModule.allPackages ->reject(p|p=self or p.isInferred) ->select(p|p.oclIsKindOf(UML2!"uml::Model")); -- All non-inferred Packages except self. helper context UML2!"uml::Package" def : allOther : Sequence(UML2!"uml::Package") = thisModule.allPackages ->reject(p|p=self or p.isInferred); -- ------------------------ jar2umlAnnotation ----------------------------- -- The "Jar2UML" EAnnotation, if any. helper context UML2!"ecore::EModelElement" def : jar2umlAnnotation : UML2!"ecore::EAnnotation" = self.getEAnnotation('Jar2UML'); -- ------------------------ bytecodeMajorVersion -------------------------- -- The bytecode format major version specified for the API library. helper context UML2!"uml::Model" def : bytecodeMajorVersion : Integer = self.jar2umlAnnotation.details->any(d|d.key='majorBytecodeFormatVersion').value; -- ------------------------ bytecodeMinorVersion ------------------------ -- The bytecode format minor version specified for the API library. helper context UML2!"uml::Model" def : bytecodeMinorVersion : Integer = self.jar2umlAnnotation.details->any(d|d.key='minorBytecodeFormatVersion').value; -- ------------------------ bytecodePreverified ------------------------- -- Whether the bytecode for the API library was preverified. helper context UML2!"uml::Model" def : bytecodePreverified : Boolean = self.jar2umlAnnotation.details->any(d|d.key='preverified').value = 'true'; -- ====================================================================== -- helper attributes for determining compatibility -- ====================================================================== -- ------------------------ generals ------------------------------------ -- Non-inferred general classifiers helper context UML2!"uml::Classifier" def : generals : Sequence(UML2!"uml::Classifier") = self.general->reject(g|g.isInferred); -- ------------------------ suppl --------------------------------------- -- Named Dependency suppliers and extended Interfaces. helper context UML2!"uml::Interface" def : suppl : Set(UML2!"uml::NamedElement") = self.clientDependency->collect(d|d.supplier ->reject(n|n.name.oclIsUndefined()) )->flatten() ->union(self.general)->asSet(); -- Named Dependency suppliers. helper context UML2!"uml::NamedElement" def : suppl : Set(UML2!"uml::NamedElement") = self.clientDependency->collect(d|d.supplier ->reject(n|n.name.oclIsUndefined()) )->flatten()->asSet(); -- ------------------------ suppliers ----------------------------------- -- Non-inferred, named Dependency suppliers. helper context UML2!"uml::NamedElement" def : suppliers : Set(UML2!"uml::NamedElement") = self.suppl->reject(s|s.isInferred); -- ------------------------ features ------------------------------------ -- Non-inferred features of self. helper context UML2!"uml::Classifier" def : features : Sequence(UML2!"uml::Feature") = self.feature->reject(f|f.isInferred); -- ------------------------ allSuppliers -------------------------------- -- Transitive closure of named Dependency suppliers, minus the inferred elements. helper context UML2!"uml::NamedElement" def : allSuppliers : Set(UML2!"uml::NamedElement") = self.suppliers->union( self.suppl->collect(s|s.allSuppliers)->flatten())->asSet(); -- ------------------------ allFeatures --------------------------------- -- All features of self, including any inherited or interface features. helper context UML2!"uml::Classifier" def : allFeatures : Set(UML2!"uml::Feature") = self.features->asSet() ->union( self.allGenerals ->collect(c|c.features)->flatten()) ->union( self.allSuppliers ->select(s|s.oclIsKindOf(UML2!"uml::Classifier")) ->collect(c|c.features)->flatten()); -- ------------------------ allGenerals --------------------------------- -- Transitive closure of general classifiers, minus the inferred classifiers helper context UML2!"uml::Classifier" def : allGenerals : Set(UML2!"uml::Classifier") = self.generals->union( self.general->collect(c|c.allGenerals)->flatten())->asSet(); -- ------------------------ compatibleInPrev ---------------------------- -- All Models X other than self for which self is compatible with X. helper context UML2!"uml::Model" def : compatibleInPrev : Sequence(UML2!"uml::Model") = self.allOther ->select(m|self.hasAllPackagesCompatibleWith(m)) .debug(thisModule.modelName.prefix + self.qualifiedName + ' compatible models'); -- All Packages X other than self for which self is compatible with X helper context UML2!"uml::Package" def : compatibleInPrev : Sequence(UML2!"uml::Package") = self.locallyCompatibleInPrev ->select(p|self.hasElementsCompatibleWith(p)) .debug(thisModule.modelName.prefix + self.qualifiedName + ' compatible packages'); -- All Classifiers X other than self for which self is compatible with X. helper context UML2!"uml::Classifier" def : compatibleInPrev : Sequence(UML2!"uml::Classifier") = self.locallyCompatibleInPrev ->select(c|self.isCompatibleWith(c)); -- ------------------------ equivalentInPrev ---------------------------- -- All Models X other than self for which self is equivalent with X. helper context UML2!"uml::Model" def : equivalentInPrev : Sequence(UML2!"uml::Model") = self.allOther ->select(m|self.hasAllPackagesEquivalentWith(m) and m.hasAllPackagesEquivalentWith(self)) .debug(thisModule.modelName.prefix + self.qualifiedName + ' equivalent models'); -- All Packages X other than self for which self is equivalent with X helper context UML2!"uml::Package" def : equivalentInPrev : Sequence(UML2!"uml::Package") = self.compatibleInPrev->select(p|p.isCompatibleWith(self)) .debug(thisModule.modelName.prefix + self.qualifiedName + ' equivalent packages'); -- All Classifiers X other than self for which self is compatible with X and X is compatible with self. helper context UML2!"uml::Classifier" def : equivalentInPrev : Sequence(UML2!"uml::Classifier") = self.compatibleInPrev->select(c|c.isCompatibleWith(self)); -- ------------------------ locallyCompatibleInPrev --------------------- -- All Packages X other than self for which self is locally compatible with X, -- where locally compatible means compatible without considering any contained elements. helper context UML2!"uml::Package" def : locallyCompatibleInPrev : Sequence(UML2!"uml::Package") = self.allOther ->select(p|self.isLocallyCompatibleWith(p)); -- All Classifiers X other than self for which self is locally compatible with X, -- where locally compatible means compatible without considering any contained elements. helper context UML2!"uml::Classifier" def : locallyCompatibleInPrev : Sequence(UML2!"uml::Classifier") = self.getNearestPackage().locallyCompatibleInPrev ->collect(p1|p1.allOwnedClassifiers)->flatten() ->select(c|self.isLocallyCompatibleWith(c)); -- ------------------------ bytecodeCompatibleInPrev -------------------- -- All Models other than self that have a bytecode format that is supported by self helper context UML2!"uml::Model" def : bytecodeCompatibleInPrev : Sequence(UML2!"uml::Model") = self.allOther->select(m|self.bytecodeSupportCompatibleWith(m)); -- ------------------------ bytecodeEquivalentInPrev -------------------- -- All Models other than self that have the same bytecode format helper context UML2!"uml::Model" def : bytecodeEquivalentInPrev : Sequence(UML2!"uml::Model") = self.bytecodeCompatibleInPrev->select(m|m.bytecodeSupportCompatibleWith(self)); -- ====================================================================== -- helper attributes end -- ====================================================================== -- ====================================================================== -- helper methods for determining compatibility -- ====================================================================== -- ------------------------ allPackagesLocallyIncompatibleWith ---------- -- All Packages X contained in m for which self does not contain -- a Package that is locally compatible with X, -- where locally compatible means compatible without considering any contained elements. helper context UML2!"uml::Model" def : allPackagesLocallyIncompatibleWith(m : UML2!"uml::Model") : Sequence(UML2!"uml::Package") = m.allOwnedPackages->select(p|not self.hasPackageLocallyCompatibleWith(p)); -- ------------------------ allPackagesIncompatibleWith ----------------- -- All Packages X contained in m for which self does not contain -- a Package that is compatible with X. helper context UML2!"uml::Model" def : allPackagesIncompatibleWith(m : UML2!"uml::Model") : Sequence(UML2!"uml::Package") = m.allOwnedPackages->select(p|not self.hasPackageCompatibleWith(p)); -- ------------------------ hasAllPackagesCompatibleWith ---------------- -- True iff for all Packages X contained in m, self has a Package Y that is compatible with X. helper context UML2!"uml::Model" def : hasAllPackagesCompatibleWith(m : UML2!"uml::Model") : Boolean = let compPackages : Sequence(UML2!"uml::Package") = self.allPackagesIncompatibleWith(m) in compPackages->isEmpty() or compPackages.debug(thisModule.modelName.prefix + self.qualifiedName + ' misses packages compatible with ')->isEmpty(); -- ------------------------ hasAllPackagesEquivalentWith ---------------- -- True iff for all Packages X contained in m, self has a Package Y that is equivalent with X. helper context UML2!"uml::Model" def : hasAllPackagesEquivalentWith(m : UML2!"uml::Model") : Boolean = let equivPackages : Sequence(UML2!"uml::Package") = m.allOwnedPackages ->select(p|not self.hasPackageEquivalentWith(p)) in equivPackages->isEmpty() or equivPackages.debug(thisModule.modelName.prefix + self.qualifiedName + ' misses packages equivalent with ')->isEmpty(); -- ------------------------ hasPackageLocallyCompatibleWith ----------- -- True iff self (transitively) contains a Package that is locally compatible with p, -- where locally compatible means compatible without considering any contained elements. helper context UML2!"uml::Model" def : hasPackageLocallyCompatibleWith(p : UML2!"uml::Package") : Boolean = self.allOwnedPackages ->exists(sp|sp.locallyCompatibleInPrev->includes(p)); -- ------------------------ hasPackageCompatibleWith -------------------- -- True iff self (transitively) contains a Package that is compatible with p. helper context UML2!"uml::Model" def : hasPackageCompatibleWith(p : UML2!"uml::Package") : Boolean = self.allOwnedPackages ->exists(sp|sp.compatibleInPrev->includes(p)); -- ------------------------ hasPackageEquivalentWith -------------------- -- True iff self (transitively) contains a Package that is equivalent with p. helper context UML2!"uml::Model" def : hasPackageEquivalentWith(p : UML2!"uml::Package") : Boolean = self.allOwnedPackages ->select(sp|sp.equivalentInPrev->includes(p))->notEmpty(); -- ------------------------ isCompatibleWith ---------------------------- -- True iff self is compatible with e. helper context UML2!"uml::NamedElement" def : isCompatibleWith(e : UML2!"uml::NamedElement") : Boolean = self.isLocallyCompatibleWith(e) and self.hasElementsCompatibleWith(e); -- ------------------------ isLocallyCompatibleWith --------------------- -- True iff self is locally compatible with p, -- where locally compatible means compatible without considering any contained elements. helper context UML2!"uml::Parameter" def : isLocallyCompatibleWith(p : UML2!"uml::Parameter") : Boolean = not p.oclIsUndefined() and -- parameter name should be ignored self.myOclType.conformsTo(p.myOclType) and self.direction = p.direction and if self.type.oclIsUndefined() then p.type.oclIsUndefined() else not p.type.oclIsUndefined() and self.type.umlQualifiedName = p.type.umlQualifiedName endif; -- True iff self is locally compatible with t, -- where locally compatible means compatible without considering any contained elements. helper context UML2!"uml::TypedElement" def : isLocallyCompatibleWith(t : UML2!"uml::TypedElement") : Boolean = super.isLocallyCompatibleWith(t) and if self.type.oclIsUndefined() then t.type.oclIsUndefined() else not t.type.oclIsUndefined() and self.type.umlQualifiedName = t.type.umlQualifiedName endif; -- True iff self is locally compatible with e, -- where locally compatible means compatible without considering any contained elements. helper context UML2!"uml::NamedElement" def : isLocallyCompatibleWith(e : UML2!"uml::NamedElement") : Boolean = self.umlQualifiedName = e.umlQualifiedName and self.myOclType.conformsTo(e.myOclType); -- ------------------------ hasElementsCompatibleWith ------------------- -- True iff for all elements X contained by p there exists an element Y contained by self -- that is compatible with X. helper context UML2!"uml::Package" def : hasElementsCompatibleWith(p : UML2!"uml::Package") : Boolean = super.hasElementsCompatibleWith(p) and (let compClassifiers : Sequence(UML2!"uml::Classifier") = p.allOwnedClassifiers->reject(c|self.hasOwnedClassifierCompatibleWith(c)) in compClassifiers->isEmpty() or compClassifiers.debug(thisModule.modelName.prefix + self.qualifiedName + ' misses classifiers compatible with ')->isEmpty()); -- True iff for all elements X contained by c there exists an element Y contained by self -- that is compatible with X. helper context UML2!"uml::Classifier" def : hasElementsCompatibleWith(c : UML2!"uml::Classifier") : Boolean = (self.isAbstract implies c.isAbstract) and (self.isLeaf implies c.isLeaf) and super.hasElementsCompatibleWith(c) and (let compGenerals : Sequence(UML2!"uml::Classifier") = self.allGeneralsIncompatibleWith(c) in compGenerals->isEmpty() or compGenerals.debug(thisModule.modelName.prefix + self.qualifiedName + ' misses generals compatible with ')->isEmpty()) and (let compFeatures : Sequence(UML2!"uml::Feature") = self.allFeaturesIncompatibleWith(c) in compFeatures->isEmpty() or compFeatures.debug(thisModule.modelName.prefix + self.qualifiedName + ' misses features compatible with ')->isEmpty()); -- True iff for all elements X contained by f there exists an element Y contained by self -- that is compatible with X. helper context UML2!"uml::StructuralFeature" def : hasElementsCompatibleWith(f : UML2!"uml::StructuralFeature") : Boolean = (self.isStatic = f.isStatic) and (self.isReadOnly implies f.isReadOnly) and (self.isLeaf implies f.isLeaf) and super.hasElementsCompatibleWith(f); -- True iff for all elements X contained by f there exists an element Y contained by self -- that is compatible with X. helper context UML2!"uml::BehavioralFeature" def : hasElementsCompatibleWith(f : UML2!"uml::BehavioralFeature") : Boolean = (self.isStatic = f.isStatic) and (self.isAbstract implies f.isAbstract) and (self.isLeaf implies f.isLeaf) and super.hasElementsCompatibleWith(f) and (self.ownedParameter->size() = f.ownedParameter->size()) and thisModule.compatibleParameters(self.ownedParameter, f.ownedParameter); -- True iff for all elements X contained by e there exists an element Y contained by self -- that is compatible with X. helper context UML2!"uml::NamedElement" def : hasElementsCompatibleWith(e : UML2!"uml::NamedElement") : Boolean = self.visibilityIsCompatibleWith(e) and (let compSuppliers : Sequence(UML2!"uml::NamedElement") = self.allSuppliersIncompatibleWith(e) in compSuppliers->isEmpty() or compSuppliers.debug(thisModule.modelName.prefix + self.qualifiedName + ' misses dependency suppliers compatible with ')->isEmpty()); -- ------------------------ allOwnedClassifiersLocallyIncompatibleWith -- -- All Classifiers X (transitively) contained by p, for which there exists -- no Classifier Y (transitively) contained by self that is locally compatible with X, -- where locally compatible means compatible without considering any contained elements. helper context UML2!"uml::Package" def : allOwnedClassifiersLocallyIncompatibleWith(p : UML2!"uml::Package") : Sequence(UML2!"uml::Classifier") = p.allOwnedClassifiers->reject(c|self.hasOwnedClassifierLocallyCompatibleWith(c)); -- ------------------------ allOwnedClassifiersIncompatibleWith --------- -- All Classifiers X (transitively) contained by p, for which there exists -- no Classifier Y (transitively) contained by self that is compatible with X. helper context UML2!"uml::Package" def : allOwnedClassifiersIncompatibleWith(p : UML2!"uml::Package") : Sequence(UML2!"uml::Classifier") = p.allOwnedClassifiers->reject(c|self.hasOwnedClassifierCompatibleWith(c)); -- ------------------------ hasOwnedClassifierLocallyCompatibleWith ----- -- True iff there exists a Classifier contained by self that is locally compatible with c, -- where locally compatible means compatible without considering any contained elements. helper context UML2!"uml::Package" def : hasOwnedClassifierLocallyCompatibleWith(c : UML2!"uml::Classifier") : Boolean = self.allOwnedClassifiers->exists(o|o.isLocallyCompatibleWith(c)); -- ------------------------ hasOwnedClassifierCompatibleWith ------------ -- True iff there exists a Classifier contained by self that is compatible with c. helper context UML2!"uml::Package" def : hasOwnedClassifierCompatibleWith(c : UML2!"uml::Classifier") : Boolean = self.allOwnedClassifiers->exists(o|o.isCompatibleWith(c)); -- ------------------------ allGeneralsIncompatibleWith ----------------- -- All general Classifiers X of c, for which there exists no general Classifier Y of self -- that is compatible with X. helper context UML2!"uml::Classifier" def : allGeneralsIncompatibleWith(c : UML2!"uml::Classifier") : Sequence(UML2!"uml::Classifier") = c.allGenerals->reject(g|self.hasGeneralCompatibleWith(g)); -- ------------------------ hasGeneralCompatibleWith -------------------- helper context UML2!"uml::Classifier" def : hasGeneralCompatibleWith(c : UML2!"uml::Classifier") : Boolean = self.allGenerals->exists(g|g.umlQualifiedName = c.umlQualifiedName); -- ------------------------ allFeaturesLocallyIncompatibleWith ---------- -- All Features X of c, for which there exists no Feature Y of self -- that is locally compatible with X, -- where locally compatible means compatible without considering any contained elements. helper context UML2!"uml::Classifier" def : allFeaturesLocallyIncompatibleWith(c : UML2!"uml::Classifier") : Sequence(UML2!"uml::Feature") = c.allFeatures->reject(f|self.hasFeatureLocallyCompatibleWith(f)); -- ------------------------ allFeaturesIncompatibleWith ----------------- -- All Features X of c, for which there exists no Feature Y of self -- that is compatible with X. helper context UML2!"uml::Classifier" def : allFeaturesIncompatibleWith(c : UML2!"uml::Classifier") : Sequence(UML2!"uml::Feature") = c.allFeatures->reject(f|self.hasFeatureCompatibleWith(f)); -- ------------------------ hasFeatureLocallyCompatibleWith ------------- -- True iff self contains a Feature that is locally compatible with f, -- where locally compatible means compatible without considering any contained elements. helper context UML2!"uml::Classifier" def : hasFeatureLocallyCompatibleWith(f : UML2!"uml::Feature") : Boolean = self.allFeatures->exists(o|o.isLocallyCompatibleWith(f)); -- ------------------------ hasFeatureCompatibleWith -------------------- -- True iff self contains a Feature that is compatible with f. helper context UML2!"uml::Classifier" def : hasFeatureCompatibleWith(f : UML2!"uml::Feature") : Boolean = self.allFeatures->exists(o|o.isCompatibleWith(f)); -- ------------------------ compatibleParameters ------------------------ -- True iff for all O in otherpars, the matching S in selfpars is compatible with O. helper def : compatibleParameters(selfpars : Sequence(UML2!"uml::Parameter"), otherpars : Sequence(UML2!"uml::Parameter")) : Boolean = if selfpars.isEmpty() or otherpars.isEmpty() then selfpars.isEmpty() and otherpars.isEmpty() else let selfpar : UML2!"uml::Parameter" = selfpars->first() in let otherpar : UML2!"uml::Parameter" = otherpars->first() in if selfpar.oclIsUndefined() then otherpar.oclIsUndefined() else selfpar.isCompatibleWith(otherpar) and thisModule.compatibleParameters( selfpars->excluding(selfpar), otherpars->excluding(otherpar)) endif endif; -- ------------------------ visibilityIsCompatibleWith ------------------ -- True iff the visibility of self is compatible with the visibility of e. helper context UML2!"uml::NamedElement" def : visibilityIsCompatibleWith(e : UML2!"uml::NamedElement") : Boolean = self.visibility = #public or if self.visibility = #protected then (e.visibility = #protected) or (e.visibility = #private) else if self.visibility = #package then (e.visibility = #package) or (e.visibility = #private) else self.visibility = e.visibility endif endif; -- ------------------------ allSuppliersIncompatibleWith ---------------- -- All suppliers X from e, for which self has no supplier Y that is compatible with X. helper context UML2!"uml::NamedElement" def : allSuppliersIncompatibleWith(e : UML2!"uml::NamedElement") : Sequence(UML2!"uml::NamedElement") = e.allSuppliers->reject(d|self.hasSupplierCompatibleWith(d)); -- ------------------------ hasSupplierCompatibleWith ------------------- -- True iff self, or one of its generals, has a supplier that is compatible with e. helper context UML2!"uml::Classifier" def : hasSupplierCompatibleWith(e : UML2!"uml::NamedElement") : Boolean = super.hasSupplierCompatibleWith(e) or self.general->exists(g|g.hasSupplierCompatibleWith(e)); -- True iff self has a supplier that is compatible with e. helper context UML2!"uml::NamedElement" def : hasSupplierCompatibleWith(e : UML2!"uml::NamedElement") : Boolean = self.allSuppliers ->exists(s|s.umlQualifiedName = e.umlQualifiedName); -- ------------------------ bytecodeSupportCompatibleWith --------------- -- True iff self also supports the bytecode format of m helper context UML2!"uml::Model" def : bytecodeSupportCompatibleWith(m : UML2!"uml::Model") : Boolean = (self.bytecodeMajorVersion >= m.bytecodeMajorVersion) and (self.bytecodePreverified implies m.bytecodePreverified); -- ====================================================================== -- helper methods end -- ======================================================================