TelluIoT / ThingML

The ThingML modelling language
https://github.com/TelluIoT/ThingML
Apache License 2.0
102 stars 33 forks source link

Issue in UML compiler #140

Closed brice-morin closed 7 years ago

brice-morin commented 7 years ago

From @oysteinh:

"I noticed the following when I compared PlantUML version with the corresponding ThingML

ThingML:

  transition -> TemprIncrease 
  event temp:get_sensor?temperature
  guard temp.t<tmrature+1

PlantUML

TemprIncrease --> TemprIncrease :
temperature?get_sensor
if temp.t < tmrature + 1

I have three concerns of which the first one was what I said to you on Friday.

1) The order is port?message in ThingML, but message?port in PlantUML. The ThingML order is the most natural. However, the input port is not significant in UML so in principle it could only say message, but I guess knowing the input port does not hurt. 2) ThingML defines an identifier related to the consumed message: ‘temp’ identifies the received temperature message, and this is used in the guard or in other constructs within the transition. The definition / declaration of ‘temp’ is not at all present in PlantUML and therefore it may be confusing what ‘temp’ actually means. I really do not have any good solution to this other than writing in the trigger exactly what you write in ThingML event clause. 3) ThingML has guards on transitions, and so does UML, but the PlantUML transcription is not using this syntax. Why not? A UML guard follows the trigger and is enclosed in brackets like: [temp.t < tmrature+1]"