#5821 closed defect (fixed)
New frontend fails with StateGraph2.Transition
Reported by: | Owned by: | somebody | |
---|---|---|---|
Priority: | blocker | Milestone: | 1.16.0 |
Component: | New Instantiation | Version: | |
Keywords: | Cc: | christian@… |
Description
Consider the enclosed small library, developing an example with StateGraph2.
The new frontend fails
[1] 20:39:28 Translation Error
[Modelica_StateGraph2: 12190:5-12190:45]: The second argument of Connections.branch must be on the form A.R, where A is a connector and R an over-determined type/record.
The old frontend throws a warning but translates successfully
[2] 20:40:58 Translation Warning
[Modelica_StateGraph2: 12195:5-12201:3]: Usage of non-standard operator (not specified in the Modelica specification): Connections.uniqueRoot. Functionality might be partially supported but is not guaranteed.
Attachments (2)
Change History (8)
by , 5 years ago
comment:2 by , 5 years ago
The fix for NF is part of PR: https://github.com/OpenModelica/OpenModelica/pull/713
I'm not sure we should merge this but we'll discuss it.
comment:3 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in 3ee004/OpenModelica, now the NF gives a warning and allows the non-standard operators and non-standard operator usage.
comment:4 by , 5 years ago
@ahaumer, this is from the main page of the StateGraph2 library on github:
Warning: Modelica_StateGraph2 is not fully Modelica compliant and might never be. Modelica 3.3 introduced state machines as a replacement for clocked systems. However, for non-clocked systems the situation is less clear. One possibility is that some of the good ideas from this library are integrated in Modelica.StateGraph in a Modelica compliant way.
Given these premises, we have marked the StateGraph2 library as currently not supported by OpenModelica, see #5726. Our priority is currently in supporting libraries that follow the standard 100%. The situation may change in the future if that library evolves towards using only standard Modelica language features.
comment:5 by , 5 years ago
Milestone: | 1.15.0 → 1.16.0 |
---|
Release 1.15.0 was scrapped, because replaceable support eventually turned out to be more easily implemented in 1.16.0. Hence, all 1.15.0 tickets are rescheduled to 1.16.0
comment:6 by , 5 years ago
Component: | Frontend → New Instantiation |
---|
The error message in the new front-end is correct. The line reads:
which is not according to the Modelica Specification because
node
is not of the formconnectorName.overconstrainedRecord
. One would need to put the node inside a connector and use that to make it correct. Or the Modelica spec needs changing.https://specification.modelica.org/master/Ch9.html#overconstrained-equation-operators-for-connection-graphs
Connections.branch(A.R,B.R);
Defines a required spanning-tree edge from the overdetermined type or record instance R in connector instance A to the corresponding overdetermined type or record instance R in connector instance B for a virtual connection graph. This function can be used at all places where a connect(..) statement is allowed [e.g., it is not allowed to use this function in a when-clause. This definition shall be used if in a model with connectors A and B the overdetermined records A.R and B.R are algebraically coupled in the model, e.g., due to B.R = f(A.R, <other unknowns>)].
I guess we could allow it and issue a warning but then is really not clear what we should do about it. Just add a non-connector reference to the overconstrained connection graph?