Search in sources :

Example 26 with ErrorPropagation

use of org.osate.xtext.aadl2.errormodel.errorModel.ErrorPropagation in project osate2 by osate.

the class PropagateErrorSources method startExternalFlows.

/**
 * Start with an external incoming error propagation as source
 * @param ci component instance
 */
public void startExternalFlows(ComponentInstance root) {
    Collection<ErrorPropagation> eplist = EMV2Util.getAllIncomingErrorPropagations(root.getComponentClassifier());
    String componentText = generateComponentInstanceText(root);
    if (eplist.isEmpty()) {
        return;
    }
    reportExternalImpactHeading();
    reportExternalTableHeading();
    for (ErrorPropagation ep : eplist) {
        EMSUtil.unsetAll(root);
        TypeSet tsep = ep.getTypeSet();
        if (tsep != null) {
            EList<TypeToken> result = tsep.getTypeTokens();
            // XXX use this if we want all leaf types: EM2TypeSetUtil.generateAllLeafTypeTokens(tsep,EMV2Util.getContainingTypeUseContext(errorSource));
            for (TypeToken typeToken : result) {
                String failuremodeText = generateErrorPropTypeTokenText(ep, typeToken);
                traceErrorPaths(root, ep, typeToken, 2, componentText + ", " + failuremodeText);
            }
        }
    }
}
Also used : TypeToken(org.osate.xtext.aadl2.errormodel.errorModel.TypeToken) TypeSet(org.osate.xtext.aadl2.errormodel.errorModel.TypeSet) ErrorPropagation(org.osate.xtext.aadl2.errormodel.errorModel.ErrorPropagation)

Example 27 with ErrorPropagation

use of org.osate.xtext.aadl2.errormodel.errorModel.ErrorPropagation in project osate2 by osate.

the class FHAReport method processHazards.

