Allow defining constants in locations of CIF specifications
Dear Developers,
My model is correct and contains
const int MIN_POSITION = -1000;
alg bool minSensor = pos <= MIN_POSITION;
where constant definition and usage are close together.
The model also contains
const real ACCELERATE = 1;
location Accelerating:
equation speed' = ACCELERATE;
Since the constant ACCELERATE is only used within the location Accelerating, I would like to bring the definition even closer to its usage, like in the first example. However,
location Accelerating:
const real ACCELERATE = 1;
equation speed' = ACCELERATE;
results in
Parsing failed at line 35, column 3, at or near "const" (found "const", expected "edge", "equation", "initial", "invariant", "marked", "plant", "requirement", "supervisor", or "urgent").
Why is const(ant) forbidden here? Could it be supported? For me, it is acceptable that the scope of the constant is the automaton and not the location (such that different locations can't have the same constant defined).
Greetings, Pierre