FormalADL / kAADL

1 stars 1 forks source link

Eliminate Ambiguity in logs #5

Closed suweining closed 9 years ago

suweining commented 9 years ago

1) File: ../tests/unit/SubprogramsAndSubprogramCalls.aadl Location: (12,3,12,25) Compilation Phase: Ambiguity filter the ambiguity syntax : 1: ParameterSpec ::= Id Mcolon Min Mparameter Id A : in parameter matrix 2: ParameterSpec ::= Id Mcolon Min Mparameter DataUniCmpClassifierRef A : in parameter matrix The reson of this ambiguity is that the definatin of DataUniCmpClassifierRef contain "Id". So the solution is just delete " ParameterSpec ::= Id Mcolon Min Mparameter Id "

ps.commit description in github is "eliminate ambiguity of DataUniCmpClassifierRef"

suweining commented 9 years ago

2) File: ../tests/unit/Packages.aadl Location: (3,31,3,49) Compilation Phase: Ambiguity filter

the ambiguity syntax :

1: ImportDeclPlus ::= MComma Id 2: ImportDeclPlus ::= MComma PkgName

The reson of this ambiguity is this: syntax PkgName ::= Id | PkgName MDoubleColon Id So,just delete "ImportDeclPlus ::= MComma Id "

suweining commented 9 years ago

3)File: ../tests/unit/FeatureGroupsAndFeatureGroupTypes.aadl Location: (35,27,35,53) Compilation Phase: Ambiguity filter

the ambiguity syntax : 1: InverseOfUniProtoType ::= Minverse Mof Id 2: InverseOfUniProtoType ::= Minverse Mof UniFetGroupTypeRef

The reson of this ambiguity is this: syntax UniFetGroupTypeRef ::= Id | PkgName MDoubleColon Id So,just delete " InverseOfUniProtoType ::= Minverse Mof Id "

suweining commented 9 years ago

4) File: ../tests/unit/PortConnections.aadl Location: (10,30,10,38) Compilation Phase: Ambiguity filter

the ambiguity syntax : 1: ArrayDimensions ::= ArrayDimension ArrayDimensions 2: SubCmpAssocDef ::= SubCmpAssocDefElem SubCmpAssocDef

The reson of this ambiguity is this: syntax SubCmpAssocDefElem ::= UniCmpClassifierRef | UniCmpClassifierRef ProtoTypeBindings | Id | ArrayDimensions | ArrayDimensions ArrayElementImplList | MBraceLeft PpeContainedPpeAssocList MBraceRight | CmpInModes

It should be "ArrayDimension" not "ArrayDimensions" ps.it is not careless but thinking

suweining commented 9 years ago

5)[Error] Critical: Parse error: Syntax error near unexpected character '.' File: ../tests/unit/PropertyExpressions.aadl Location: (6,59,6,59)

the error is: 4 thread implementation Producer.Basic 5 properties 6 Compute_Execution_Time => 0ms..10ms in binding ( powerpc.speed_350Mhz ); 7 Compute_Execution_Time => 0ms..8ms in binding ( powerpc.speed_450MHz ); 8 end Producer.Basic ;

the syntax of the error: syntax InBinding ::= Min Mbinding MBracketLeft PlatformClassifierRefList MBracketRight syntax PlatformClassifierRef ::= ProcessorUniCmpClassifierRef | VirtualProcessorUniCmpClassifierRef | Id | VirtualBusUniCmpClassifierRef | MemoryUniCmpClassifierRef however: syntax ProcessorUniCmpClassifierRef ::= NODEF syntax VirtualProcessorUniCmpClassifierRef ::= NODEF syntax VirtualBusUniCmpClassifierRef ::= NODEF syntax MemoryUniCmpClassifierRef ::= NODEF syntax NamedElementArraySelectionName ::= NODEF

the solution is :add "Id.Id" to PlatformClassifierRef .

suweining commented 9 years ago

6)[Error] Critical: Parse error: Syntax error near unexpected character 'i' File: ../tests/unit/EndToEndFlows.aadl Location: (15,50,15,50)

the error is: 1 process implementation foo.basic .... 13 flows 14 Flow1: flow path 15 signal -> conn1 -> A.fs1 -> conn2 -> result1 in modes (s1); 16 Flow3: flow sink initcmd -> connToThread -> B.fsink in modes (s1);

the syntax of the error:

syntax FlowPathImpl ::= Id Mcolon Mflow Mpath Id FlowPathImplDefault MArrows Id MPoint Id | Id Mcolon Mflow Mpath Id MArrows Id MPoint Id It should not be just " Id MPoint Id" ,add "Id" to it !