protected void processHazards(ComponentInstance ci, WriteToFile report) {
    for (ErrorBehaviorTransition trans : EMV2Util.getAllErrorBehaviorTransitions(ci.getComponentClassifier())) {
        ConditionExpression cond = trans.getCondition();
        if (cond instanceof ConditionElement) {
            ConditionElement condElement = (ConditionElement) trans.getCondition();
            EventOrPropagation eop = EMV2Util.getErrorEventOrPropagation(condElement);
            if (eop instanceof ErrorEvent) {
                ErrorEvent errorEvent = (ErrorEvent) eop;
                List<EMV2PropertyAssociation> PA = getHazardsPropertyInCurrentFormat(ci, errorEvent, errorEvent.getTypeSet());
                List<EMV2PropertyAssociation> Sev = EMV2Properties.getSeverityProperty(ci, errorEvent, errorEvent.getTypeSet());
                List<EMV2PropertyAssociation> Like = EMV2Properties.getLikelihoodProperty(ci, errorEvent, errorEvent.getTypeSet());
                reportHazardProperty(ci, PA, Sev, Like, errorEvent, errorEvent.getTypeSet(), errorEvent, report);
            }
        // condElement.getIncoming()
        }
    }
    for (ErrorBehaviorState state : EMV2Util.getAllErrorBehaviorStates(ci)) {
        List<EMV2PropertyAssociation> PA = getHazardsPropertyInCurrentFormat(ci, state, state.getTypeSet());
        List<EMV2PropertyAssociation> Sev = EMV2Properties.getSeverityProperty(ci, state, state.getTypeSet());
        List<EMV2PropertyAssociation> Like = EMV2Properties.getLikelihoodProperty(ci, state, state.getTypeSet());
        reportHazardProperty(ci, PA, Sev, Like, state, state.getTypeSet(), state, report);
    }
    // report all error sources as hazards if they have the property
    Collection<ErrorSource> eslist = EMV2Util.getAllErrorSources(ci.getComponentClassifier());
    Collection<ErrorPropagation> oeplist = EMV2Util.getAllOutgoingErrorPropagations(ci.getComponentClassifier());
    for (ErrorSource errorSource : eslist) {
        NamedElement ne = errorSource.getSourceModelElement();
        ErrorBehaviorState failureMode = errorSource.getFailureModeReference();
        List<EMV2PropertyAssociation> HazardPA = Collections.emptyList();
        List<EMV2PropertyAssociation> Sev = Collections.emptyList();
        List<EMV2PropertyAssociation> Like = Collections.emptyList();
        TypeSet ts = null;
        NamedElement target = null;
        Element localContext = null;
        // not dealing with type set as failure mode
        if (failureMode != null) {
            // state is originating hazard, possibly with a type set
            ts = failureMode.getTypeSet();
            // error source a local context
            HazardPA = getHazardsPropertyInCurrentFormat(ci, failureMode, ts);
            Sev = EMV2Properties.getSeverityProperty(ci, failureMode, ts);
            Like = EMV2Properties.getLikelihoodProperty(ci, failureMode, ts);
            target = failureMode;
            localContext = errorSource;
        }
        if (HazardPA.isEmpty()) {
            // error source is originating hazard
            ts = errorSource.getTypeTokenConstraint();
            if (ts == null && ne instanceof ErrorPropagation) {
                ts = ((ErrorPropagation) ne).getTypeSet();
            }
            HazardPA = getHazardsPropertyInCurrentFormat(ci, errorSource, ts);
            Sev = EMV2Properties.getSeverityProperty(ci, errorSource, ts);
            Like = EMV2Properties.getLikelihoodProperty(ci, errorSource, ts);
            target = errorSource;
            localContext = null;
            if (HazardPA.isEmpty() && errorSource.getFailureModeType() != null) {
                ts = errorSource.getFailureModeType();
                HazardPA = getHazardsPropertyInCurrentFormat(ci, errorSource, ts);
                Sev = EMV2Properties.getSeverityProperty(ci, errorSource, ts);
                Like = EMV2Properties.getLikelihoodProperty(ci, errorSource, ts);
            }
        }
        if (!HazardPA.isEmpty()) {
            reportHazardProperty(ci, HazardPA, Sev, Like, target, ts, localContext, report);
        }
    }
    for (ErrorPropagation ep : oeplist) {
        TypeSet ts = null;
        NamedElement target = null;
        Element localContext = null;
        // error propagation is originating hazard
        ts = ep.getTypeSet();
        List<EMV2PropertyAssociation> HazardPA = getHazardsPropertyInCurrentFormat(ci, ep, ts);
        List<EMV2PropertyAssociation> Sev = EMV2Properties.getSeverityProperty(ci, ep, ts);
        List<EMV2PropertyAssociation> Like = EMV2Properties.getLikelihoodProperty(ci, ep, ts);
        target = ep;
        localContext = null;
        // XXX we may have more than one matching hazard
        if (!HazardPA.isEmpty()) {
            reportHazardProperty(ci, HazardPA, Sev, Like, target, ts, localContext, report);
        }
    }
}
Also used : ErrorBehaviorState(org.osate.xtext.aadl2.errormodel.errorModel.ErrorBehaviorState) Element(org.osate.aadl2.Element) ConditionElement(org.osate.xtext.aadl2.errormodel.errorModel.ConditionElement) NamedElement(org.osate.aadl2.NamedElement) EMV2PropertyAssociation(org.osate.xtext.aadl2.errormodel.errorModel.EMV2PropertyAssociation) EventOrPropagation(org.osate.xtext.aadl2.errormodel.errorModel.EventOrPropagation) ConditionElement(org.osate.xtext.aadl2.errormodel.errorModel.ConditionElement) ErrorBehaviorTransition(org.osate.xtext.aadl2.errormodel.errorModel.ErrorBehaviorTransition) ErrorSource(org.osate.xtext.aadl2.errormodel.errorModel.ErrorSource) ConditionExpression(org.osate.xtext.aadl2.errormodel.errorModel.ConditionExpression) TypeSet(org.osate.xtext.aadl2.errormodel.errorModel.TypeSet) ErrorEvent(org.osate.xtext.aadl2.errormodel.errorModel.ErrorEvent) ErrorPropagation(org.osate.xtext.aadl2.errormodel.errorModel.ErrorPropagation) NamedElement(org.osate.aadl2.NamedElement)

Example 28 with ErrorPropagation

use of org.osate.xtext.aadl2.errormodel.errorModel.ErrorPropagation in project osate2 by osate.

the class PropagationGraphBackwardTraversal method traverseIncomingErrorPropagation.

