Opened 6 years ago

Closed 6 years ago

#5336 closed defect (fixed)

[NF] Frontend sets all non-connectors variables and parameters to DAE.POTENTIAL

Reported by: Adrian Pop Owned by: Adrian Pop
Priority: high Milestone: 1.14.0
Component: New Instantiation Version:
Keywords: Cc:

Description

The NF sets all variables and parameters to DAE.POTENTIAL (even if they are not connectors), of course if they are not stream or flow.

Because of this BackendVariable.calcAliasKey will be different with the NF as it uses isVarConnector which checks for DAE.NON_CONNECTOR (which is never generated by the NF).

Change History (6)

comment:1 by Adrian Pop, 6 years ago

Owner: changed from Per Östlund to Adrian Pop
Status: newaccepted

comment:2 by Per Östlund, 6 years ago

If you implement this, remember that connectors can contain records. I.e. it's not always the immediate parent of a component that determines whether it's a potential or non-connector variable.

comment:3 by Adrian Pop, 6 years ago

Yes. You need to go up the instance hierarchy and see that none of them are connectors. I use NFTyping.checkConnectorType to check if node is a connector or not.

in reply to:  3 comment:4 by Per Östlund, 6 years ago

Replying to adrpo:

Yes. You need to go up the instance hierarchy and see that none of them are connectors. I use NFTyping.checkConnectorType to check if node is a connector or not.

Sure, it's slightly inefficient since it won't stop until it finds a connector or runs out of parents, but it works.

comment:5 by Adrian Pop, 6 years ago

Should be fixed with PR: https://github.com/OpenModelica/OMCompiler/pull/2930
@perost: please have a quick look on this.

comment:6 by Adrian Pop, 6 years ago

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.