DATEX-II-EU / DatexII

Main repository for issues and bugs for the DATEXII standard
0 stars 0 forks source link

IMPORTED (222) - Restriction on generalisation across Level A / extension boundary - consider or clarify implication (Bugzilla Bug 30) #30

Closed datexii closed 3 years ago

datexii commented 105 years ago

This issue was created automatically with bugzilla2github.py

Bugzilla Bug 30

Date: 1919-01-03T10:36:44+01:00 From: @ingeniumfaber To: @JosefKaltwasser CC: @iancornwellmottmac

Last updated: 2021-04-21T12:23:11+02:00

datexii commented 105 years ago

Comment 87

Date: 1919-01-03 10:36:45 +0100 From: @ingeniumfaber

There are 2 different kinds of generalisation allowed in DATEX: - Generalisation across the boundary between the core (“level A”) DATEX model and an extension model - Other inheritance i.e. between 2 concepts within the core, or between 2 concepts within extensions In the former case DATEX specifications insist that a DATEX “level B extension” mechanism is used (clause 8.2.6 in prEN 16157-1). But only in the latter case does the specialised subclass inherit the attributes of the superclass. Some extension authors may want to specialise a core DATEX class, but only to use the specialised class directly in the extension model, not for the purpose of allowing the specialised class to be used in place of the original core superclass where that core superclass is used in the core Level A model. (The UTMC suppliers in the UK actually did this - they produced an extension model where core Fault was specialised by TrafficSignalFault, but where the only intended use of TrafficSignalFault was in an aggregated property of another class in the extension.) To get the intended effect, the generalisation would have to NOT be a <>, but the DATEX specification says that is not allowed. This is intentional, to preserve the backwards compatibility guarantee. The risk of allowing normal inheritance across the core/extension boundary is that even although there may be no intention by the extension author to allow the specialised class in place of a superclass where the superclass is used in the core Level A model, some other user of the extension model could try to do that because they see the inheritance relationship, and then IF they also sent this data through level A software that was unaware of the extension, it would not validate. Which is more important: the inconvenience of not being able to use regular inheritance across the boundary, or the risk to backwards compatibility? Given that extension authors have a workaround of changing generalisation to composition, the current position is not unreasonable, but given that the full implication of the methodology was initially missed by the UTMC group, it seems helpful if we could add a little additional explanatory material to the methodology specification to supplement 8.2.6, to point out explicitly that since regular inheritance across the boundary is not permitted, a logical specialisation in the domain would be modelled by composition in this case.

datexii commented 105 years ago

Comment 88

Date: 1919-01-03 10:36:45 +0100 From: @iancornwellmottmac

The issue description text contained the stereotype name "D2LevelBExtension" in the sentence starting "To get the intended effect" but it is missing in the visible output, presumably due to use of the chevron symbols.

datexii commented 105 years ago

Comment 89

Date: 1919-01-03 10:36:45 +0100 From: @JosefKaltwasser

datexii commented 105 years ago

Comment 90

Date: 1919-01-03 10:36:48 +0100 From: @JosefKaltwasser

Using normal UML Generalizsation across the border between Level A and extension will be allowed in v3.0 by changing clauses 8.2.6/9/11. Users shall be made aware that instances of such classes can not be used in a polymorphic way . It shall also be mentioned that it is not possible to combine bot Generalization methods.

datexii commented 105 years ago

Comment 91

Date: 1919-01-03 10:36:48 +0100 From: @JosefKaltwasser

The fix announced in comment

datexii commented 105 years ago

Comment 92

Date: 1919-01-03 10:36:48 +0100 From: @ingeniumfaber

has obviously not been properly incorporated in the version of prEN 16157-1 delivered to CCMC. Hence, I have re-opended the issue

datexii commented 5 years ago

Comment 93

Date: 2019-03-01 10:43:17 +0100 From: bugzilla admin <webmaster@datex2.eu>

--- Bug imported by webmaster@datex2.eu 2019-03-01 10:43 CET ---

This bug was previously known as bug 222 at https://bugzilla.datex2.eu/show_bug.cgi?id=222 This bug blocked bug(s) 2.

datexii commented 5 years ago

Comment 1352

Date: 2019-05-02 17:42:01 +0200 From: @JosefKaltwasser

It has meanwhile been agreed that allowing normal inheritance across the Level A / Extension boundary shall remain prohibited - due to the well-known and already described potential interoperability problems - but that clause 8.2.6 in 16157-7 and clause 6 in the Extension rules requirements on the website shall be amended by adding the following clarification:

"It is important to note that generalizations without the “D2LevelBExtension” stereotype are not allowed from a level B extension to the core model due to the support of polymorphism in DATEX II, which would lead potentially to instances that do not validate against level A. Where needed, workarounds have to be found using the DATEX II composition mechanism."

datexii commented 4 years ago

Comment 1463

Date: 2020-09-14 13:19:59 +0200 From: @iancornwellmottmac

Raised again in September 2020 TMG meeting, because the decision to retain the prohibition means there may be some inconsistency in our modelling and extension guidance principles agreed earlier this year. The decision to retain the prohibition was maintained. IC to check what this means in detail for the guidance - probably need to mention this prohibition and the implications for considering models to be Level B or Level C extensions.

datexii commented 4 years ago

Comment 1466

Date: 2020-09-14 16:49:37 +0200 From: @iancornwellmottmac

Updated the modelling guidance note on Teams and informed MvE for publication on docs site.

datexii commented 3 years ago

Comment 1543

Date: 2021-04-21 12:23:11 +0200 From: @iancornwellmottmac

Docs site has the updated guidance.