/**
 * traverse backwards according to propagation paths
 * if preProcessing result is non-null return it instead of result of actual traversal (used for shared subtrees)
 * handle external incoming propagations as origin by calling on processIncomingErrorPropagation
 * handle source outgoing propagation
 * collection of those results are post processed postProcessIncomingPropagation.
 * If empty incoming propagation itself is processed as "leaf" by processIncomingErrorPropagation
 * @param component component instance with incoming propagation
 * @param errorPropagation incoming propagation
 * @param type error type
 * @return EObject (can be null)
 */
private EObject traverseIncomingErrorPropagation(ComponentInstance component, ErrorPropagation errorPropagation, TypeToken proptype, BigDecimal scale) {
    List<EObject> results = new LinkedList<EObject>();
    Collection<TypeToken> filteredtypes = filterTokenThroughConstraint(errorPropagation.getTypeSet(), proptype);
    if (filteredtypes.isEmpty()) {
        return null;
    }
    boolean traversed = false;
    boolean hasCycle = false;
    List<EObject> subResults = new LinkedList<EObject>();
    for (TypeToken type : filteredtypes) {
        boolean didProp = false;
        // we want to track cycles.
        // we do that by tagging the feature instance of the error propagation with the error type (as token)
        ErrorModelState st = null;
        FeatureInstance fi = EMV2Util.findFeatureInstance(errorPropagation, component);
        if (fi != null) {
            st = (ErrorModelState) ErrorModelStateAdapterFactory.INSTANCE.adapt(fi, ErrorModelState.class);
        } else {
            st = (ErrorModelState) ErrorModelStateAdapterFactory.INSTANCE.adapt(component, ErrorModelState.class);
        }
        if (st.visited(errorPropagation, type)) {
            // we were there before.
            hasCycle = true;
            continue;
        } else {
            st.setVisitToken(errorPropagation, type);
        }
        EObject preResult = preProcessIncomingErrorPropagation(component, errorPropagation, type, scale);
        if (preResult != null) {
            // found common event
            addSubresult(results, preResult);
            continue;
        }
        for (PropagationGraphPath ppr : Util.getAllReversePropagationPaths(currentAnalysisModel, component, errorPropagation)) {
            // traverse incoming
            if (ppr.getConnection() != null) {
                ErrorSource ces = EMV2Util.findConnectionErrorSourceForConnection(ppr.getConnection());
                // the type constraint has to come from the error source as the connection does not have one
                if (ces != null && contains(ces.getTypeTokenConstraint(), type)) {
                    // XXX filter type
                    EObject result = processConnectionErrorSource(ppr.getConnection(), ces, type, scale);
                    addSubresult(subResults, result);
                    didProp = true;
                }
                ComponentInstance contextCI = ppr.getConnection().getComponentInstance();
                TypeTransformationSet tts = EMV2Util.getAllTypeTransformationSet(contextCI);
                for (PropagationPathEnd ppe : Util.getAllPropagationSourceEnds(currentAnalysisModel, ppr.getConnection())) {
                    ComponentInstance componentSource = ppe.getComponentInstance();
                    ErrorPropagation propagationSource = ppe.getErrorPropagation();
                    TypeSet newtype = reverseMapTypeTokenToContributor(type, tts);
                    if (newtype != null) {
                        EList<TypeToken> ttlist = flattenTypesetElements(newtype);
                        for (TypeToken typeToken : ttlist) {
                            TypeToken ntype = EMV2TypeSetUtil.contains(typeToken, type) ? type : typeToken;
                            EObject result = traverseOutgoingErrorPropagation(componentSource, propagationSource, ntype, scale);
                            addSubresult(subResults, result);
                            didProp = true;
                        }
                    } else {
                        EObject result = traverseOutgoingErrorPropagation(componentSource, propagationSource, type, scale);
                        addSubresult(subResults, result);
                        didProp = true;
                    }
                    // source of connection
                    newtype = reverseMapTypeTokenToSource(type, tts);
                    if (newtype != null) {
                        EList<TypeToken> ttlist = flattenTypesetElements(newtype);
                        for (TypeToken typeToken : ttlist) {
                            TypeToken ntype = EMV2TypeSetUtil.contains(typeToken, type) ? type : typeToken;
                            EObject result = traverseOutgoingErrorPropagation(componentSource, propagationSource, ntype, scale);
                            addSubresult(subResults, result);
                            didProp = true;
                        }
                    } else {
                        EObject result = traverseOutgoingErrorPropagation(componentSource, propagationSource, type, scale);
                        if (!addSubresult(subResults, result)) {
                            didProp = true;
                        }
                    }
                }
            }
            PropagationPathEnd ppe = ppr.getPathSrc();
            ComponentInstance componentSource = ppe.getComponentInstance();
            ErrorPropagation propagationSource = ppe.getErrorPropagation();
            if (propagationSource.getDirection() == DirectionType.IN) {
                // we have an external incoming propagation
                EObject result = processIncomingErrorPropagation(componentSource, propagationSource, type, scale);
                addSubresult(subResults, result);
                didProp = true;
            } else {
                EObject result = traverseOutgoingErrorPropagation(componentSource, propagationSource, type, scale);
                addSubresult(subResults, result);
                didProp = true;
            }
        }
        st.removeVisitedToken(errorPropagation, type);
        if (didProp) {
            traversed = true;
        }
    }
    if (!subResults.isEmpty()) {
        return postProcessIncomingErrorPropagation(component, errorPropagation, proptype, subResults, scale);
    }
    if (traversed || hasCycle) {
        return null;
    }
    // we have no subresults and did not prune. Allow handling of incoming propagation as endpoint of traversal
    return processIncomingErrorPropagation(component, errorPropagation, proptype, scale);
}
Also used : FeatureInstance(org.osate.aadl2.instance.FeatureInstance) PropagationPathEnd(org.osate.aadl2.errormodel.PropagationGraph.PropagationPathEnd) PropagationGraphPath(org.osate.aadl2.errormodel.PropagationGraph.PropagationGraphPath) LinkedList(java.util.LinkedList) ErrorModelState(org.osate.xtext.aadl2.errormodel.util.ErrorModelState) TypeTransformationSet(org.osate.xtext.aadl2.errormodel.errorModel.TypeTransformationSet) ErrorSource(org.osate.xtext.aadl2.errormodel.errorModel.ErrorSource) TypeToken(org.osate.xtext.aadl2.errormodel.errorModel.TypeToken) EObject(org.eclipse.emf.ecore.EObject) TypeSet(org.osate.xtext.aadl2.errormodel.errorModel.TypeSet) ComponentInstance(org.osate.aadl2.instance.ComponentInstance) ErrorPropagation(org.osate.xtext.aadl2.errormodel.errorModel.ErrorPropagation)

