FormalADL / kAADL

1 stars 1 forks source link

Ambiguity about " Identifier . Identifier " #3

Closed suweining closed 10 years ago

suweining commented 10 years ago

After a period of time ,our kAADL can krun test files. Howerver,the kAADL has some ambiguities;and the number of warnings in the error log is horrendous. Here paste some warnings:

1: PkgDeclations ::= PkgDeclations PkgDeclations amb( amb( ((thread Voter (features (((Input : in (data port)) ([ 3 ]) ;) (( Output : out (data port)) ;))) end Voter ;) (thread Processing ( features (((Input : in (data port)) ;) ((Result : out (data port)) ; ))) end Processing ;)) ((thread group) Redundant_Processing ( features (((Input : in (data port)) ;) ((Result : out (data port)) ; ))) end Redundant_Processing ;), (thread Voter (features (((Input : in (data port)) ([ 3 ]) ;) ((Output : out (data port)) ;))) end Voter ;) ((thread Processing (features (((Input : in (data port)) ;) ((Result : out (data port)) ;))) end

         Processing ;) ((thread group) Redundant_Processing (features (((
         Input : in (data port)) ;) ((Result : out (data port)) ;))) end 
         Redundant_Processing ;))
   ) ((thread group) implementation (Redundant_Processing . basic) ((
     subcomponents ((processing : thread (Processing ([ 3 ])) ;) (voting : 
     thread voter ;))) (connections amb(
       (voteconn : ((port amb(
           processing . Result,
           processing . Result
       ) -> amb(
           voting . Input,
           voting . Input
       )) ({ (Connection_Pattern => amb(
           ( One_To_One ),
           ( One_To_One )
       ) ;) })) ;) ((procconn : (port Input -> amb(
           processing . Input,
           processing . Input
       )) ;) (recon : (port amb(
           voting . Output,
           voting . Output
       ) -> Result) ;)),
       ((voteconn : ((port amb(
           processing . Result,
           processing . Result
       ) -> amb(
           voting . Input,
           voting . Input
       )) ({ (Connection_Pattern => amb(
           ( One_To_One ),
           ( One_To_One )
       ) ;) })) ;) (procconn : (port Input -> amb(
           processing . Input,
           processing . Input
       )) ;)) (recon : (port amb(
           voting . Output,
           voting . Output
       ) -> Result) ;)
   ))) end (Redundant_Processing . basic) ;),

the structure such as above fill the error log .

Ambiguity about "Identifier . Identifier" is due to that out syntax define many terms such as " syntax Identifier ::= Id " .For example, there are syntax such as this: ..... syntax A ::= Id; syntax B ::= Id; syntax C ::= Id; ..... syntax D ::= A "." B syntax E ::= A "." C

while " voting . Output " can be deduced by D and E.It is the " Ambiguity Ambiguity about ' Identifier . Identifier '" .

The solution is replacing the A,B,C by Id.

We want to solve the ambiguity about "Identifier . Identifier" first!