Search in sources :

Example 1 with ModeTransitionInstance

use of org.osate.aadl2.instance.ModeTransitionInstance in project osate2 by osate.

the class InstantiateModel method instantiateFlowSpecs.

/**
 * same method but with different name exists in createEndToEndFlowSwitch.
 * It adds the flow instances on demand when ETEF is created
 * @param ci
 */
private void instantiateFlowSpecs(ComponentInstance ci) throws InterruptedException {
    for (FlowSpecification spec : getComponentType(ci).getAllFlowSpecifications()) {
        if (monitor.isCanceled()) {
            throw new InterruptedException();
        }
        FlowSpecificationInstance speci = ci.createFlowSpecification();
        speci.setName(spec.getName());
        speci.setFlowSpecification(spec);
        FlowEnd inend = spec.getAllInEnd();
        if (inend != null) {
            Feature srcfp = inend.getFeature();
            Context srcpg = inend.getContext();
            if (srcpg == null) {
                FeatureInstance fi = ci.findFeatureInstance(srcfp);
                if (fi != null) {
                    speci.setSource(fi);
                }
            } else if (srcpg instanceof FeatureGroup) {
                FeatureInstance pgi = ci.findFeatureInstance((FeatureGroup) srcpg);
                if (pgi != null) {
                    FeatureInstance fi = pgi.findFeatureInstance(srcfp);
                    if (fi != null) {
                        speci.setSource(fi);
                    }
                }
            }
        }
        FlowEnd outend = spec.getAllOutEnd();
        if (outend != null) {
            Feature dstfp = outend.getFeature();
            Context dstpg = outend.getContext();
            if (dstpg == null) {
                FeatureInstance fi = ci.findFeatureInstance(dstfp);
                if (fi != null) {
                    speci.setDestination(fi);
                }
            } else if (dstpg instanceof FeatureGroup) {
                FeatureInstance pgi = ci.findFeatureInstance((FeatureGroup) dstpg);
                if (pgi != null) {
                    FeatureInstance fi = pgi.findFeatureInstance(dstfp);
                    if (fi != null) {
                        speci.setDestination(fi);
                    }
                }
            }
        }
        for (Mode mode : spec.getAllInModes()) {
            if (monitor.isCanceled()) {
                throw new InterruptedException();
            }
            ModeInstance mi = ci.findModeInstance(mode);
            if (mi != null) {
                speci.getInModes().add(mi);
            }
        }
        for (ModeTransition mt : spec.getInModeTransitions()) {
            if (monitor.isCanceled()) {
                throw new InterruptedException();
            }
            ModeTransitionInstance ti = ci.findModeTransitionInstance(mt);
            if (ti != null) {
                speci.getInModeTransitions().add(ti);
            }
        }
    }
}
Also used : Context(org.osate.aadl2.Context) IScopeContext(org.eclipse.core.runtime.preferences.IScopeContext) ModeInstance(org.osate.aadl2.instance.ModeInstance) FeatureGroup(org.osate.aadl2.FeatureGroup) FlowSpecification(org.osate.aadl2.FlowSpecification) FeatureInstance(org.osate.aadl2.instance.FeatureInstance) Mode(org.osate.aadl2.Mode) SystemOperationMode(org.osate.aadl2.instance.SystemOperationMode) ModeTransition(org.osate.aadl2.ModeTransition) ModeTransitionInstance(org.osate.aadl2.instance.ModeTransitionInstance) FlowSpecificationInstance(org.osate.aadl2.instance.FlowSpecificationInstance) Feature(org.osate.aadl2.Feature) DirectedFeature(org.osate.aadl2.DirectedFeature) FlowEnd(org.osate.aadl2.FlowEnd)

Example 2 with ModeTransitionInstance

use of org.osate.aadl2.instance.ModeTransitionInstance in project osate2 by osate.

the class CreateConnectionsSwitch method doModeTransitionConnections.

/**
 * As we are following connection declarations we need to check whether the
 * destination of the connection is named in one of the mode transitions of
 * the component instance that is the destination of the connection being
 * added
 *
 * @param parentci
 *            The component that is the context in which the connections are
 *            declared
 * @param pci
 *            PortConnectionInstance that is being created
 * @param conn
 *            connection being added to the ConnectionInstance
 * @return true if we created a ModetransitionInstance
 */
