Skip to content

ST6RI-869 Diamond inheritance problem in TradeStudy model#676

Merged
seidewitz merged 1 commit intomasterfrom
ST6RI-869
Jul 22, 2025
Merged

ST6RI-869 Diamond inheritance problem in TradeStudy model#676
seidewitz merged 1 commit intomasterfrom
ST6RI-869

Conversation

@seidewitz
Copy link
Member

@seidewitz seidewitz commented Jul 21, 2025

This PR proactively fixes the TradeStudy model bug report in the following SysML 2.1 RTF issue:

  • SYSML21-318 Diamond inheritance problem with TradeStudy

The TradeStudy model is intended to be used as in the following example, in which its objective is redefined to be typed by MinimizeObjective or MaximizeObjective:

analysis tradeStudy : TradeStudy {
    objective :>> tradeStudyObjective : MinimizeObjective;
    ...
}

But, previously, this cause input parameters from the TradeStudyObjective base definition to be invalidly inherited, once from redefinitions in MinimizeObjective or MaximizeObjective and once from redefinitions in the redefined objective TradeStudy::tradeStudyObjective. This was not detected previously, because the Pilot Implementation does not currently cross-check inheritance of redefinitions from different general types. Further, if (as above) a subject is not explicitly modeled for an objective requirement, the Pilot Implementation physically inserts one behind the scenes, which then implicitly redefines the two otherwise inherited subject parameters. However, this is not conformant with the specification, and it is planned to be removed from the Pilot Implementation, in which case the inheritance of two subject parameters will cause a validation error to be reported.

This PR eliminates these problems by updating the declaration for TradeStudyObjective so that the nested feature best is no longer a parameter (it was previously an out parameter). This allows best to be redefined in MinimizeObjective and MaximizeObjective without having to redefine the input parameters before it. The redefined input parameters in TradeStudy::tradeStudyObjective can then be inherited without any problem.

@seidewitz seidewitz self-assigned this Jul 21, 2025
@seidewitz seidewitz added this to the 2025-07 milestone Jul 21, 2025
@seidewitz seidewitz merged commit a1e24a1 into master Jul 22, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants