Closed suweining closed 9 years ago
//////////////////////////////////// Ambiguity 1)////////////////////////////////////////////////
syntax UniCmpImplRef ::= AmbIdPointId | PkgName MDoubleColon AmbIdPointId
syntax PkgName ::= Id | Id MDoubleColon PkgName
The same product:Id MDoubleColon Id
//////////////////////////////////// Solution//////////////////////////////////////////////////
syntax UniCmpImplRef ::= Id | Id MPoint Id | PkgName MDoubleColon Id | PkgName MDoubleColon Id MPoint Id
==>>
syntax UniCmpImplRef ::= PkgName | Id MPoint Id | PkgName MDoubleColon Id MPoint Id
//////////////////////////////////// Ambiguity 2)////////////////////////////////////////////////
1: PpeListValue ::= MBracketLeft PpeExpressionWithoutBooleanTerm MBracketRight
2: AmbBracketLeftIdBracketRight ::= MBracketLeft Id MBracketRight
syntax PpeListValue ::= MBracketLeft MBracketRight | MBracketLeft PpeListValue MBracketRight | MBracketLeft PpeListValue MComma PpeListValueMidSymbol MBracketRight | MBracketLeft PpeExpression MComma PpeListValueMidSymbol MBracketRight | MBracketLeft PpeExpressionWithoutBooleanTerm MBracketRight | AmbBracketLeftBooleanTermBracketRight
//////////////////////////////////// Solution//////////////////////////////////////////////////
Just join the AmbBracketLeftIdBracketRight in to the defination of PpeListValue
syntax PpeListValue ::= MBracketLeft MBracketRight | MBracketLeft PpeListValue MBracketRight | MBracketLeft PpeListValue MComma PpeListValueMidSymbol MBracketRight | MBracketLeft PpeExpression MComma PpeListValueMidSymbol MBracketRight | MBracketLeft PpeExpressionWithoutBooleanTerm MBracketRight | AmbBracketLeftBooleanTermBracketRight | AmbBracketLeftIdBracketRight
//////////////////////////////////// Ambiguity 4)//////////////////////////////////////////////// AmbEndToEndFlowSpecAssocDefaultPpeInMode, AmbBraceLeftPpeAssocBraceRight
syntax AmbEndToEndFlowSpecAssocDefaultPpeInMode ::= MBraceLeft PpeAssocList MBraceRight InModesAndTransitions | InModesAndTransitions | MBraceLeft PpeAssoc PpeAssocList MBraceRight | MBraceLeft PpeAssoc MBraceRight
syntax AmbBraceLeftPpeAssocBraceRight ::= MBraceLeft PpeAssoc MBraceRight
//////////////////////////////////// Solution//////////////////////////////////////////////////
syntax AmbEndToEndFlowSpecAssocDefaultPpeInMode ::= MBraceLeft PpeAssocList MBraceRight InModesAndTransitions | InModesAndTransitions | MBraceLeft PpeAssoc PpeAssocList MBraceRight | AmbBraceLeftPpeAssocBraceRight
//////////////////////////////////// Ambiguity 5)///////////////////////////////////////////////
syntax ProtoType ::= Id Mcolon ProtoTypeDef MBraceLeft ProtoTypePpeAssocList MBraceRight MSemicolon
| Id Mcolon FetGroupTypeProtoType MSemicolon
| Id Mcolon FetProtoType MSemicolon
| Id Mcolon CmpCategory MDoubleBracket MSemicolon
| Id Mcolon AbstractCmpCategory UniCmpClassifierRef MSemicolon
| Id Mcolon ExecPlateformCategory UniCmpClassifierRef MSemicolon
| Id Mcolon CompositeCategory UniCmpClassifierRef MSemicolon
| Id Mcolon Mdata UniCmpClassifierRef MSemicolon
| Id Mcolon Msubprogram Mgroup UniCmpClassifierRef MSemicolon
| Id Mcolon Mthread UniCmpClassifierRef MSemicolon
| Id Mcolon Mthread Mgroup UniCmpClassifierRef MSemicolon
| Id Mcolon Mprocess UniCmpClassifierRef MSemicolon
| Id Mcolon Msubprogram Id MPoint Id MSemicolon
| Id Mcolon Msubprogram Id MDoubleColon PkgName MSemicolon
| Id Mcolon Msubprogram PkgName MDoubleColon AmbIdPointId MSemicolon
| Id Mcolon CmpCategory UniCmpClassifierRef MDoubleBracket MSemicolon
| AmbIdColonCmpCategorySemicolon
syntax SubCmp ::= AmbIdColonCmpCategorySemicolon | Id Mcolon AbstractCmpCategory SubCmpAssocDef MSemicolon | Id Mcolon ExecPlateformCategory SubCmpAssocDef MSemicolon | Id Mcolon CompositeCategory SubCmpAssocDef MSemicolon | Id Mcolon Mdata SubCmpAssocDef MSemicolon | Id Mcolon Msubprogram Mgroup SubCmpAssocDef MSemicolon | Id Mcolon Mthread SubCmpAssocDef MSemicolon | Id Mcolon Mthread Mgroup SubCmpAssocDef MSemicolon | Id Mcolon Mprocess SubCmpAssocDef MSemicolon | Id Mcolon Msubprogram SubCmpAssocDefElem SubCmpAssocDef MSemicolon | AmbIdColonSubprogramIdSemicolon | Id Mcolon Msubprogram Id MPoint Id MSemicolon | Id Mcolon Msubprogram Id MDoubleColon PkgName MSemicolon | Id Mcolon Msubprogram PkgName MDoubleColon AmbIdPointId MSemicolon | Id Mcolon Msubprogram UniCmpClassifierRef ProtoTypeBindings MSemicolon | Id Mcolon Msubprogram ArrayDimension MSemicolon | Id Mcolon Msubprogram ArrayDimensions ArrayElementImplList MSemicolon | Id Mcolon Msubprogram MBraceLeft PpeContainedPpeAssocList MBraceRight MSemicolon | Id Mcolon Msubprogram CmpInModes MSemicolon
syntax SubPgmCall ::= Id Mcolon Msubprogram AmbProcessorPointId MSemicolon | Id Mcolon Msubprogram CalledSubPgm MBraceLeft SubPgmCallPpeAssocList MBraceRight MSemicolon | Id Mcolon Msubprogram Id MPoint Id MSemicolon | AmbIdColonSubprogramIdSemicolon
The same product :Id Mcolon Msubprogram Id MPoint Id MSemicolon
//////////////////////////////////// Solution//////////////////////////////////////////////////
step1)
syntax AmbIdColonSubprogramIdPointIdSemicolon ::= Id Mcolon Msubprogram Id MPoint Id MSemicolon
step2)
syntax ProtoType ::= Id Mcolon ProtoTypeDef MBraceLeft ProtoTypePpeAssocList MBraceRight MSemicolon
| Id Mcolon FetGroupTypeProtoType MSemicolon
| Id Mcolon FetProtoType MSemicolon
| Id Mcolon CmpCategory MDoubleBracket MSemicolon
| Id Mcolon AbstractCmpCategory UniCmpClassifierRef MSemicolon
| Id Mcolon ExecPlateformCategory UniCmpClassifierRef MSemicolon
| Id Mcolon CompositeCategory UniCmpClassifierRef MSemicolon
| Id Mcolon Mdata UniCmpClassifierRef MSemicolon
| Id Mcolon Msubprogram Mgroup UniCmpClassifierRef MSemicolon
| Id Mcolon Mthread UniCmpClassifierRef MSemicolon
| Id Mcolon Mthread Mgroup UniCmpClassifierRef MSemicolon
| Id Mcolon Mprocess UniCmpClassifierRef MSemicolon
| AmbIdColonSubprogramIdPointIdSemicolon
| Id Mcolon Msubprogram Id MDoubleColon PkgName MSemicolon
| Id Mcolon Msubprogram PkgName MDoubleColon AmbIdPointId MSemicolon
| Id Mcolon CmpCategory UniCmpClassifierRef MDoubleBracket MSemicolon
| AmbIdColonCmpCategorySemicolon
step3)
syntax SubCmp ::= AmbIdColonCmpCategorySemicolon | Id Mcolon AbstractCmpCategory SubCmpAssocDef MSemicolon | Id Mcolon ExecPlateformCategory SubCmpAssocDef MSemicolon | Id Mcolon CompositeCategory SubCmpAssocDef MSemicolon | Id Mcolon Mdata SubCmpAssocDef MSemicolon | Id Mcolon Msubprogram Mgroup SubCmpAssocDef MSemicolon | Id Mcolon Mthread SubCmpAssocDef MSemicolon | Id Mcolon Mthread Mgroup SubCmpAssocDef MSemicolon | Id Mcolon Mprocess SubCmpAssocDef MSemicolon | Id Mcolon Msubprogram SubCmpAssocDefElem SubCmpAssocDef MSemicolon | AmbIdColonSubprogramIdSemicolon | AmbIdColonSubprogramIdPointIdSemicolon | Id Mcolon Msubprogram Id MDoubleColon PkgName MSemicolon | Id Mcolon Msubprogram PkgName MDoubleColon AmbIdPointId MSemicolon | Id Mcolon Msubprogram UniCmpClassifierRef ProtoTypeBindings MSemicolon | Id Mcolon Msubprogram ArrayDimension MSemicolon | Id Mcolon Msubprogram ArrayDimensions ArrayElementImplList MSemicolon | Id Mcolon Msubprogram MBraceLeft PpeContainedPpeAssocList MBraceRight MSemicolon | Id Mcolon Msubprogram CmpInModes MSemicolon
step4)
syntax SubPgmCall ::= Id Mcolon Msubprogram AmbProcessorPointId MSemicolon | Id Mcolon Msubprogram CalledSubPgm MBraceLeft SubPgmCallPpeAssocList MBraceRight MSemicolon | AmbIdColonSubprogramIdPointIdSemicolon | AmbIdColonSubprogramIdSemicolon
1)
1: UniCmpImplRef ::= PkgName MDoubleColon AmbIdPointId
2: PkgName ::= Id MDoubleColon PkgName
in BusComponentAccess.aadl ComponentTypes.aadl Devices.aadl FeatureGroupsAndFeatureGroupTypes.aadl SubprogramGroupsAndSubprogramGroupTypes.aadl
2)
1: PpeListValue ::= MBracketLeft PpeExpressionWithoutBooleanTerm MBracketRight ( TemperatureSensorHardwareModel ) 2: AmbBracketLeftIdBracketRight ::= MBracketLeft Id MBracketRight ( TemperatureSensorHardwareModel ) File: ../tests/unit/Devices.aadl Location: (18,39,18,73) Compilation Phase: Ambiguity filter
3)
SubCmpAssocDef, ModalPpeValue
in ModesAndModeTransitions.aadl
4)
AmbEndToEndFlowSpecAssocDefaultPpeInMode, AmbBraceLeftPpeAssocBraceRight
in Ports.aadl PropertyExpressions.aadl
5)
ProtoType, SubCmp, SubPgmCall
in SubprogramsAndSubprogramCalls.aadl