lbl-srg / obc

OpenBuildingControl - Performance Evaluation, Specification, Deployment and Verification of Building Control Sequences
http://obc.lbl.gov
27 stars 14 forks source link

Updated extends section #152

Closed mwetter closed 2 months ago

mwetter commented 2 months ago

This closes #151. It also adds a consistent reference for MSL and adds exclusion of the break keyword.

@AntoineGautier : Thanks for your feedback on #151. Can you please explain what you mean by point 4, or better provide wording as I don't quite understand this comment.

mwetter commented 2 months ago

@JayHuLBL : FYI, the extends is updated on the web page.

AntoineGautier commented 2 months ago

@mwetter In point 4 of #151 I had in mind the following rules for the constraining type from https://specification.modelica.org/maint/3.6/inheritance-modification-and-redeclaration.html#constraining-type

In a replaceable declaration the optional constraining-clause defines a constraining type. Any modifications following the constraining type name are applied both for the purpose of defining the actual constraining type and they are automatically applied in the declaration and in any subsequent redeclaration. The precedence order is that declaration modifiers override constraining type modifiers.

If the constraining-clause is not present in the original declaration (i.e., the non-redeclared declaration): • The type of the declaration is also used as a constraining type. • The modifiers for subsequent redeclarations and constraining type are the modifiers on the component or short-class-definition if that is used in the original declaration, otherwise empty.

It may be worth mentioning these rules and perhaps providing an example such as the one in #151.

mwetter commented 2 months ago

@AntoineGautier : Thanks for the wording. I will address it through the new ticket (https://github.com/lbl-srg/obc/issues/153)