private boolean doModeTransitionConnections(final ComponentInstance parentci, ConnectionInfo connInfo, Connection conn) {
    boolean didTransition = false;
    if (!(conn instanceof PortConnection || conn instanceof FeatureGroupConnection)) {
        return false;
    }
    ComponentInstance parent = null;
    Context fc = conn.getAllDestinationContext();
    Element connContext = null;
    if (fc instanceof ComponentImplementation || fc instanceof FeatureGroup) {
        // we
        // have
        // an
        // outgoing
        // connection
        parent = (ComponentInstance) parentci.eContainer();
        connContext = parentci.getSubcomponent();
    } else if (fc instanceof Subcomponent) {
        parent = parentci.findSubcomponentInstance((Subcomponent) fc);
        connContext = ((Subcomponent) fc).getAllClassifier();
    }
    if (parent == null) {
        return false;
    }
    EList<ModeTransitionInstance> mtl = parent.getModeTransitionInstances();
    Feature f = (Feature) conn.getAllDestination();
    for (ModeTransitionInstance mti : mtl) {
        ModeTransition mt = mti.getModeTransition();
        Context co = null;
        for (ModeTransitionTrigger trigger : mt.getOwnedTriggers()) {
            TriggerPort tp = trigger.getTriggerPort();
            if (tp instanceof Port) {
                Port o = (Port) tp;
                co = trigger.getContext();
                NamedElement context = co;
                if (context instanceof FeatureGroup) {
                    context = parent.getSubcomponent().getAllClassifier();
                }
                if (f == o && context == connContext) {
                    final ConnectionInstance mtci = addConnectionInstance(parentci.getSystemInstance(), connInfo.convertToModeTransition(), mti);
                    fillInModes(mtci);
                    fillInModeTransitions(mtci);
                    didTransition = true;
                }
            } else {
            // TODO-LW: what if it's a processor port or internal event?
            }
        }
    }
    return didTransition;
}
Also used : Context(org.osate.aadl2.Context) ComponentImplementation(org.osate.aadl2.ComponentImplementation) ConnectionInstance(org.osate.aadl2.instance.ConnectionInstance) FeatureGroup(org.osate.aadl2.FeatureGroup) Element(org.osate.aadl2.Element) NamedElement(org.osate.aadl2.NamedElement) ConnectedElement(org.osate.aadl2.ConnectedElement) Port(org.osate.aadl2.Port) TriggerPort(org.osate.aadl2.TriggerPort) TriggerPort(org.osate.aadl2.TriggerPort) ModeTransition(org.osate.aadl2.ModeTransition) ModeTransitionInstance(org.osate.aadl2.instance.ModeTransitionInstance) InternalFeature(org.osate.aadl2.InternalFeature) ProcessorFeature(org.osate.aadl2.ProcessorFeature) Feature(org.osate.aadl2.Feature) PortConnection(org.osate.aadl2.PortConnection) FeatureGroupConnection(org.osate.aadl2.FeatureGroupConnection) SubprogramSubcomponent(org.osate.aadl2.SubprogramSubcomponent) DataSubcomponent(org.osate.aadl2.DataSubcomponent) Subcomponent(org.osate.aadl2.Subcomponent) ComponentInstance(org.osate.aadl2.instance.ComponentInstance) NamedElement(org.osate.aadl2.NamedElement) ModeTransitionTrigger(org.osate.aadl2.ModeTransitionTrigger)

Example 3 with ModeTransitionInstance

use of org.osate.aadl2.instance.ModeTransitionInstance in project osate2 by osate.

the class CreateConnectionsSwitch method doModeTransitionConnections.

// ------------------------------------------------------------------------
// Methods related to mode transition connections
// ------------------------------------------------------------------------
/**
 * handles the situation that a mode transition may name an event port in a
 * thread (or other leaf component instance) and that port is not the
 * destination of a connection instance - it is the start of a connection
 * instance
 *
 * @param ci
 *            ComponentInstance
 * @param fi
 *            FeatureInstance
 * @return true if we created a ModetransitionInstance
 */
private boolean doModeTransitionConnections(ComponentInstance ci, FeatureInstance fi) {
    boolean didTransition = false;
    if (fi.getCategory() == FeatureCategory.EVENT_PORT) {
        Subcomponent sub = ci.getSubcomponent();
        Feature f = fi.getFeature();
        for (ModeTransitionInstance mti : ci.getContainingComponentInstance().getModeTransitionInstances()) {
            for (ModeTransitionTrigger trigger : mti.getModeTransition().getOwnedTriggers()) {
                TriggerPort tp = trigger.getTriggerPort();
                if (tp instanceof Port) {
                    Port p = (Port) tp;
                    Context c = trigger.getContext();
                    if (f == p && c == sub) {
                        addConnectionInstance(ci.getSystemInstance(), ConnectionInfo.newModeTransition(fi), mti);
                        didTransition = true;
                    }
                } else {
                // TODO-LW: what if it's a processor port or internal
                // event?
                }
            }
        }
    }
    return didTransition;
}
Also used : Context(org.osate.aadl2.Context) SubprogramSubcomponent(org.osate.aadl2.SubprogramSubcomponent) DataSubcomponent(org.osate.aadl2.DataSubcomponent) Subcomponent(org.osate.aadl2.Subcomponent) Port(org.osate.aadl2.Port) TriggerPort(org.osate.aadl2.TriggerPort) TriggerPort(org.osate.aadl2.TriggerPort) ModeTransitionInstance(org.osate.aadl2.instance.ModeTransitionInstance) InternalFeature(org.osate.aadl2.InternalFeature) ProcessorFeature(org.osate.aadl2.ProcessorFeature) Feature(org.osate.aadl2.Feature) ModeTransitionTrigger(org.osate.aadl2.ModeTransitionTrigger)

Example 4 with ModeTransitionInstance

use of org.osate.aadl2.instance.ModeTransitionInstance in project osate2 by osate.

the class InstancePackageImpl method initializePackageContents.

