Allow assigning input variables via SVG input mapping
Idea
See #203 (comment 273350) for the various ideas. This issue is to implement 'Idea U1'.
To do for a first version
-
Update metamodel (including docs and diagrams), syntax, parser, type checker and pretty printer. And their tests. (!720 (merged)) -
Prevent crashes in simulator and code generator for the new feature. (!720 (merged)) -
Add simulator test for new feature (doesn't work yet). (!720 (merged)) -
Update CIF to CIF SimplifyValues
transformation. (!720 (merged)) -
Make the new feature unsupported for the CIF simulator for now. (!825 (merged)) -
Make the new feature unsupported for the CIF code generator for now (HTML output). (!826 (merged)) -
Update the CIF merger. It should not be able to merge an SVG input mapping with an assignment, with another specification that provides a non-input variable to be merged with the input variable, as then the SVG input mapping would assign a non-input variable. (!833 (merged)) -
Update CIF documentation (!837 (merged)): -
In particular, the documentation about SVG (currently part of the simulator documentation) to document the new feature. -
Check the entire simulator documentation, for whether additional updates are needed. Search for I/O decl
,svg
,input
,event
,addr
,assign
andupdate
. -
Check whether the CIF language tutorial's 'Variables overview' page needs to be updated. (#792 (closed))
-
-
Fix the type checker unique assignments check for wrapping expressions. (#787 (closed), !824 (merged)) -
Besides #787 (closed), the CifUpdateTypeChecker
also doesunwrapExpression
. Will this break things as well? (!824 (merged)) -
Fix CifAddressableUtils.getRefs
andCifAddressableUtils.collectAddrVars
to account for input variables as addressables. (!827 (merged)) -
Update ElimIfUpdates
to also eliminateif
updates in SVG input mappings, and to support assignments to input variables. (!827 (merged)) -
Make sure EdgeNoIfUpdatesCheck
,EdgeNoMultiAssignCheck
, andEdgeNoPartialVarAssignCheck
really only consider updates on edges. Consider where they are used, and whether additional similar checks are needed for updates on SVG input declarations. Make sure the violation messages are correct. (!829 (merged)) -
Update the documentation of the 'Simplify values' CIF to CIF transformations, to account for the fact that it also may simplify guards of if
andelif
updates on SVG input declarations. (!835 (merged)) -
Fix the event disabler. It now assumes that the event of an SVG input declaration is non- null
, which may no longer hold. See itscollectSvgInputEventNames
method. (!828 (merged)) -
Fix metamodel documentation: (!836 (merged)) -
Assignment.addressableSyntax
indicatesaddressables in CIF/SVG input mappings may be input variable references (non-wrapped) with projections
. Thenon-wrapped
part seems wrong. -
Assignment.addressableSyntax
indicatesAdressables on edges may be discrete and continuous variable references (non-wrapped) with projections
. TheAdressables
has a typo. There is a double space. I think we now do allow wrapped references, but we give a warning that it is convoluted.
-
What can be done later
-
Improve metamodel documentation: -
Texts like choose during simulation
seems to suggest some features are only for simulation, which is not true. Make it aboutnext transition
or so.
-
-
Improve checking of convoluted addressables in assignments on edges, now that we allow names there, not just identifiers. See #227 (comment 1987390) for an example. -
Support the new feature in the simulator. -
Prerequisite: #778 -
Don't forget to update the CIF simulator documentation, including the documentation on SVG input and SVG output, if relevant. In particular the sentence 'The events that are coupled to visualization elements are called SVG interactive events or SVG input events.' may need updating. -
Don't forget about the already extended svg_input
test that has aSingle update input (not yet implemented).
comment that needs updating.
-
-
Support the new feature in the code generator (HTML output). -
Update CIF examples to use the new feature. -
Link the CIF language tutorial 'Input variables' lesson to the SVG input mapping with updates documentation. Maybe explain it in the tutorial lesson a bit as well. -
Remove that the new feature is experimental (e.g., CIF simulator docs).
Edited by Dennis Hendriks