PLCgen: pre-check "continuous var as timer" gives bad error reports
Using tests/cif2plc/formal_finvoke_none_std.cif
as a test, I get the following reports:
--------------------------------------------------------------------------
(1/4) Continuous variable has a value that cannot be evaluated statically.
--------------------------------------------------------------------------
* In location "aut.l1":
- edge do r := a + c + -1.0 goto l2;
^
----------------------------------------------------------------------------------------
(2/4) Continuous variable is initialized to, assigned, or compared to, a negative value.
----------------------------------------------------------------------------------------
* In algebraic variable "a":
- alg real a = c + -1.0;
^
----------------------------------------------------------------------------------------------------------------------------------------
(3/4) Continuous variable value is not compared as "variable <= ..." or "... >= variable", nor assigned in a single-variable assignment.
----------------------------------------------------------------------------------------------------------------------------------------
* In algebraic variable "a":
- alg real a = c + -1.0;
^
* In location "aut.l1":
- edge do r := a + c + -1.0 goto l2;
^
4/4 (omitted) Warnings about using tau events.
We do not want the above uses of continuous variables currently, and as such getting an error report is ok. The messages however seem weird, at least in the first and second case.
Edited by Albert Hofkamp