use of org.osate.xtext.aadl2.errormodel.errorModel.EMV2PropertyAssociation 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);
}
}
}
use of org.osate.xtext.aadl2.errormodel.errorModel.EMV2PropertyAssociation in project osate2 by osate.
the class FHAReport method processHazards.
protected void processHazards(ConnectionInstance conni, WriteToFile report) {
ErrorSource ces = EMV2Util.findConnectionErrorSourceForConnection(conni);
if (ces == null) {
return;
}
Element localContext = null;
// error propagation is originating hazard
TypeSet ts = ces.getTypeTokenConstraint();
List<EMV2PropertyAssociation> HazardPA = getHazardsPropertyInCurrentFormat(conni, ces, ts);
List<EMV2PropertyAssociation> Sev = EMV2Properties.getSeverityProperty(conni, ces, ts);
List<EMV2PropertyAssociation> Like = EMV2Properties.getLikelihoodProperty(conni, ces, ts);
NamedElement target = ces;
// XXX we may have more than one matching hazard
if (!HazardPA.isEmpty()) {
reportHazardProperty(conni, HazardPA, Sev, Like, target, ts, localContext, report);
}
}
use of org.osate.xtext.aadl2.errormodel.errorModel.EMV2PropertyAssociation in project osate2 by osate.
the class PropagationGraphBackwardTraversal method traverseErrorBehaviorState.
/**
* process error state. Recursively deal with source states of transitions (an PRIORITY AND gate).
* We only process error events (not recover or repair) and error propagations referenced by the expression.
* @param component ComponentInstance
* @param state ErrorBehaviorState
* @param type ErrorTypes
* @return EObject (can be null)
*/
public EObject traverseErrorBehaviorState(ComponentInstance component, ErrorBehaviorState state, TypeToken type, BigDecimal inscale) {
if (state == null) {
return null;
}
List<EObject> subResults = new LinkedList<EObject>();
Collection<ErrorBehaviorTransition> transitions = EMV2Util.getAllErrorBehaviorTransitions(component);
BigDecimal combinedscale = inscale;
for (ErrorBehaviorTransition ebt : transitions) {
ConditionExpression conditionExpression = null;
BigDecimal branchscale = BigOne;
boolean sameState = false;
Collection<TypeToken> newtypes = new LinkedList<TypeToken>();
if (ebt.getTarget() != null && EMV2Util.isSame(state, ebt.getTarget())) {
if (ebt.getTargetToken() != null) {
Collection<TypeToken> filteredtypes = filterTokenThroughConstraint(ebt.getTargetToken(), type);
for (TypeToken filteredtype : filteredtypes) {
if (contains(ebt.getTargetToken(), filteredtype)) {
conditionExpression = ebt.getCondition();
if (ebt.getSource() != null && EMV2Util.isSame(state, ebt.getSource()) && isSame(type, ebt.getTypeTokenConstraint())) {
sameState = true;
newtypes.add(filteredtype);
}
}
}
} else {
conditionExpression = ebt.getCondition();
if (ebt.getSource() != null && EMV2Util.isSame(state, ebt.getSource()) && isSame(type, ebt.getTypeTokenConstraint())) {
sameState = true;
newtypes.add(type);
}
}
} else if (!ebt.getDestinationBranches().isEmpty()) {
// deal with transition branches
EList<TransitionBranch> tbs = ebt.getDestinationBranches();
for (TransitionBranch transitionBranch : tbs) {
if (ebt.getSource() != null && EMV2Util.isSame(ebt.getSource(), transitionBranch.getTarget()) && ebt.getSource().getTypeSet() == null && transitionBranch.getTarget().getTypeSet() == null) {
sameState = true;
}
if (transitionBranch.getTarget() != null) {
if (EMV2Util.isSame(transitionBranch.getTarget(), state)) {
if (ebt.getTargetToken() != null) {
Collection<TypeToken> filteredtypes = filterTokenThroughConstraint(ebt.getTargetToken(), type);
for (TypeToken filteredtype : filteredtypes) {
if (contains(transitionBranch.getTargetToken(), filteredtype)) {
conditionExpression = ebt.getCondition();
if (EMV2Util.isSame(ebt.getSource(), state) && isSame(type, ebt.getTypeTokenConstraint())) {
sameState = true;
newtypes.add(filteredtype);
}
}
}
} else {
conditionExpression = ebt.getCondition();
}
}
} else if (transitionBranch.isSteadyState()) {
// same state
if (ebt.getSource() != null && EMV2Util.isSame(state, ebt.getSource()) && isSame(type, ebt.getTypeTokenConstraint())) {
conditionExpression = ebt.getCondition();
sameState = true;
newtypes.add(type);
}
}
if (conditionExpression != null) {
// get branch prob value
BranchValue val = transitionBranch.getValue();
if (val.getRealvalue() != null) {
branchscale = new BigDecimal(EMV2Util.stripUnderScore(val.getRealvalue()));
} else if (val.getSymboliclabel() != null) {
Classifier cl = EMV2Util.getAssociatedClassifier(ebt);
List<EMV2PropertyAssociation> pa = EMV2Properties.getProperty(val.getSymboliclabel().getQualifiedName(), cl, ebt, null);
for (EMV2PropertyAssociation emv2PropertyAssociation : pa) {
branchscale = BigDecimal.valueOf(EMV2Properties.getRealValue(emv2PropertyAssociation));
}
} else if (val.isOthers()) {
branchscale = BigOne;
for (TransitionBranch tb : tbs) {
BranchValue valcount = tb.getValue();
if (valcount.getRealvalue() != null) {
branchscale = branchscale.subtract(new BigDecimal(EMV2Util.stripUnderScore(valcount.getRealvalue())));
} else if (valcount.getSymboliclabel() != null) {
Classifier cl = EMV2Util.getAssociatedClassifier(ebt);
List<EMV2PropertyAssociation> pa = EMV2Properties.getProperty(valcount.getSymboliclabel().getQualifiedName(), cl, ebt, null);
for (EMV2PropertyAssociation emv2PropertyAssociation : pa) {
branchscale = branchscale.subtract(new BigDecimal(EMV2Properties.getRealValue(emv2PropertyAssociation)));
}
}
}
}
// XXX why break?
break;
}
}
} else if (ebt.isSteadyState()) {
// same state
if (ebt.getSource() != null && EMV2Util.isSame(state, ebt.getSource()) && isSame(type, ebt.getTypeTokenConstraint())) {
conditionExpression = ebt.getCondition();
sameState = true;
newtypes.add(type);
}
}
combinedscale = inscale.multiply(branchscale);
if (!sameState && conditionExpression != null) {
// don't include transition staying in same state
EObject conditionResult = processCondition(component, conditionExpression, newtypes == null ? type : null, combinedscale, false);
// we also do not traverse back if left is allstates.
if (conditionResult != null) {
EObject stateResult = null;
if (!(sameState || ebt.isAllStates())) {
if (newtypes.isEmpty()) {
stateResult = traverseErrorBehaviorState(component, ebt.getSource(), null, combinedscale);
} else {
List<EObject> subsubResults = new LinkedList<EObject>();
for (TypeToken typeToken : newtypes) {
EObject newEvent = traverseErrorBehaviorState(component, state, typeToken, combinedscale);
if (newEvent != null) {
addSubresult(subsubResults, newEvent);
}
}
if (subsubResults.isEmpty()) {
stateResult = processErrorBehaviorState(component, state, type, inscale);
} else if (subsubResults.size() == 1) {
stateResult = subsubResults.get(0);
} else {
stateResult = processTypesetElements(component, state, type, subsubResults, combinedscale);
}
}
}
if (stateResult != null) {
EObject tmpresult = processTransitionCondition(component, ebt.getSource(), type, conditionResult, stateResult, combinedscale);
if (tmpresult != null) {
addSubresult(subResults, tmpresult);
}
} else if (stateResult == null) {
addSubresult(subResults, conditionResult);
}
}
}
}
if (!subResults.isEmpty()) {
return postProcessErrorBehaviorState(component, state, type, subResults, combinedscale);
}
// or if no transitions specified for state machine
if (transitions.isEmpty()) {
// processErrorBehaviorState(component, state, type);
return traverseCompositeErrorStateOnly(component, state, type, inscale);
} else {
// Do not include
return null;
}
}
use of org.osate.xtext.aadl2.errormodel.errorModel.EMV2PropertyAssociation in project osate-plugin by sireum.
the class Emv2Visitor method errorTransition.
// private org.sireum.hamr.ir.Property emv2Property(EMV2PropertyAssociation epa, List<String> path) {
// Property prop = epa.getProperty();
// final NamedElement cont = (NamedElement) epa.eContainer();
//
// List<PropertyValue> values = VisitorUtil.iList();
// try {
// PropertyExpression pe = PropertyUtils.getSimplePropertyValue(cont, prop);
// values = new Visitor().getPropertyExpressionValue(pe, path);
// } catch (Throwable t) {
// java.lang.System.err.println("Error encountered while trying to fetch property value for "
// + prop.getQualifiedName() + " from " + cont.getQualifiedName() + " : " + t.getMessage());
// }
//
// return factory.property(
// factory.name(VisitorUtil.add(path, epa.getProperty().getName()), VisitorUtil.buildPosInfo(prop)),
// values);
// }
private org.sireum.hamr.ir.ErrorTransition errorTransition(ErrorBehaviorTransition ebt, List<String> path) {
List<String> cp = (ebt.getName() != null) ? VisitorUtil.add(path, ebt.getName()) : path;
Name name = null;
if (ebt.getName() != null) {
factory.name(cp, VisitorUtil.buildPosInfo(ebt));
}
Name source = null;
if (ebt.isAllStates()) {
if (ebt.getOwner() instanceof ComponentInstance && EMV2Util.getAllErrorBehaviorStates((ComponentInstance) ebt.getOwner()).isEmpty()) {
source = getStateName(EMV2Util.getAllErrorBehaviorStates((ComponentInstance) ebt.getOwner()).stream().findFirst().get());
}
source = factory.name(VisitorUtil.add(VisitorUtil.iList(), ALL_STATE), VisitorUtil.buildPosInfo(ebt));
} else {
source = getStateName(ebt.getSource());
}
org.sireum.hamr.ir.ErrorCondition condition = errorCondition(ebt.getCondition(), path);
Name target = null;
if (ebt.getTarget() != null) {
target = getStateName(ebt.getTarget());
} else {
target = ebt.getDestinationBranches().stream().map(db -> getStateName(db.getTarget())).collect(Collectors.toList()).get(// TODO: Support branching with probability
0);
}
return factory.errorTransition(name, source, condition, target);
}
use of org.osate.xtext.aadl2.errormodel.errorModel.EMV2PropertyAssociation in project osate2 by osate.
the class AbstractErrorModelSemanticSequencer method sequence.
@Override
public void sequence(ISerializationContext context, EObject semanticObject) {
EPackage epackage = semanticObject.eClass().getEPackage();
ParserRule rule = context.getParserRule();
Action action = context.getAssignedAction();
Set<Parameter> parameters = context.getEnabledBooleanParameters();
if (epackage == Aadl2Package.eINSTANCE)
switch(semanticObject.eClass().getClassifierID()) {
case Aadl2Package.ARRAY_RANGE:
sequence_ArrayRange(context, (ArrayRange) semanticObject);
return;
case Aadl2Package.BASIC_PROPERTY_ASSOCIATION:
sequence_FieldPropertyAssociation(context, (BasicPropertyAssociation) semanticObject);
return;
case Aadl2Package.BOOLEAN_LITERAL:
sequence_BooleanLiteral(context, (BooleanLiteral) semanticObject);
return;
case Aadl2Package.CLASSIFIER_VALUE:
sequence_ComponentClassifierTerm(context, (ClassifierValue) semanticObject);
return;
case Aadl2Package.COMPUTED_VALUE:
sequence_ComputedTerm(context, (ComputedValue) semanticObject);
return;
case Aadl2Package.CONTAINED_NAMED_ELEMENT:
sequence_ContainmentPath(context, (ContainedNamedElement) semanticObject);
return;
case Aadl2Package.CONTAINMENT_PATH_ELEMENT:
sequence_ContainmentPathElement(context, (ContainmentPathElement) semanticObject);
return;
case Aadl2Package.INTEGER_LITERAL:
sequence_IntegerTerm(context, (IntegerLiteral) semanticObject);
return;
case Aadl2Package.LIST_VALUE:
sequence_ListTerm(context, (ListValue) semanticObject);
return;
case Aadl2Package.MODAL_PROPERTY_VALUE:
if (rule == grammarAccess.getModalPropertyValueRule()) {
sequence_ModalPropertyValue(context, (ModalPropertyValue) semanticObject);
return;
} else if (rule == grammarAccess.getOptionalModalPropertyValueRule()) {
sequence_OptionalModalPropertyValue(context, (ModalPropertyValue) semanticObject);
return;
} else if (rule == grammarAccess.getPropertyValueRule()) {
sequence_PropertyValue(context, (ModalPropertyValue) semanticObject);
return;
} else
break;
case Aadl2Package.NAMED_VALUE:
if (rule == grammarAccess.getConstantValueRule() || rule == grammarAccess.getNumAltRule()) {
sequence_ConstantValue(context, (NamedValue) semanticObject);
return;
} else if (rule == grammarAccess.getPropertyExpressionRule() || rule == grammarAccess.getLiteralorReferenceTermRule()) {
sequence_LiteralorReferenceTerm(context, (NamedValue) semanticObject);
return;
} else
break;
case Aadl2Package.OPERATION:
sequence_SignedConstant(context, (Operation) semanticObject);
return;
case Aadl2Package.PROPERTY_ASSOCIATION:
if (rule == grammarAccess.getBasicPropertyAssociationRule()) {
sequence_BasicPropertyAssociation(context, (PropertyAssociation) semanticObject);
return;
} else if (rule == grammarAccess.getPModelRule() || rule == grammarAccess.getContainedPropertyAssociationRule()) {
sequence_ContainedPropertyAssociation(context, (PropertyAssociation) semanticObject);
return;
} else if (rule == grammarAccess.getPropertyAssociationRule()) {
sequence_PropertyAssociation(context, (PropertyAssociation) semanticObject);
return;
} else
break;
case Aadl2Package.RANGE_VALUE:
sequence_NumericRangeTerm(context, (RangeValue) semanticObject);
return;
case Aadl2Package.REAL_LITERAL:
sequence_RealTerm(context, (RealLiteral) semanticObject);
return;
case Aadl2Package.RECORD_VALUE:
if (rule == grammarAccess.getOldRecordTermRule()) {
sequence_OldRecordTerm(context, (RecordValue) semanticObject);
return;
} else if (rule == grammarAccess.getPropertyExpressionRule() || rule == grammarAccess.getRecordTermRule()) {
sequence_RecordTerm(context, (RecordValue) semanticObject);
return;
} else
break;
case Aadl2Package.REFERENCE_VALUE:
sequence_ReferenceTerm(context, (ReferenceValue) semanticObject);
return;
case Aadl2Package.STRING_LITERAL:
sequence_StringTerm(context, (StringLiteral) semanticObject);
return;
}
else if (epackage == ErrorModelPackage.eINSTANCE)
switch(semanticObject.eClass().getClassifierID()) {
case ErrorModelPackage.ALL_EXPRESSION:
if (rule == grammarAccess.getElementRule() || rule == grammarAccess.getConditionExpressionRule() || action == grammarAccess.getConditionExpressionAccess().getOrExpressionOperandsAction_1_0() || rule == grammarAccess.getAndExpressionRule() || action == grammarAccess.getAndExpressionAccess().getAndExpressionOperandsAction_1_0() || rule == grammarAccess.getAllExpressionRule() || rule == grammarAccess.getConditionTermRule()) {
sequence_AllExpression(context, (AllExpression) semanticObject);
return;
} else if (rule == grammarAccess.getSConditionExpressionRule() || action == grammarAccess.getSConditionExpressionAccess().getOrExpressionOperandsAction_1_0() || rule == grammarAccess.getSAndExpressionRule() || action == grammarAccess.getSAndExpressionAccess().getAndExpressionOperandsAction_1_0() || rule == grammarAccess.getSAllExpressionRule() || rule == grammarAccess.getSConditionTermRule()) {
sequence_SAllExpression(context, (AllExpression) semanticObject);
return;
} else
break;
case ErrorModelPackage.AND_EXPRESSION:
if (rule == grammarAccess.getElementRule() || rule == grammarAccess.getConditionExpressionRule() || action == grammarAccess.getConditionExpressionAccess().getOrExpressionOperandsAction_1_0() || rule == grammarAccess.getAndExpressionRule() || action == grammarAccess.getAndExpressionAccess().getAndExpressionOperandsAction_1_0() || rule == grammarAccess.getConditionTermRule()) {
sequence_AndExpression(context, (AndExpression) semanticObject);
return;
} else if (rule == grammarAccess.getSConditionExpressionRule() || action == grammarAccess.getSConditionExpressionAccess().getOrExpressionOperandsAction_1_0() || rule == grammarAccess.getSAndExpressionRule() || action == grammarAccess.getSAndExpressionAccess().getAndExpressionOperandsAction_1_0() || rule == grammarAccess.getSConditionTermRule()) {
sequence_SAndExpression(context, (AndExpression) semanticObject);
return;
} else
break;
case ErrorModelPackage.BRANCH_VALUE:
sequence_BranchValue(context, (BranchValue) semanticObject);
return;
case ErrorModelPackage.COMPOSITE_STATE:
sequence_CompositeState(context, (CompositeState) semanticObject);
return;
case ErrorModelPackage.CONDITION_ELEMENT:
sequence_ConditionElement(context, (ConditionElement) semanticObject);
return;
case ErrorModelPackage.EMV2_PATH:
if (rule == grammarAccess.getBasicEMV2PathRule()) {
sequence_BasicEMV2Path(context, (EMV2Path) semanticObject);
return;
} else if (rule == grammarAccess.getElementRule() || rule == grammarAccess.getEMV2PathRule()) {
sequence_EMV2Path(context, (EMV2Path) semanticObject);
return;
} else
break;
case ErrorModelPackage.EMV2_PATH_ELEMENT:
if (rule == grammarAccess.getEMV2ErrorPropagationPathRule()) {
sequence_EMV2ErrorPropagationPath(context, (EMV2PathElement) semanticObject);
return;
} else if (rule == grammarAccess.getEMV2PathElementOrKindRule()) {
sequence_EMV2PathElementOrKind(context, (EMV2PathElement) semanticObject);
return;
} else if (rule == grammarAccess.getElementRule() || rule == grammarAccess.getEMV2PathElementRule()) {
sequence_EMV2PathElement(context, (EMV2PathElement) semanticObject);
return;
} else
break;
case ErrorModelPackage.EMV2_PROPERTY_ASSOCIATION:
if (rule == grammarAccess.getBasicEMV2PropertyAssociationRule()) {
sequence_BasicEMV2PropertyAssociation(context, (EMV2PropertyAssociation) semanticObject);
return;
} else if (rule == grammarAccess.getElementRule() || rule == grammarAccess.getEMV2PropertyAssociationRule()) {
sequence_EMV2PropertyAssociation(context, (EMV2PropertyAssociation) semanticObject);
return;
} else
break;
case ErrorModelPackage.EMV2_ROOT:
sequence_EMV2Root(context, (EMV2Root) semanticObject);
return;
case ErrorModelPackage.ERROR_BEHAVIOR_STATE:
sequence_ErrorBehaviorState(context, (ErrorBehaviorState) semanticObject);
return;
case ErrorModelPackage.ERROR_BEHAVIOR_STATE_MACHINE:
sequence_ErrorBehaviorStateMachine(context, (ErrorBehaviorStateMachine) semanticObject);
return;
case ErrorModelPackage.ERROR_BEHAVIOR_TRANSITION:
sequence_ErrorBehaviorTransition(context, (ErrorBehaviorTransition) semanticObject);
return;
case ErrorModelPackage.ERROR_CODE_VALUE:
sequence_ErrorCodeValue(context, (ErrorCodeValue) semanticObject);
return;
case ErrorModelPackage.ERROR_DETECTION:
sequence_ErrorDetection(context, (ErrorDetection) semanticObject);
return;
case ErrorModelPackage.ERROR_EVENT:
sequence_ErrorEvent(context, (ErrorEvent) semanticObject);
return;
case ErrorModelPackage.ERROR_MODEL_LIBRARY:
if (rule == grammarAccess.getEMV2LibraryRule()) {
sequence_EMV2Library(context, (ErrorModelLibrary) semanticObject);
return;
} else if (rule == grammarAccess.getAnnexLibraryRule() || rule == grammarAccess.getNamedElementRule() || rule == grammarAccess.getErrorModelLibraryRule()) {
sequence_ErrorModelLibrary(context, (ErrorModelLibrary) semanticObject);
return;
} else
break;
case ErrorModelPackage.ERROR_MODEL_SUBCLAUSE:
if (rule == grammarAccess.getEMV2SubclauseRule()) {
sequence_EMV2Subclause(context, (ErrorModelSubclause) semanticObject);
return;
} else if (rule == grammarAccess.getAnnexSubclauseRule() || rule == grammarAccess.getModalElementRule() || rule == grammarAccess.getErrorModelSubclauseRule()) {
sequence_ErrorModelSubclause(context, (ErrorModelSubclause) semanticObject);
return;
} else
break;
case ErrorModelPackage.ERROR_PATH:
sequence_ErrorPath(context, (ErrorPath) semanticObject);
return;
case ErrorModelPackage.ERROR_PROPAGATION:
sequence_ErrorPropagation(context, (ErrorPropagation) semanticObject);
return;
case ErrorModelPackage.ERROR_SINK:
sequence_ErrorSink(context, (ErrorSink) semanticObject);
return;
case ErrorModelPackage.ERROR_SOURCE:
sequence_ErrorSource(context, (ErrorSource) semanticObject);
return;
case ErrorModelPackage.ERROR_STATE_TO_MODE_MAPPING:
sequence_ErrorStateToModeMapping(context, (ErrorStateToModeMapping) semanticObject);
return;
case ErrorModelPackage.ERROR_TYPE:
sequence_TypeDefinition(context, (ErrorType) semanticObject);
return;
case ErrorModelPackage.FEATUREOR_PP_REFERENCE:
sequence_FeatureorPPReference(context, (FeatureorPPReference) semanticObject);
return;
case ErrorModelPackage.IF_CONDITION:
sequence_IfCondition(context, (IfCondition) semanticObject);
return;
case ErrorModelPackage.OR_EXPRESSION:
if (rule == grammarAccess.getElementRule() || rule == grammarAccess.getConditionExpressionRule() || action == grammarAccess.getConditionExpressionAccess().getOrExpressionOperandsAction_1_0() || rule == grammarAccess.getAndExpressionRule() || action == grammarAccess.getAndExpressionAccess().getAndExpressionOperandsAction_1_0() || rule == grammarAccess.getConditionTermRule()) {
sequence_ConditionExpression(context, (OrExpression) semanticObject);
return;
} else if (rule == grammarAccess.getSConditionExpressionRule() || action == grammarAccess.getSConditionExpressionAccess().getOrExpressionOperandsAction_1_0() || rule == grammarAccess.getSAndExpressionRule() || action == grammarAccess.getSAndExpressionAccess().getAndExpressionOperandsAction_1_0() || rule == grammarAccess.getSConditionTermRule()) {
sequence_SConditionExpression(context, (OrExpression) semanticObject);
return;
} else
break;
case ErrorModelPackage.ORLESS_EXPRESSION:
if (rule == grammarAccess.getElementRule() || rule == grammarAccess.getConditionExpressionRule() || action == grammarAccess.getConditionExpressionAccess().getOrExpressionOperandsAction_1_0() || rule == grammarAccess.getAndExpressionRule() || action == grammarAccess.getAndExpressionAccess().getAndExpressionOperandsAction_1_0() || rule == grammarAccess.getOrlessExpressionRule() || rule == grammarAccess.getConditionTermRule()) {
sequence_OrlessExpression(context, (OrlessExpression) semanticObject);
return;
} else if (rule == grammarAccess.getSConditionExpressionRule() || action == grammarAccess.getSConditionExpressionAccess().getOrExpressionOperandsAction_1_0() || rule == grammarAccess.getSAndExpressionRule() || action == grammarAccess.getSAndExpressionAccess().getAndExpressionOperandsAction_1_0() || rule == grammarAccess.getSOrlessExpressionRule() || rule == grammarAccess.getSConditionTermRule()) {
sequence_SOrlessExpression(context, (OrlessExpression) semanticObject);
return;
} else
break;
case ErrorModelPackage.ORMORE_EXPRESSION:
if (rule == grammarAccess.getElementRule() || rule == grammarAccess.getConditionExpressionRule() || action == grammarAccess.getConditionExpressionAccess().getOrExpressionOperandsAction_1_0() || rule == grammarAccess.getAndExpressionRule() || action == grammarAccess.getAndExpressionAccess().getAndExpressionOperandsAction_1_0() || rule == grammarAccess.getOrmoreExpressionRule() || rule == grammarAccess.getConditionTermRule()) {
sequence_OrmoreExpression(context, (OrmoreExpression) semanticObject);
return;
} else if (rule == grammarAccess.getSConditionExpressionRule() || action == grammarAccess.getSConditionExpressionAccess().getOrExpressionOperandsAction_1_0() || rule == grammarAccess.getSAndExpressionRule() || action == grammarAccess.getSAndExpressionAccess().getAndExpressionOperandsAction_1_0() || rule == grammarAccess.getSOrmoreExpressionRule() || rule == grammarAccess.getSConditionTermRule()) {
sequence_SOrmoreExpression(context, (OrmoreExpression) semanticObject);
return;
} else
break;
case ErrorModelPackage.OUTGOING_PROPAGATION_CONDITION:
sequence_OutgoingPropagationCondition(context, (OutgoingPropagationCondition) semanticObject);
return;
case ErrorModelPackage.PROPAGATION_PATH:
sequence_PropagationPath(context, (PropagationPath) semanticObject);
return;
case ErrorModelPackage.PROPAGATION_POINT:
sequence_PropagationPoint(context, (PropagationPoint) semanticObject);
return;
case ErrorModelPackage.QUALIFIED_ERROR_BEHAVIOR_STATE:
sequence_QualifiedErrorBehaviorState(context, (QualifiedErrorBehaviorState) semanticObject);
return;
case ErrorModelPackage.QUALIFIED_ERROR_EVENT_OR_PROPAGATION:
sequence_QualifiedErrorEventOrPropagation(context, (QualifiedErrorEventOrPropagation) semanticObject);
return;
case ErrorModelPackage.QUALIFIED_ERROR_PROPAGATION:
sequence_QualifiedErrorPropagation(context, (QualifiedErrorPropagation) semanticObject);
return;
case ErrorModelPackage.QUALIFIED_PROPAGATION_POINT:
sequence_QualifiedPropagationPoint(context, (QualifiedPropagationPoint) semanticObject);
return;
case ErrorModelPackage.RECOVER_EVENT:
sequence_RecoverEvent(context, (RecoverEvent) semanticObject);
return;
case ErrorModelPackage.REPAIR_EVENT:
sequence_RepairEvent(context, (RepairEvent) semanticObject);
return;
case ErrorModelPackage.REPORTING_PORT_REFERENCE:
sequence_ReportingPortReference(context, (ReportingPortReference) semanticObject);
return;
case ErrorModelPackage.SCONDITION_ELEMENT:
sequence_SConditionElement(context, (SConditionElement) semanticObject);
return;
case ErrorModelPackage.SUBCOMPONENT_ELEMENT:
sequence_SubcomponentElement(context, (SubcomponentElement) semanticObject);
return;
case ErrorModelPackage.TRANSITION_BRANCH:
sequence_TransitionBranch(context, (TransitionBranch) semanticObject);
return;
case ErrorModelPackage.TYPE_MAPPING:
sequence_TypeMapping(context, (TypeMapping) semanticObject);
return;
case ErrorModelPackage.TYPE_MAPPING_SET:
sequence_TypeMappingSet(context, (TypeMappingSet) semanticObject);
return;
case ErrorModelPackage.TYPE_SET:
if (rule == grammarAccess.getNoErrorTypeSetRule()) {
sequence_NoErrorTypeSet(context, (TypeSet) semanticObject);
return;
} else if (rule == grammarAccess.getTypeTokenOrNoErrorRule() || rule == grammarAccess.getTypeTokenConstraintNoErrorRule()) {
sequence_NoErrorTypeSet_TypeSetConstructor(context, (TypeSet) semanticObject);
return;
} else if (rule == grammarAccess.getTypeSetConstructorRule() || rule == grammarAccess.getTypeSetReferenceRule() || rule == grammarAccess.getTypeTokenRule() || rule == grammarAccess.getTypeTokenConstraintRule()) {
sequence_TypeSetConstructor(context, (TypeSet) semanticObject);
return;
} else if (rule == grammarAccess.getNamedElementRule() || rule == grammarAccess.getErrorTypesRule() || rule == grammarAccess.getTypeSetDefinitionRule()) {
sequence_TypeSetDefinition(context, (TypeSet) semanticObject);
return;
} else
break;
case ErrorModelPackage.TYPE_TOKEN:
if (rule == grammarAccess.getNoErrorTypeTokenRule()) {
sequence_NoErrorTypeToken(context, (TypeToken) semanticObject);
return;
} else if (rule == grammarAccess.getElementRule() || rule == grammarAccess.getTypeSetElementRule()) {
sequence_TypeSetElement(context, (TypeToken) semanticObject);
return;
} else
break;
case ErrorModelPackage.TYPE_TRANSFORMATION:
sequence_TypeTransformation(context, (TypeTransformation) semanticObject);
return;
case ErrorModelPackage.TYPE_TRANSFORMATION_SET:
sequence_TypeTransformationSet(context, (TypeTransformationSet) semanticObject);
return;
}
if (errorAcceptor != null)
errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Aggregations