/**
 * Complete the initialization of the package and its meta-model.  This
 * method is guarded to have no affect on any invocation but its first.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void initializePackageContents() {
    if (isInitialized) {
        return;
    }
    isInitialized = true;
    // Initialize package
    setName(eNAME);
    setNsPrefix(eNS_PREFIX);
    setNsURI(eNS_URI);
    // Obtain other dependent packages
    Aadl2Package theAadl2Package = (Aadl2Package) EPackage.Registry.INSTANCE.getEPackage(Aadl2Package.eNS_URI);
    // Create type parameters
    // Set bounds for type parameters
    // Add supertypes to classes
    featureInstanceEClass.getESuperTypes().add(getConnectionInstanceEnd());
    featureInstanceEClass.getESuperTypes().add(getInstanceObject());
    instanceObjectEClass.getESuperTypes().add(theAadl2Package.getNamedElement());
    annexInstanceEClass.getESuperTypes().add(theAadl2Package.getNamedElement());
    propertyAssociationInstanceEClass.getESuperTypes().add(theAadl2Package.getPropertyAssociation());
    connectionInstanceEndEClass.getESuperTypes().add(getInstanceObject());
    connectionInstanceEClass.getESuperTypes().add(getFlowElementInstance());
    flowElementInstanceEClass.getESuperTypes().add(getInstanceObject());
    systemOperationModeEClass.getESuperTypes().add(theAadl2Package.getMode());
    modeInstanceEClass.getESuperTypes().add(getInstanceObject());
    modeTransitionInstanceEClass.getESuperTypes().add(getConnectionInstanceEnd());
    modeTransitionInstanceEClass.getESuperTypes().add(getInstanceObject());
    connectionReferenceEClass.getESuperTypes().add(getInstanceObject());
    componentInstanceEClass.getESuperTypes().add(getConnectionInstanceEnd());
    componentInstanceEClass.getESuperTypes().add(getFlowElementInstance());
    flowSpecificationInstanceEClass.getESuperTypes().add(getFlowElementInstance());
    endToEndFlowInstanceEClass.getESuperTypes().add(getFlowElementInstance());
    systemInstanceEClass.getESuperTypes().add(getComponentInstance());
    instanceReferenceValueEClass.getESuperTypes().add(theAadl2Package.getPropertyValue());
    // Initialize classes and features; add operations and parameters
    initEClass(// $NON-NLS-1$
    featureInstanceEClass, // $NON-NLS-1$
    FeatureInstance.class, // $NON-NLS-1$
    "FeatureInstance", // $NON-NLS-1$
    !IS_ABSTRACT, // $NON-NLS-1$
    !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEReference(getFeatureInstance_SrcFlowSpec(), getFlowSpecificationInstance(), // $NON-NLS-1$
    getFlowSpecificationInstance_Source(), // $NON-NLS-1$
    "srcFlowSpec", // $NON-NLS-1$
    null, // $NON-NLS-1$
    0, // $NON-NLS-1$
    -1, // $NON-NLS-1$
    FeatureInstance.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEReference(getFeatureInstance_DstFlowSpec(), getFlowSpecificationInstance(), // $NON-NLS-1$
    getFlowSpecificationInstance_Destination(), // $NON-NLS-1$
    "dstFlowSpec", // $NON-NLS-1$
    null, // $NON-NLS-1$
    0, // $NON-NLS-1$
    -1, // $NON-NLS-1$
    FeatureInstance.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEReference(// $NON-NLS-1$
    getFeatureInstance_FeatureInstance(), // $NON-NLS-1$
    getFeatureInstance(), // $NON-NLS-1$
    null, // $NON-NLS-1$
    "featureInstance", // $NON-NLS-1$
    null, 0, -1, FeatureInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEAttribute(// $NON-NLS-1$
    getFeatureInstance_Category(), // $NON-NLS-1$
    getFeatureCategory(), // $NON-NLS-1$
    "category", // $NON-NLS-1$
    null, // $NON-NLS-1$
    1, // $NON-NLS-1$
    1, FeatureInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEAttribute(// $NON-NLS-1$
    getFeatureInstance_Direction(), // $NON-NLS-1$
    theAadl2Package.getDirectionType(), // $NON-NLS-1$
    "direction", // $NON-NLS-1$
    null, // $NON-NLS-1$
    1, // $NON-NLS-1$
    1, FeatureInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEReference(// $NON-NLS-1$
    getFeatureInstance_Feature(), // $NON-NLS-1$
    theAadl2Package.getFeature(), // $NON-NLS-1$
    null, // $NON-NLS-1$
    "feature", // $NON-NLS-1$
    null, // $NON-NLS-1$
    1, // $NON-NLS-1$
    1, FeatureInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEAttribute(// $NON-NLS-1$
    getFeatureInstance_Index(), // $NON-NLS-1$
    theAadl2Package.getInteger(), // $NON-NLS-1$
    "index", // $NON-NLS-1$
    null, // $NON-NLS-1$
    0, // $NON-NLS-1$
    1, FeatureInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEClass(// $NON-NLS-1$
    instanceObjectEClass, // $NON-NLS-1$
    InstanceObject.class, // $NON-NLS-1$
    "InstanceObject", // $NON-NLS-1$
    IS_ABSTRACT, // $NON-NLS-1$
    !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEReference(// $NON-NLS-1$
    getInstanceObject_AnnexInstance(), // $NON-NLS-1$
    getAnnexInstance(), // $NON-NLS-1$
    null, // $NON-NLS-1$
    "annexInstance", // $NON-NLS-1$
    null, // $NON-NLS-1$
    0, // $NON-NLS-1$
    -1, InstanceObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEClass(// $NON-NLS-1$
    annexInstanceEClass, // $NON-NLS-1$
    AnnexInstance.class, // $NON-NLS-1$
    "AnnexInstance", // $NON-NLS-1$
    IS_ABSTRACT, // $NON-NLS-1$
    !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEReference(// $NON-NLS-1$
    getAnnexInstance_AnnexSubclause(), // $NON-NLS-1$
    theAadl2Package.getAnnexSubclause(), // $NON-NLS-1$
    null, // $NON-NLS-1$
    "annexSubclause", null, 1, 1, AnnexInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEClass(// $NON-NLS-1$
    propertyAssociationInstanceEClass, // $NON-NLS-1$
    PropertyAssociationInstance.class, // $NON-NLS-1$
    "PropertyAssociationInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEReference(getPropertyAssociationInstance_PropertyAssociation(), theAadl2Package.getPropertyAssociation(), // $NON-NLS-1$
    null, // $NON-NLS-1$
    "propertyAssociation", // $NON-NLS-1$
    null, // $NON-NLS-1$
    0, // $NON-NLS-1$
    1, // $NON-NLS-1$
    PropertyAssociationInstance.class, // $NON-NLS-1$
    !IS_TRANSIENT, // $NON-NLS-1$
    !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEClass(// $NON-NLS-1$
    connectionInstanceEndEClass, // $NON-NLS-1$
    ConnectionInstanceEnd.class, // $NON-NLS-1$
    "ConnectionInstanceEnd", // $NON-NLS-1$
    IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEReference(getConnectionInstanceEnd_SrcConnectionInstance(), getConnectionInstance(), // $NON-NLS-1$
    getConnectionInstance_Source(), // $NON-NLS-1$
    "srcConnectionInstance", // $NON-NLS-1$
    null, // $NON-NLS-1$
    0, // $NON-NLS-1$
    -1, // $NON-NLS-1$
    ConnectionInstanceEnd.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEReference(getConnectionInstanceEnd_DstConnectionInstance(), getConnectionInstance(), // $NON-NLS-1$
    getConnectionInstance_Destination(), // $NON-NLS-1$
    "dstConnectionInstance", // $NON-NLS-1$
    null, // $NON-NLS-1$
    0, // $NON-NLS-1$
    -1, ConnectionInstanceEnd.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEClass(// $NON-NLS-1$
    connectionInstanceEClass, // $NON-NLS-1$
    ConnectionInstance.class, // $NON-NLS-1$
    "ConnectionInstance", // $NON-NLS-1$
    !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEReference(getConnectionInstance_InSystemOperationMode(), getSystemOperationMode(), null, // $NON-NLS-1$
    "inSystemOperationMode", // $NON-NLS-1$
    null, // $NON-NLS-1$
    0, // $NON-NLS-1$
    -1, // $NON-NLS-1$
    ConnectionInstance.class, // $NON-NLS-1$
    !IS_TRANSIENT, // $NON-NLS-1$
    !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEReference(// $NON-NLS-1$
    getConnectionInstance_InModeTransition(), // $NON-NLS-1$
    getModeTransitionInstance(), // $NON-NLS-1$
    null, // $NON-NLS-1$
    "inModeTransition", null, 0, -1, ConnectionInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEAttribute(// $NON-NLS-1$
    getConnectionInstance_Complete(), // $NON-NLS-1$
    theAadl2Package.getBoolean(), // $NON-NLS-1$
    "complete", // $NON-NLS-1$
    null, // $NON-NLS-1$
    1, // $NON-NLS-1$
    1, ConnectionInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEAttribute(// $NON-NLS-1$
    getConnectionInstance_Kind(), // $NON-NLS-1$
    getConnectionKind(), // $NON-NLS-1$
    "kind", // $NON-NLS-1$
    null, // $NON-NLS-1$
    1, // $NON-NLS-1$
    1, ConnectionInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEReference(getConnectionInstance_Destination(), getConnectionInstanceEnd(), // $NON-NLS-1$
    getConnectionInstanceEnd_DstConnectionInstance(), // $NON-NLS-1$
    "destination", // $NON-NLS-1$
    null, // $NON-NLS-1$
    1, // $NON-NLS-1$
    1, ConnectionInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEReference(getConnectionInstance_ConnectionReference(), getConnectionReference(), null, // $NON-NLS-1$
    "connectionReference", // $NON-NLS-1$
    null, // $NON-NLS-1$
    1, // $NON-NLS-1$
    -1, // $NON-NLS-1$
    ConnectionInstance.class, // $NON-NLS-1$
    !IS_TRANSIENT, // $NON-NLS-1$
    !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(// $NON-NLS-1$
    getConnectionInstance_Bidirectional(), // $NON-NLS-1$
    theAadl2Package.getBoolean(), // $NON-NLS-1$
    "bidirectional", // $NON-NLS-1$
    null, // $NON-NLS-1$
    1, // $NON-NLS-1$
    1, ConnectionInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEReference(getConnectionInstance_Source(), getConnectionInstanceEnd(), // $NON-NLS-1$
    getConnectionInstanceEnd_SrcConnectionInstance(), // $NON-NLS-1$
    "source", // $NON-NLS-1$
    null, // $NON-NLS-1$
    1, // $NON-NLS-1$
    1, // $NON-NLS-1$
    ConnectionInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEClass(// $NON-NLS-1$
    flowElementInstanceEClass, // $NON-NLS-1$
    FlowElementInstance.class, // $NON-NLS-1$
    "FlowElementInstance", // $NON-NLS-1$
    IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEClass(// $NON-NLS-1$
    systemOperationModeEClass, // $NON-NLS-1$
    SystemOperationMode.class, // $NON-NLS-1$
    "SystemOperationMode", // $NON-NLS-1$
    !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEReference(// $NON-NLS-1$
    getSystemOperationMode_CurrentMode(), // $NON-NLS-1$
    getModeInstance(), // $NON-NLS-1$
    null, // $NON-NLS-1$
    "currentMode", // $NON-NLS-1$
    null, // $NON-NLS-1$
    0, // $NON-NLS-1$
    -1, SystemOperationMode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEClass(// $NON-NLS-1$
    modeInstanceEClass, // $NON-NLS-1$
    ModeInstance.class, // $NON-NLS-1$
    "ModeInstance", // $NON-NLS-1$
    !IS_ABSTRACT, // $NON-NLS-1$
    !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEReference(getModeInstance_SrcModeTransition(), getModeTransitionInstance(), // $NON-NLS-1$
    getModeTransitionInstance_Source(), // $NON-NLS-1$
    "srcModeTransition", // $NON-NLS-1$
    null, // $NON-NLS-1$
    0, // $NON-NLS-1$
    -1, // $NON-NLS-1$
    ModeInstance.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEReference(getModeInstance_DstModeTransition(), getModeTransitionInstance(), // $NON-NLS-1$
    getModeTransitionInstance_Destination(), // $NON-NLS-1$
    "dstModeTransition", // $NON-NLS-1$
    null, // $NON-NLS-1$
    0, // $NON-NLS-1$
    -1, // $NON-NLS-1$
    ModeInstance.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEAttribute(// $NON-NLS-1$//$NON-NLS-2$
    getModeInstance_Initial(), // $NON-NLS-1$//$NON-NLS-2$
    theAadl2Package.getBoolean(), // $NON-NLS-1$//$NON-NLS-2$
    "initial", // $NON-NLS-1$//$NON-NLS-2$
    "false", // $NON-NLS-1$//$NON-NLS-2$
    1, // $NON-NLS-1$//$NON-NLS-2$
    1, ModeInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEReference(// $NON-NLS-1$
    getModeInstance_Mode(), // $NON-NLS-1$
    theAadl2Package.getMode(), // $NON-NLS-1$
    null, // $NON-NLS-1$
    "mode", // $NON-NLS-1$
    null, // $NON-NLS-1$
    1, // $NON-NLS-1$
    1, // $NON-NLS-1$
    ModeInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEAttribute(// $NON-NLS-1$//$NON-NLS-2$
    getModeInstance_Derived(), // $NON-NLS-1$//$NON-NLS-2$
    theAadl2Package.getBoolean(), // $NON-NLS-1$//$NON-NLS-2$
    "derived", // $NON-NLS-1$//$NON-NLS-2$
    "false", // $NON-NLS-1$//$NON-NLS-2$
    1, // $NON-NLS-1$//$NON-NLS-2$
    1, ModeInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEReference(// $NON-NLS-1$
    getModeInstance_Parent(), // $NON-NLS-1$
    getModeInstance(), // $NON-NLS-1$
    null, // $NON-NLS-1$
    "parent", // $NON-NLS-1$
    null, // $NON-NLS-1$
    0, // $NON-NLS-1$
    -1, ModeInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEClass(// $NON-NLS-1$
    modeTransitionInstanceEClass, // $NON-NLS-1$
    ModeTransitionInstance.class, // $NON-NLS-1$
    "ModeTransitionInstance", // $NON-NLS-1$
    !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEReference(getModeTransitionInstance_Destination(), getModeInstance(), getModeInstance_DstModeTransition(), // $NON-NLS-1$
    "destination", // $NON-NLS-1$
    null, // $NON-NLS-1$
    1, // $NON-NLS-1$
    1, // $NON-NLS-1$
    ModeTransitionInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEReference(getModeTransitionInstance_ModeTransition(), theAadl2Package.getModeTransition(), null, // $NON-NLS-1$
    "modeTransition", // $NON-NLS-1$
    null, // $NON-NLS-1$
    1, // $NON-NLS-1$
    1, // $NON-NLS-1$
    ModeTransitionInstance.class, // $NON-NLS-1$
    !IS_TRANSIENT, // $NON-NLS-1$
    !IS_VOLATILE, // $NON-NLS-1$
    IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEReference(// $NON-NLS-1$
    getModeTransitionInstance_Trigger(), // $NON-NLS-1$
    getFeatureInstance(), // $NON-NLS-1$
    null, // $NON-NLS-1$
    "trigger", // $NON-NLS-1$
    null, // $NON-NLS-1$
    0, // $NON-NLS-1$
    -1, ModeTransitionInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEReference(getModeTransitionInstance_Source(), getModeInstance(), getModeInstance_SrcModeTransition(), // $NON-NLS-1$
    "source", // $NON-NLS-1$
    null, // $NON-NLS-1$
    1, // $NON-NLS-1$
    1, // $NON-NLS-1$
    ModeTransitionInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEClass(// $NON-NLS-1$
    connectionReferenceEClass, // $NON-NLS-1$
    ConnectionReference.class, // $NON-NLS-1$
    "ConnectionReference", // $NON-NLS-1$
    !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEReference(// $NON-NLS-1$
    getConnectionReference_Context(), // $NON-NLS-1$
    getComponentInstance(), // $NON-NLS-1$
    null, // $NON-NLS-1$
    "context", // $NON-NLS-1$
    null, // $NON-NLS-1$
    1, // $NON-NLS-1$
    1, ConnectionReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEReference(// $NON-NLS-1$
    getConnectionReference_Connection(), // $NON-NLS-1$
    theAadl2Package.getConnection(), // $NON-NLS-1$
    null, // $NON-NLS-1$
    "connection", // $NON-NLS-1$
    null, 1, 1, ConnectionReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEReference(// $NON-NLS-1$
    getConnectionReference_Source(), // $NON-NLS-1$
    getConnectionInstanceEnd(), // $NON-NLS-1$
    null, // $NON-NLS-1$
    "source", // $NON-NLS-1$
    null, // $NON-NLS-1$
    1, // $NON-NLS-1$
    1, ConnectionReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEReference(// $NON-NLS-1$
    getConnectionReference_Destination(), // $NON-NLS-1$
    getConnectionInstanceEnd(), // $NON-NLS-1$
    null, // $NON-NLS-1$
    "destination", // $NON-NLS-1$
    null, 1, 1, ConnectionReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEAttribute(// $NON-NLS-1$
    getConnectionReference_Reverse(), // $NON-NLS-1$
    theAadl2Package.getBoolean(), // $NON-NLS-1$
    "reverse", // $NON-NLS-1$
    null, // $NON-NLS-1$
    1, // $NON-NLS-1$
    1, ConnectionReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEClass(// $NON-NLS-1$
    componentInstanceEClass, // $NON-NLS-1$
    ComponentInstance.class, // $NON-NLS-1$
    "ComponentInstance", // $NON-NLS-1$
    !IS_ABSTRACT, // $NON-NLS-1$
    !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEReference(// $NON-NLS-1$
    getComponentInstance_FeatureInstance(), // $NON-NLS-1$
    getFeatureInstance(), // $NON-NLS-1$
    null, // $NON-NLS-1$
    "featureInstance", // $NON-NLS-1$
    null, 0, -1, ComponentInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEReference(// $NON-NLS-1$
    getComponentInstance_ComponentInstance(), // $NON-NLS-1$
    getComponentInstance(), // $NON-NLS-1$
    null, // $NON-NLS-1$
    "componentInstance", null, 0, -1, ComponentInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEReference(// $NON-NLS-1$
    getComponentInstance_ModeInstance(), // $NON-NLS-1$
    getModeInstance(), // $NON-NLS-1$
    null, // $NON-NLS-1$
    "modeInstance", // $NON-NLS-1$
    null, // $NON-NLS-1$
    0, // $NON-NLS-1$
    -1, ComponentInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEReference(getComponentInstance_ModeTransitionInstance(), getModeTransitionInstance(), null, // $NON-NLS-1$
    "modeTransitionInstance", // $NON-NLS-1$
    null, // $NON-NLS-1$
    0, // $NON-NLS-1$
    -1, // $NON-NLS-1$
    ComponentInstance.class, // $NON-NLS-1$
    !IS_TRANSIENT, // $NON-NLS-1$
    !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEAttribute(// $NON-NLS-1$
    getComponentInstance_Category(), // $NON-NLS-1$
    theAadl2Package.getComponentCategory(), // $NON-NLS-1$
    "category", // $NON-NLS-1$
    null, // $NON-NLS-1$
    1, // $NON-NLS-1$
    1, ComponentInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEReference(// $NON-NLS-1$
    getComponentInstance_InMode(), // $NON-NLS-1$
    getModeInstance(), // $NON-NLS-1$
    null, // $NON-NLS-1$
    "inMode", // $NON-NLS-1$
    null, // $NON-NLS-1$
    0, // $NON-NLS-1$
    -1, ComponentInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEReference(getComponentInstance_FlowSpecification(), getFlowSpecificationInstance(), null, // $NON-NLS-1$
    "flowSpecification", // $NON-NLS-1$
    null, // $NON-NLS-1$
    0, // $NON-NLS-1$
    -1, // $NON-NLS-1$
    ComponentInstance.class, // $NON-NLS-1$
    !IS_TRANSIENT, // $NON-NLS-1$
    !IS_VOLATILE, // $NON-NLS-1$
    IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEReference(// $NON-NLS-1$
    getComponentInstance_EndToEndFlow(), // $NON-NLS-1$
    getEndToEndFlowInstance(), // $NON-NLS-1$
    null, // $NON-NLS-1$
    "endToEndFlow", // $NON-NLS-1$
    null, 0, -1, ComponentInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEReference(// $NON-NLS-1$
    getComponentInstance_ConnectionInstance(), // $NON-NLS-1$
    getConnectionInstance(), // $NON-NLS-1$
    null, // $NON-NLS-1$
    "connectionInstance", null, 0, -1, ComponentInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEReference(// $NON-NLS-1$
    getComponentInstance_Subcomponent(), // $NON-NLS-1$
    theAadl2Package.getSubcomponent(), // $NON-NLS-1$
    null, // $NON-NLS-1$
    "subcomponent", null, 0, 1, ComponentInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEAttribute(// $NON-NLS-1$
    getComponentInstance_Index(), // $NON-NLS-1$
    theAadl2Package.getInteger(), // $NON-NLS-1$
    "index", // $NON-NLS-1$
    null, // $NON-NLS-1$
    0, // $NON-NLS-1$
    -1, ComponentInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEReference(// $NON-NLS-1$
    getComponentInstance_Classifier(), // $NON-NLS-1$
    theAadl2Package.getComponentClassifier(), // $NON-NLS-1$
    null, // $NON-NLS-1$
    "classifier", null, 0, 1, ComponentInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEClass(// $NON-NLS-1$
    flowSpecificationInstanceEClass, // $NON-NLS-1$
    FlowSpecificationInstance.class, // $NON-NLS-1$
    "FlowSpecificationInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEReference(getFlowSpecificationInstance_Source(), getFeatureInstance(), getFeatureInstance_SrcFlowSpec(), // $NON-NLS-1$
    "source", // $NON-NLS-1$
    null, // $NON-NLS-1$
    0, // $NON-NLS-1$
    1, // $NON-NLS-1$
    FlowSpecificationInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEReference(getFlowSpecificationInstance_Destination(), getFeatureInstance(), // $NON-NLS-1$
    getFeatureInstance_DstFlowSpec(), // $NON-NLS-1$
    "destination", // $NON-NLS-1$
    null, // $NON-NLS-1$
    0, // $NON-NLS-1$
    1, // $NON-NLS-1$
    FlowSpecificationInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEReference(getFlowSpecificationInstance_FlowSpecification(), theAadl2Package.getFlowSpecification(), null, // $NON-NLS-1$
    "flowSpecification", // $NON-NLS-1$
    null, // $NON-NLS-1$
    1, // $NON-NLS-1$
    1, // $NON-NLS-1$
    FlowSpecificationInstance.class, // $NON-NLS-1$
    !IS_TRANSIENT, // $NON-NLS-1$
    !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEReference(// $NON-NLS-1$
    getFlowSpecificationInstance_InMode(), // $NON-NLS-1$
    getModeInstance(), // $NON-NLS-1$
    null, // $NON-NLS-1$
    "inMode", // $NON-NLS-1$
    null, // $NON-NLS-1$
    0, // $NON-NLS-1$
    -1, FlowSpecificationInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEReference(getFlowSpecificationInstance_InModeTransition(), getModeTransitionInstance(), null, // $NON-NLS-1$
    "inModeTransition", // $NON-NLS-1$
    null, // $NON-NLS-1$
    0, // $NON-NLS-1$
    -1, // $NON-NLS-1$
    FlowSpecificationInstance.class, // $NON-NLS-1$
    !IS_TRANSIENT, // $NON-NLS-1$
    !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEClass(// $NON-NLS-1$
    endToEndFlowInstanceEClass, // $NON-NLS-1$
    EndToEndFlowInstance.class, // $NON-NLS-1$
    "EndToEndFlowInstance", // $NON-NLS-1$
    !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEReference(// $NON-NLS-1$
    getEndToEndFlowInstance_FlowElement(), // $NON-NLS-1$
    getFlowElementInstance(), // $NON-NLS-1$
    null, // $NON-NLS-1$
    "flowElement", // $NON-NLS-1$
    null, 0, -1, EndToEndFlowInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEReference(// $NON-NLS-1$
    getEndToEndFlowInstance_InMode(), // $NON-NLS-1$
    getModeInstance(), // $NON-NLS-1$
    null, // $NON-NLS-1$
    "inMode", // $NON-NLS-1$
    null, // $NON-NLS-1$
    0, // $NON-NLS-1$
    -1, EndToEndFlowInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEReference(getEndToEndFlowInstance_InSystemOperationMode(), getSystemOperationMode(), null, // $NON-NLS-1$
    "inSystemOperationMode", // $NON-NLS-1$
    null, // $NON-NLS-1$
    0, // $NON-NLS-1$
    -1, // $NON-NLS-1$
    EndToEndFlowInstance.class, // $NON-NLS-1$
    !IS_TRANSIENT, // $NON-NLS-1$
    !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEReference(// $NON-NLS-1$
    getEndToEndFlowInstance_EndToEndFlow(), // $NON-NLS-1$
    theAadl2Package.getEndToEndFlow(), // $NON-NLS-1$
    null, // $NON-NLS-1$
    "endToEndFlow", null, 1, 1, EndToEndFlowInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEClass(// $NON-NLS-1$
    systemInstanceEClass, // $NON-NLS-1$
    SystemInstance.class, // $NON-NLS-1$
    "SystemInstance", // $NON-NLS-1$
    !IS_ABSTRACT, // $NON-NLS-1$
    !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEReference(// $NON-NLS-1$
    getSystemInstance_SystemOperationMode(), // $NON-NLS-1$
    getSystemOperationMode(), // $NON-NLS-1$
    null, // $NON-NLS-1$
    "systemOperationMode", null, 0, -1, SystemInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEReference(getSystemInstance_ComponentImplementation(), theAadl2Package.getComponentImplementation(), null, // $NON-NLS-1$
    "componentImplementation", // $NON-NLS-1$
    null, // $NON-NLS-1$
    1, // $NON-NLS-1$
    1, // $NON-NLS-1$
    SystemInstance.class, // $NON-NLS-1$
    !IS_TRANSIENT, // $NON-NLS-1$
    !IS_VOLATILE, // $NON-NLS-1$
    IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    initEClass(// $NON-NLS-1$
    instanceReferenceValueEClass, // $NON-NLS-1$
    InstanceReferenceValue.class, // $NON-NLS-1$
    "InstanceReferenceValue", // $NON-NLS-1$
    !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEReference(getInstanceReferenceValue_ReferencedInstanceObject(), getInstanceObject(), null, // $NON-NLS-1$
    "referencedInstanceObject", // $NON-NLS-1$
    null, // $NON-NLS-1$
    1, // $NON-NLS-1$
    1, // $NON-NLS-1$
    InstanceReferenceValue.class, // $NON-NLS-1$
    !IS_TRANSIENT, // $NON-NLS-1$
    !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
    // Initialize enums and add enum literals
    // $NON-NLS-1$
    initEEnum(connectionKindEEnum, ConnectionKind.class, "ConnectionKind");
    addEEnumLiteral(connectionKindEEnum, ConnectionKind.FEATURE_CONNECTION);
    addEEnumLiteral(connectionKindEEnum, ConnectionKind.ACCESS_CONNECTION);
    addEEnumLiteral(connectionKindEEnum, ConnectionKind.PARAMETER_CONNECTION);
    addEEnumLiteral(connectionKindEEnum, ConnectionKind.PORT_CONNECTION);
    addEEnumLiteral(connectionKindEEnum, ConnectionKind.MODE_TRANSITION_CONNECTION);
    addEEnumLiteral(connectionKindEEnum, ConnectionKind.FEATURE_GROUP_CONNECTION);
    // $NON-NLS-1$
    initEEnum(featureCategoryEEnum, FeatureCategory.class, "FeatureCategory");
    addEEnumLiteral(featureCategoryEEnum, FeatureCategory.DATA_PORT);
    addEEnumLiteral(featureCategoryEEnum, FeatureCategory.EVENT_PORT);
    addEEnumLiteral(featureCategoryEEnum, FeatureCategory.EVENT_DATA_PORT);
    addEEnumLiteral(featureCategoryEEnum, FeatureCategory.PARAMETER);
    addEEnumLiteral(featureCategoryEEnum, FeatureCategory.BUS_ACCESS);
    addEEnumLiteral(featureCategoryEEnum, FeatureCategory.DATA_ACCESS);
    addEEnumLiteral(featureCategoryEEnum, FeatureCategory.SUBPROGRAM_ACCESS);
    addEEnumLiteral(featureCategoryEEnum, FeatureCategory.SUBPROGRAM_GROUP_ACCESS);
    addEEnumLiteral(featureCategoryEEnum, FeatureCategory.FEATURE_GROUP);
    addEEnumLiteral(featureCategoryEEnum, FeatureCategory.ABSTRACT_FEATURE);
    // Create resource
    createResource(eNS_URI);
    // Create annotations
    // http://www.eclipse.org/uml2/2.0.0/UML
    createUMLAnnotations();
    // duplicates
    createDuplicatesAnnotations();
}
Also used : Aadl2Package(org.osate.aadl2.Aadl2Package)

Example 5 with ModeTransitionInstance

use of org.osate.aadl2.instance.ModeTransitionInstance in project osate2 by osate.

the class ValidateConnectionsSwitch method checkConnectionClassifiers.

private void checkConnectionClassifiers(final ConnectionInstance conni) {
    final ConnectionInstanceEnd srcEnd = conni.getSource();
    final ConnectionInstanceEnd destEnd = conni.getDestination();
    if (!(srcEnd instanceof ModeTransitionInstance) && !(destEnd instanceof ModeTransitionInstance)) {
        final boolean sourceIsSubcomponent = srcEnd instanceof ComponentInstance;
        final boolean destIsSubcomponent = destEnd instanceof ComponentInstance;
        final Classifier srcClassifier = getConnectionEndClassifier(srcEnd);
        final Classifier destClassifier = getConnectionEndClassifier(destEnd);
        if (srcClassifier == null && destClassifier != null) {
            if (!isAbstractFeature(srcEnd)) {
                warning(conni, "Expected " + (sourceIsSubcomponent ? "subcomponent \'" : "feature \'") + srcEnd.getComponentInstancePath() + "' to have classifier '" + destClassifier.getQualifiedName() + '\'');
            }
        } else if (srcClassifier != null && destClassifier == null) {
            if (!isAbstractFeature(destEnd)) {
                warning(conni, "Expected " + (destIsSubcomponent ? "subcomponent \'" : "feature \'") + destEnd.getComponentInstancePath() + "' to have classifier '" + srcClassifier.getQualifiedName() + '\'');
            }
        } else {
            checkEndPointClassifierMatching(conni, srcEnd, destEnd, srcClassifier, destClassifier);
        }
    }
}
Also used : ConnectionInstanceEnd(org.osate.aadl2.instance.ConnectionInstanceEnd) ComponentInstance(org.osate.aadl2.instance.ComponentInstance) ModeTransitionInstance(org.osate.aadl2.instance.ModeTransitionInstance) InstantiatedClassifier(org.osate.aadl2.instance.util.InstanceUtil.InstantiatedClassifier) Classifier(org.osate.aadl2.Classifier)

Aggregations

ModeTransitionInstance (org.osate.aadl2.instance.ModeTransitionInstance)8 Context (org.osate.aadl2.Context)5 Feature (org.osate.aadl2.Feature)4 FeatureGroup (org.osate.aadl2.FeatureGroup)4 ModeTransition (org.osate.aadl2.ModeTransition)4 ModeInstance (org.osate.aadl2.instance.ModeInstance)4 Mode (org.osate.aadl2.Mode)3 ModeTransitionTrigger (org.osate.aadl2.ModeTransitionTrigger)3 Port (org.osate.aadl2.Port)3 ComponentInstance (org.osate.aadl2.instance.ComponentInstance)3 FeatureInstance (org.osate.aadl2.instance.FeatureInstance)3 SystemOperationMode (org.osate.aadl2.instance.SystemOperationMode)3 IScopeContext (org.eclipse.core.runtime.preferences.IScopeContext)2 DataSubcomponent (org.osate.aadl2.DataSubcomponent)2 FlowEnd (org.osate.aadl2.FlowEnd)2 FlowSpecification (org.osate.aadl2.FlowSpecification)2 InternalFeature (org.osate.aadl2.InternalFeature)2 NamedElement (org.osate.aadl2.NamedElement)2 ProcessorFeature (org.osate.aadl2.ProcessorFeature)2 Subcomponent (org.osate.aadl2.Subcomponent)2