Example 29 with ErrorPropagation

use of org.osate.xtext.aadl2.errormodel.errorModel.ErrorPropagation in project osate2 by osate.

the class PropagationGraphBackwardTraversal method traverseOutgoingErrorPropagation.

/**
 * process an Outgoing Error Propagation by going backwards in the propagation graph
 * if preProcessOutgoingerrorPropagation returns non-null return its value as traverse result.
 * First we attempt to go backwards according to the component error behavior, i.e., the OutgoingPropagationCondition.
 * If subresults is non-null then return value of postProcessingErrorPropagationCOndition.
 * If not present we do it according to error flow specifications.
 *
 * @param component ComponentInstance
 * @param errorPropagation outgoing ErrorPropagation
 * @param type ErrorTypes
 * @return EObject (can be null)
 */
public EObject traverseOutgoingErrorPropagation(final ComponentInstance component, final ErrorPropagation errorPropagation, TypeToken proptype, BigDecimal scale) {
    List<EObject> subResults = new LinkedList<EObject>();
    Collection<TypeToken> filteredTypes = filterTokenThroughConstraint(errorPropagation.getTypeSet(), proptype);
    if (filteredTypes.isEmpty()) {
        return null;
    }
    HashMultimap<ErrorPropagation, String> handledEOPs = HashMultimap.create();
    boolean traverse = false;
    boolean hasCycle = false;
    for (TypeToken type : filteredTypes) {
        // we did follow an OPC.
        boolean didProp = false;
        EObject found = preProcessOutgoingErrorPropagation(component, errorPropagation, type, scale);
        if (found != null) {
            addSubresult(subResults, found);
            // found common event
            continue;
        }
        // we want to track cycles.
        // we do that by tagging the feature instance of the error propagation with the error type (as token)
        ErrorModelState st = null;
        FeatureInstance fi = EMV2Util.findFeatureInstance(errorPropagation, component);
        if (fi != null) {
            st = (ErrorModelState) ErrorModelStateAdapterFactory.INSTANCE.adapt(fi, ErrorModelState.class);
        } else {
            st = (ErrorModelState) ErrorModelStateAdapterFactory.INSTANCE.adapt(component, ErrorModelState.class);
        }
        if (st.visited(errorPropagation, type)) {
            // we were there before.
            hasCycle = true;
            continue;
        } else {
            st.setVisitToken(errorPropagation, type);
        }
        // processing call has to be after the preproccessing call so it is not found and we proceed in processing.
        // On the other hand it needs to be called here so the event exists in ftamodel and is found the next time around.
        // Originally we were creating the events bottom up thus the loop did not find the event.
        // EObject myEvent = processOutgoingErrorPropagation(component, errorPropagation, type, scale);
        Collection<ErrorFlow> errorFlows = EMV2Util.getAllErrorFlows(component);
        Collection<OutgoingPropagationCondition> opcs = EMV2Util.getAllOutgoingPropagationConditions(component);
        for (OutgoingPropagationCondition opc : opcs) {
            if ((opc.getTypeToken() != null && !isNoError(opc.getTypeToken())) || opc.getTypeToken() == null) {
                if (opc.isAllPropagations() || (EMV2Util.isSame(opc.getOutgoing(), errorPropagation))) {
                    // opc token if OPC token is subtype or same type
                    Collection<TypeToken> opcFilteredTypes = filterTokenThroughConstraint(opc.getTypeToken(), type);
                    for (TypeToken opctype : opcFilteredTypes) {
                        if (contains(opc.getTypeToken(), opctype)) {
                            EObject res = handleOutgoingErrorPropagationCondition(component, opc, opctype, handledEOPs, scale);
                            addSubresult(subResults, res);
                            didProp = true;
                        }
                    }
                }
            }
        }
        // try to find a path from an outer to an inner out error propagation
        EList<PropagationPathEnd> propagationSources = Util.getAllPropagationSourceEnds(currentAnalysisModel, component, errorPropagation);
        for (PropagationPathEnd ppe : propagationSources) {
            ComponentInstance componentSource = ppe.getComponentInstance();
            ErrorPropagation propagationSource = ppe.getErrorPropagation();
            if (propagationSource.getDirection() == DirectionType.OUT) {
                Set<ErrorPropagation> eops = handledEOPs.keySet();
                if (!containsEOP(eops, propagationSource)) {
                    // if not already handled by a opc
                    EObject res = traverseOutgoingErrorPropagation(componentSource, propagationSource, type, scale);
                    addSubresult(subResults, res);
                    didProp = true;
                }
            }
        }
        for (ErrorFlow ef : errorFlows) {
            if (ef instanceof ErrorPath) {
                ErrorPath ep = (ErrorPath) ef;
                if (handledEOPs.containsEntry(ep.getIncoming(), EMV2Util.getPrintName(type))) {
                    // already handled by a opc
                    continue;
                }
                if (Util.conditionHolds(ef, component)) {
                    /**
                     * Make sure that the error type we are looking for is contained
                     * in the error types for the out propagation.
                     * This is a fix for the JMR/SAVI WBS model.
                     */
                    if (ep.isAllOutgoing() || EMV2Util.isSame(ep.getOutgoing(), errorPropagation)) {
                        BigDecimal newscale = scale;
                        double pathprobability = EMV2Properties.getProbability(component, ep, type);
                        if (pathprobability > 0) {
                            newscale = scale.multiply(BigDecimal.valueOf((pathprobability)));
                        }
                        if (ep.getTargetToken() != null) {
                            Collection<TypeToken> mappedTypes = filterTokenThroughConstraint(ep.getTargetToken(), type);
                            for (TypeToken mappedtype : mappedTypes) {
                                // we have a type mapping
                                EList<TypeToken> result;
                                if (ep.getTypeTokenConstraint() != null) {
                                    // get type from path constraint
                                    result = mapTokenThroughConstraint(ep.getTypeTokenConstraint(), mappedtype);
                                } else {
                                    // get incoming type from propagation
                                    result = mapTokenThroughConstraint(ep.getIncoming().getTypeSet(), mappedtype);
                                }
                                for (TypeToken newToken : result) {
                                    if (ep.isAllIncoming()) {
                                        Collection<ErrorPropagation> inprops = EMV2Util.getAllIncomingErrorPropagations(component);
                                        for (ErrorPropagation eprop : inprops) {
                                            handledEOPs.put(eprop, EMV2Util.getPrintName(newToken));
                                            EObject newEvent = traverseIncomingErrorPropagation(component, eprop, newToken, newscale);
                                            addSubresult(subResults, newEvent);
                                            didProp = true;
                                        }
                                    } else {
                                        handledEOPs.put(ep.getIncoming(), EMV2Util.getPrintName(newToken));
                                        EObject newEvent = traverseIncomingErrorPropagation(component, ep.getIncoming(), newToken, newscale);
                                        addSubresult(subResults, newEvent);
                                        didProp = true;
                                    }
                                }
                            }
                        } else {
                            // no type mapping
                            if (ep.isAllIncoming()) {
                                Collection<ErrorPropagation> inprops = EMV2Util.getAllIncomingErrorPropagations(component);
                                for (ErrorPropagation eprop : inprops) {
                                    TypeSet matchtype = ep.getTypeTokenConstraint();
                                    if (matchtype == null) {
                                        matchtype = eprop.getTypeSet();
                                    }
                                    EList<TypeToken> filteredtypes = filterTokenThroughConstraint(matchtype, type);
                                    for (TypeToken subtype : filteredtypes) {
                                        handledEOPs.put(eprop, EMV2Util.getPrintName(subtype));
                                        EObject newEvent = traverseIncomingErrorPropagation(component, eprop, subtype, newscale);
                                        addSubresult(subResults, newEvent);
                                        didProp = true;
                                    }
                                }
                            } else {
                                ErrorPropagation inep = ep.getIncoming();
                                TypeSet matchtype = ep.getTypeTokenConstraint();
                                if (matchtype == null) {
                                    matchtype = inep.getTypeSet();
                                }
                                Collection<TypeToken> mappedtypes = filterTokenThroughConstraint(matchtype, type);
                                for (TypeToken subtype : mappedtypes) {
                                    handledEOPs.put(inep, EMV2Util.getPrintName(subtype));
                                    EObject newEvent = traverseIncomingErrorPropagation(component, inep, subtype, newscale);
                                    addSubresult(subResults, newEvent);
                                    didProp = true;
                                }
                            }
                        }
                    }
                }
            } else if (ef instanceof ErrorSource) {
                ErrorSource errorSource = (ErrorSource) ef;
                NamedElement src = errorSource.getSourceModelElement();
                if (src instanceof ErrorPropagation) {
                    // check if error source was already handled by opc
                    ErrorPropagation srcep = (ErrorPropagation) src;
                    if (targetsEOP(opcs, srcep, type)) {
                        // already handled by a opc with the same target
                        continue;
                    }
                }
                if (Util.conditionHolds(ef, component)) {
                    if (errorSource.isAll() || EMV2Util.isSame(errorSource.getSourceModelElement(), errorPropagation)) {
                        Collection<TypeToken> mappedTypes = filterTokenThroughConstraint(errorSource.getTypeTokenConstraint(), type);
                        for (TypeToken mappedType : mappedTypes) {
                            if (src instanceof ErrorPropagation) {
                                handledEOPs.put((ErrorPropagation) src, EMV2Util.getPrintName(mappedType));
                            }
                            if (errorSource.getFailureModeReference() != null) {
                                List<EObject> stResults = new LinkedList<EObject>();
                                ErrorBehaviorState ebs = errorSource.getFailureModeReference();
                                EObject sEvent = traverseErrorBehaviorState(component, ebs, mappedType, scale);
                                addSubresult(stResults, sEvent);
                                EObject newEvent = postProcessErrorSource(component, errorSource, proptype, stResults, scale);
                                addSubresult(subResults, newEvent);
                                didProp = true;
                            } else {
                                EObject newEvent = processErrorSource(component, errorSource, mappedType, scale);
                                addSubresult(subResults, newEvent);
                                didProp = true;
                            }
                        }
                    }
                }
            }
        }
        st.removeVisitedToken(errorPropagation, type);
        if (didProp) {
            traverse = true;
        }
    }
    if (!subResults.isEmpty()) {
        // out propagation with sub elements
        return postProcessOutgoingErrorPropagation(component, errorPropagation, proptype, subResults, scale);
    }
    if (hasCycle) {
        return null;
    }
    if (traverse && !handledEOPs.isEmpty()) {
        // we handled error out propagations
        return null;
    }
    // out propagation as end point
    return processOutgoingErrorPropagation(component, errorPropagation, proptype, scale);
}
Also used : FeatureInstance(org.osate.aadl2.instance.FeatureInstance) ErrorModelState(org.osate.xtext.aadl2.errormodel.util.ErrorModelState) ErrorSource(org.osate.xtext.aadl2.errormodel.errorModel.ErrorSource) EObject(org.eclipse.emf.ecore.EObject) ComponentInstance(org.osate.aadl2.instance.ComponentInstance) ErrorPropagation(org.osate.xtext.aadl2.errormodel.errorModel.ErrorPropagation) List(java.util.List) LinkedList(java.util.LinkedList) EList(org.eclipse.emf.common.util.EList) ErrorBehaviorState(org.osate.xtext.aadl2.errormodel.errorModel.ErrorBehaviorState) QualifiedErrorBehaviorState(org.osate.xtext.aadl2.errormodel.errorModel.QualifiedErrorBehaviorState) ErrorFlow(org.osate.xtext.aadl2.errormodel.errorModel.ErrorFlow) PropagationPathEnd(org.osate.aadl2.errormodel.PropagationGraph.PropagationPathEnd) LinkedList(java.util.LinkedList) BigDecimal(java.math.BigDecimal) TypeToken(org.osate.xtext.aadl2.errormodel.errorModel.TypeToken) TypeSet(org.osate.xtext.aadl2.errormodel.errorModel.TypeSet) ErrorPath(org.osate.xtext.aadl2.errormodel.errorModel.ErrorPath) Collection(java.util.Collection) OutgoingPropagationCondition(org.osate.xtext.aadl2.errormodel.errorModel.OutgoingPropagationCondition) NamedElement(org.osate.aadl2.NamedElement)

