View Issue Details

IDProjectCategoryView StatusLast Update
000590910000-003: Address SpaceApi Changepublic2022-12-08 16:26
ReporterWolfgang Mahnke Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status acknowledgedResolutionopen 
Summary0005909: Limitation on subtyping for VariableTypes
Description

We fixed an issue of indicating if a Variable supports subtypes of its DataType recently (Mantis issue 0004422).
We are using the AccessLevelEx Attribute for this.

We have not defined anything for VariableTypes. The NodeClass VariableType does not have the AccessLevelEx Attribute.
Since we added the feature to define whether a Variable is accepting subtypes of its DataType, it probably also makes sense to specify this for a VariableType.
There are two reasons:
1.) It would be (at least) the default for all instances
2.) It would restrict the rules for subtyping (currently a subtyp of the VariableType is always allowed to use a subtype of the DataType).

The issue came up during an email discussion on Paul and me about subtyping VariableTypes. I do not have any concete use case where I want to restrict the DataType of a VariableType that it cannot be subtyped in its subtypes or instances.

One way to solve this issue could also be to wait for the results of the "Semantic Validation" subgroup.

TagsNo tags attached.
Commit Version
Fix Due Date

Relationships

related to 0004423 assignedJeff Harding We need a indication of a sealed type 
related to 0005918 acknowledged Constraints on Attribute values based on InstanceDeclarations Attributes 

Activities

Jim Luth

2020-09-01 15:35

administrator   ~0012733

Discuss with Wolfgang before assigning.

Jim Luth

2020-10-06 16:01

administrator   ~0013021

Agreed to address this after the first 1.05 release of Part 3.

BjarneBostrom

2021-04-19 05:55

reporter   ~0014228

This is a breaking change if implemented as specified. The current "broken" subtyping rules already allows any value to be written. Technically even any supertype, since all Variable node instances can always be viewed through the supertype "lens", which will see a BaseDataType ValueRank -2 definition. Though, in part that is a separate problem, which this change in theory could fix.

However, in an object oriented programming language, you shall always accept a subtype, due to https://en.wikipedia.org/wiki/Liskov_substitution_principle.

Wolfgang Mahnke

2021-10-01 13:29

developer   ~0015090

In response to comment from BjarneBostrom:
At the moment the issue is described as requirement, so it cannot be a breaking change - only a potential solution to the requirement. If we add something to indicate this, obviously the default shall be the open behavior (as written in issue).

Jim Luth

2022-12-08 16:26

administrator   ~0018279

Not enough of a pain point right now. May best be handled by semantic validation.

Issue History

Date Modified Username Field Change
2020-08-21 12:09 Wolfgang Mahnke New Issue
2020-08-26 06:59 Wolfgang Mahnke Relationship added related to 0005918
2020-08-26 11:16 Jim Luth Project UA => 10000-003: Address Space
2020-08-26 11:16 Jim Luth Category Feature Request => Api Change
2020-09-01 15:35 Jim Luth Note Added: 0012733
2020-09-01 15:37 Jim Luth Relationship added related to 0004423
2020-10-06 16:01 Jim Luth Status new => acknowledged
2020-10-06 16:01 Jim Luth Note Added: 0013021
2021-04-19 05:55 BjarneBostrom Note Added: 0014228
2021-10-01 13:29 Wolfgang Mahnke Note Added: 0015090
2022-12-08 16:26 Jim Luth Note Added: 0018279