osate / osate2-ba

Old Behavior Annex plug-in for OSATE repository, kept for reference
5 stars 4 forks source link

Duplicate transitions labels #7

Closed juli1 closed 10 years ago

juli1 commented 10 years ago

When having the following model, the transition have the same identifiers are not marked as an error. See the model below:

data boolean properties Data_Model::Data_Representation => boolean; end boolean;

system door features open_cmd : in data port boolean; annex behavior_specification { states Closed : initial state; Opened : state; transitions t1 : Doors_Closed -[opem_cmd? = false]-> Doors_Closed; t1 : Doors_Closed -[opem_cmd? = true]-> Doors_Open; t1 : Doors_Closed -[opem_cmd? = true]-> Doors_Open; t2 : Doors_Closed -[alarm? = true]-> Doors_Opened {door_open_cmd := true;}; t5 : Doors_Opened -[self.safe and speed? = 0 and intransit? = false and door_sensor?= false and alarm? = false]-> Doors_Closed {door_open_cmd := false;}; };
end door;

SebastienGardoll commented 10 years ago

Hello Julien,

AADLBA-FrontEnd marks duplicated transition identifiers but it does in the name resolution stage just after the parsing stage. Any error in the parsing stage (idem for the name resolution) stops the overwall BA process so as to escape side effects in the following stages.

In your example, there are two syntax errors (extraneous semi colon at transition t2 and t5) that fail the parsing stage.

Best regards.