Example 30 with ErrorPropagation

use of org.osate.xtext.aadl2.errormodel.errorModel.ErrorPropagation in project osate2 by osate.

the class PropagationPathEndImpl method setErrorPropagation.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void setErrorPropagation(ErrorPropagation newErrorPropagation) {
    ErrorPropagation oldErrorPropagation = errorPropagation;
    errorPropagation = newErrorPropagation;
    if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, PropagationGraphPackage.PROPAGATION_PATH_END__ERROR_PROPAGATION, oldErrorPropagation, errorPropagation));
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) ErrorPropagation(org.osate.xtext.aadl2.errormodel.errorModel.ErrorPropagation)

Aggregations

ErrorPropagation (org.osate.xtext.aadl2.errormodel.errorModel.ErrorPropagation)64 ComponentInstance (org.osate.aadl2.instance.ComponentInstance)20 TypeSet (org.osate.xtext.aadl2.errormodel.errorModel.TypeSet)20 TypeToken (org.osate.xtext.aadl2.errormodel.errorModel.TypeToken)18 NamedElement (org.osate.aadl2.NamedElement)15 ErrorBehaviorState (org.osate.xtext.aadl2.errormodel.errorModel.ErrorBehaviorState)15 ErrorEvent (org.osate.xtext.aadl2.errormodel.errorModel.ErrorEvent)15 FeatureInstance (org.osate.aadl2.instance.FeatureInstance)13 EObject (org.eclipse.emf.ecore.EObject)10 ContainedNamedElement (org.osate.aadl2.ContainedNamedElement)10 ErrorSource (org.osate.xtext.aadl2.errormodel.errorModel.ErrorSource)10 Classifier (org.osate.aadl2.Classifier)8 ConditionElement (org.osate.xtext.aadl2.errormodel.errorModel.ConditionElement)7 ErrorFlow (org.osate.xtext.aadl2.errormodel.errorModel.ErrorFlow)7 BasicEList (org.eclipse.emf.common.util.BasicEList)6 ErrorModelSubclause (org.osate.xtext.aadl2.errormodel.errorModel.ErrorModelSubclause)6 PropagationPoint (org.osate.xtext.aadl2.errormodel.errorModel.PropagationPoint)6 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)5 Event (org.osate.aadl2.errormodel.FaultTree.Event)5 ErrorPath (org.osate.xtext.aadl2.errormodel.errorModel.ErrorPath)5