suweining commented 9 years ago

7) There has been a error : [Error] Critical: Parse error: Syntax error near unexpected character 's' File: ../tests/unit/PropertySetTest.aadl Location: (6,1,6,1)

The error position is: 1 property set set_of_faults is 2 comm_error_status: aadlboolean applies to (system11,device11); 3 Speed_Range: type range of aadlreal 0.0 ..150.0 units mph; 4 Maximum_Faults: constant aadlinteger => 3; 5 end set_of_faults; 6 system implementation data_processing.accelerometer_data 7 properties 8 set_of_faults::comm_error_status => true; 9 end data_processing.accelerometer_data;

Cause for this error is that "system implementation" follow by "property set".However our syntax about AADLSpecification :

module AADL imports AADL-SYNTAX syntax AADLSpecification ::= PkgSpecPpeSetList syntax PkgSpecPpeSetList ::= PkgSpecPpeSetListElem | PkgSpecPpeSetListElem PkgSpecPpeSetList syntax PkgSpecPpeSetListElem ::= PkgSpec | PpeSet | CmpType | CmpImpl | CmpTypeExt | CmpImplExt

endmodule

the error about "multi-package" is similar to this one. I can not find the reason.

nwpuzhangfan commented 9 years ago

great!

suweining notifications@github.com编写:

6)[Error] Critical: Parse error: Syntax error near unexpected character 'i' File: ../tests/unit/EndToEndFlows.aadl Location: (15,50,15,50)

the error is: 1 process implementation foo.basic .... 13 flows 14 Flow1: flow path 15 signal -> conn1 -> A.fs1 -> conn2 -> result1 in modes (s1); 16 Flow3: flow sink initcmd -> connToThread -> B.fsink in modes (s1);

the syntax of the error:

syntax FlowPathImpl ::= Id Mcolon Mflow Mpath Id FlowPathImplDefault MArrows Id MPoint Id | Id Mcolon Mflow Mpath Id MArrows Id MPoint Id It should not be just " Id MPoint Id" ,add "Id" to it !

— Reply to this email directly or view it on GitHub.

{"@context":"http://schema.org","@type":"EmailMessage","description":"View this Issue on GitHub","action":{"@type":"ViewAction","url":"https://github.com/FormalADL/kAADL/issues/5#issuecomment-60696876","name":"View Issue"}}

suweining commented 9 years ago

8) File: ../tests/unit/SubprogramGroupsAndSubprogramGroupTypes.aadl Location: (10,4,10,169) Compilation Phase: Ambiguity filter

the ambiguity syntax : 1: FetRefinement ::= AbstractFetRefinement ArrayDimensionFeatrueContrained MSemicolon 2: FetRefinement ::= PortRefinement ArrayDimensionFeatrueContrained MSemicolon

The reson of this ambiguity is this: The defination of AbstractFetRefinement contain PortRefinement .

Here the syntax about AbstractFetRefinement and FetRefinement :

syntax FetRefinement ::= AbstractFetRefinement MSemicolon | PortRefinement MSemicolon | FetGroupRefinement MSemicolon | SubCmpAccessRefinement MSemicolon | ParameterRefinement MSemicolon | AbstractFetRefinement ArrayDimensionFeatrueContrained MSemicolon | PortRefinement ArrayDimensionFeatrueContrained MSemicolon | FetGroupRefinement ArrayDimensionFeatrueContrained MSemicolon | SubCmpAccessRefinement ArrayDimensionFeatrueContrained MSemicolon | ParameterRefinement ArrayDimensionFeatrueContrained MSemicolon

syntax AbstractFetRefinement ::= Id Mcolon Mrefined Mto Min Mfeature Id | Id Mcolon Mrefined Mto Min Mfeature | Id Mcolon Mrefined Mto Mout Mfeature Id | Id Mcolon Mrefined Mto Mout Mfeature | PortRefinement | FetGroupRefinement | SubCmpAccessRefinement | ParameterRefinement So,the "PortRefinement MSemicolon","FetGroupRefinement MSemicolon","SubCmpAccessRefinement MSemicolon " and "ParameterRefinement MSemicolon" should be removed from defination of FetRefinement .Also should delete "PortRefinement ArrayDimensionFeatrueContrained MSemicolon"," FetGroupRefinement ArrayDimensionFeatrueContrained MSemicolon ","SubCmpAccessRefinement ArrayDimensionFeatrueContrained MSemicolon" and " ParameterRefinement ArrayDimensionFeatrueContrained MSemicolon" .