UoY-RoboStar / robosim-textual

This repository contains the plugins for the RoboSim textual editor.
Eclipse Public License 2.0
0 stars 0 forks source link

Clarification required wrt. use of SendEvent in actions #8

Open pefribeiro opened 4 years ago

pefribeiro commented 4 years ago

In both RoboSim and RoboChart, a SendEvent is defined by a trigger of type ActualTrigger:

https://github.com/robo-star/circus.robocalc.robosim.textual.parent/blob/e57caada72d3da4c06ef062cc35b799d481e28ce/circus.robocalc.robosim.textual/src/circus/robocalc/robosim/textual/RoboSim.xtext#L164-L167

Firstly, this is slightly counter-intuitive as there is only one kind of Trigger in RoboSim, namely ExecTrigger. Secondly, it isn't clear what the correct treatment should be in the RoboSim semantics. Can this be an input, or is it an output only? For example is action $Out!1 acceptable? (I think so?)

What about input communications as in RoboChart ie. $In?d, is this acceptable? And what is its meaning in an action? Need some guidance here @madielfilho.

madielfilho commented 4 years ago

As you said, the only possible trigger in RoboSim is ExecTrigger. In an old version, we had OutputCommunication ( ('send'?) '$' event = [Event|QualifiedName] ( ('!'|'.') value=Atomic )?). Later, in order to reuse RoboChart rules, OutputCommunication become SendEvent, which has a similar definition. We only added the symbol $. In the RoboSim Semantics, however, SendEvent means an output communication. Perhaps, to avoid misunderstanding, it would be better to rename the rule {OutputCommunication}, and also change the name of the trigger attribute to event or outputEvent.

Can this be an input, or is it an output only?

I think it is only used as an output.

For example is action $Out!1 acceptable? (I think so?)

Yes

What about input communications as in RoboChart ie. $In?d, is this acceptable? And what is its meaning in an action?

Currently, it is possible. I think, however, RoboSim only allows output communications in actions. Reusing the SendEvend of RoboChart, a validation rule needs to be created to avoid input communications in actions.