CIF simulator should support input variables
For code generation, input variables are essential for connecting inputs of the controller to the actual supervisor 'logic'. Often we either use the state of the input variables directly, or we detect a change in value and translate that to an event. Problem is that there is no easy way to simulate a specification with input variables. Currently, the specification first has to be merged with another specification that merges the inputs with non-input variables or locations. This can be quite involved.
Using CIF/SVG input mappings, it should be possible to assign values to input variables in the SVG input mode. I propose the following syntax:
svgin id <svgElementName> input/assign/do <inputVariableName> := <expression>
We can then model a button, using an input variable as follows:
input bool machineStartButton; svgin id "button36" input machineStartButton := not machineStartButton;
As opposed to:
automaton machineStartButton: uncontrollable u_push, u_release; location Released: initial; edge u_push goto Pushed; location Pushed: edge u_release goto Released; svgin id "button36" event if Released: u_push else u_release end; end
Input variables do not have initial values. The CIF Simulator has an option to supply the initial values for variables. That we should be able to use for input variables as well, hopefully. Otherwise they should be initialized for their default initial value.