Issue 18810: Avoid covariant parameters in metamodel operation redefinition (uml25-ftf) Source: Microsoft (Mr. Steve Cook, stcook(at)microsoft.com) Nature: Revision Severity: Summary: The vast majority of operation redefinitions in the metamodel have invariant parameters, but four operations inconsistently use covariant parameter redefinition. MOF actually says nothing about whether covariant redefinition is allowed, but for consistency and type-safety the UML spec should avoid it. This can be done using a precondition that requires the parameter to be of the right type. Region::isRedefinitionContextValid(), State::isRedefinitionContextValid(), StateMachine::isRedefinitionContextValid(), and Classifer::conformsTo(). Resolution: Revised Text: Actions taken: July 11, 2013: received issue Discussion: End of Annotations:===== m: Steve Cook To: "issues@omg.org" CC: "uml25-ftf@omg.org" Subject: Avoid covariant parameters in metamodel operation redefinition Thread-Topic: Avoid covariant parameters in metamodel operation redefinition Thread-Index: Ac5+QUB+Q+butcdkRTKGTomKhiu6UA== Date: Thu, 11 Jul 2013 14:16:53 +0000 Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.166.18.101] X-Forefront-Antispam-Report: CIP:131.107.125.37;CTRY:US;IPV:CAL;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(189002)(199002)(56816003)(54356001)(19300405004)(15202345003)(74502001)(56776001)(69226001)(16406001)(74706001)(20776003)(54316002)(76796001)(81342001)(77982001)(51856001)(512954002)(74366001)(71186001)(47976001)(83072001)(74876001)(6806004)(47446002)(53806001)(76482001)(79102001)(46102001)(76176001)(59766001)(55846006)(50986001)(65816001)(80022001)(49866001)(47736001)(16236675002)(81542001)(76786001)(33656001)(4396001)(77096001)(31966008)(63696002)(74662001);DIR:OUT;SFP:;SCL:1;SRVR:BN1AFFO11HUB046;H:TK5EX14HUBC107.redmond.corp.microsoft.com;CLIP:131.107.125.37;RD:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-OriginatorOrg: microsoft.onmicrosoft.com X-O365ENT-EOP-Header: Message processed by - O365_ENT: Allow from ranges (Engineering ONLY) X-Forefront-PRVS: 0904004ECB X-Virus-Scanned: amavisd-new at omg.org The vast majority of operation redefinitions in the metamodel have invariant parameters, but four operations inconsistently use covariant parameter redefinition. MOF actually says nothing about whether covariant redefinition is allowed, but for consistency and type-safety the UML spec should avoid it. This can be done using a precondition that requires the parameter to be of the right type. Region::isRedefinitionContextValid(), State::isRedefinitionContextValid(), StateMachine::isRedefinitionContextValid(), and Classifer::conformsTo(). From: "Bock, Conrad" To: "issues@omg.org" , "uml25-ftf@omg.org" Date: Thu, 11 Jul 2013 11:26:20 -0400 Subject: RE: Avoid covariant parameters in metamodel operation redefinition Thread-Topic: Avoid covariant parameters in metamodel operation redefinition Thread-Index: Ac5+QUB+Q+butcdkRTKGTomKhiu6UAACaw9A Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US X-Virus-Scanned: amavisd-new at omg.org Steve, > The vast majority of operation redefinitions in the metamodel have invariant > parameters, but four operations inconsistently use covariant parameter > redefinition. MOF actually says nothing about whether covariant redefinition > is allowed, but for consistency and type-safety the UML spec should avoid it. > This can be done using a precondition that requires the parameter to be of > the right type. How is the precondition more type safe than redefining the parameter? Conrad From: Steve Cook To: "Bock, Conrad" , "issues@omg.org" , "uml25-ftf@omg.org" Subject: RE: Avoid covariant parameters in metamodel operation redefinition Thread-Topic: Avoid covariant parameters in metamodel operation redefinition Thread-Index: Ac5+QUB+Q+butcdkRTKGTomKhiu6UAACaw9AAAAnF/A= Date: Thu, 11 Jul 2013 15:31:06 +0000 Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.166.18.101] X-Forefront-Antispam-Report: CIP:131.107.125.37;CTRY:US;IPV:CAL;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(199002)(189002)(13464003)(55846006)(20776003)(74366001)(31966008)(74876001)(46102001)(47446002)(77096001)(6806004)(47776003)(63696002)(54316002)(59766001)(69226001)(74502001)(46406003)(74706001)(56816003)(51856001)(47976001)(74662001)(77982001)(81542001)(65816001)(4396001)(76796001)(16406001)(50466002)(49866001)(53806001)(33656001)(23726002)(54356001)(50986001)(80022001)(83072001)(76786001)(79102001)(47736001)(56776001)(76482001)(81342001);DIR:OUT;SFP:;SCL:1;SRVR:BN1BFFO11HUB047;H:TK5EX14MLTC104.redmond.corp.microsoft.com;CLIP:131.107.125.37;RD:InfoDomainNonexistent;A:1;MX:1;LANG:en; X-OriginatorOrg: microsoft.onmicrosoft.com X-O365ENT-EOP-Header: Message processed by - O365_ENT: Allow from ranges (Engineering ONLY) X-Forefront-PRVS: 0904004ECB X-Virus-Scanned: amavisd-new at omg.org X-MIME-Autoconverted: from quoted-printable to 8bit by amethyst.omg.org id r6BFVaug029642 It isn't. It's just more explicit and consistent. -----Original Message----- From: Bock, Conrad [mailto:conrad.bock@nist.gov] Sent: 11 July 2013 16:26 To: issues@omg.org; uml25-ftf@omg.org Subject: RE: Avoid covariant parameters in metamodel operation redefinition Steve, > The vast majority of operation redefinitions in the metamodel have invariant > parameters, but four operations inconsistently use covariant parameter > redefinition. MOF actually says nothing about whether covariant redefinition > is allowed, but for consistency and type-safety the UML spec should avoid it. > This can be done using a precondition that requires the parameter to be of > the right type. How is the precondition more type safe than redefining the parameter? Conrad From: "Bock, Conrad" To: "issues@omg.org" , "uml25-ftf@omg.org" Date: Thu, 11 Jul 2013 15:24:21 -0400 Subject: RE: Avoid covariant parameters in metamodel operation redefinition Thread-Topic: Avoid covariant parameters in metamodel operation redefinition Thread-Index: Ac5+QUB+Q+butcdkRTKGTomKhiu6UAACaw9AAAAnF/AACCFYIA== Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US X-Virus-Scanned: amavisd-new at omg.org Steve, > It isn't. It's just more explicit and consistent. It seems like a redefined parameter type is as explicit as a precondition (and they're semantically equivalent). How is it less consistent? Conrad From: "Bock, Conrad" To: "issues@omg.org" , "uml25-ftf@omg.org" Date: Thu, 11 Jul 2013 15:44:45 -0400 Subject: RE: Avoid covariant parameters in metamodel operation redefinition Thread-Topic: Avoid covariant parameters in metamodel operation redefinition Thread-Index: Ac5+QUB+Q+butcdkRTKGTomKhiu6UAACaw9AAAAnF/AACCFYIAAAjkc9AAAnGmA= Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US X-Virus-Scanned: amavisd-new at omg.org > It is consistent with all the other redefined operations. Do the other operations restrict parameter types? Agreed they should all restrict them the same way, but if these four are the only ones restricting, then there's nothing to be consistent with. Conrad From: Steve Cook To: "Bock, Conrad" , "issues@omg.org" , "uml25-ftf@omg.org" Subject: RE: Avoid covariant parameters in metamodel operation redefinition Thread-Topic: Avoid covariant parameters in metamodel operation redefinition Thread-Index: Ac5+QUB+Q+butcdkRTKGTomKhiu6UAACaw9AAAAnF/AACCFYIAAAjkc9 Date: Thu, 11 Jul 2013 19:38:55 +0000 Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: X-Forefront-Antispam-Report: CIP:131.107.125.37;CTRY:US;IPV:CAL;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(189002)(199002)(4396001)(59766001)(47736001)(80022001)(16236675002)(56816003)(56776001)(81342001)(74706001)(76482001)(65816001)(20776003)(16406001)(74876001)(74366001)(50986001)(77096001)(83072001)(54356001)(79102001)(46102001)(44976004)(63696002)(77982001)(6806004)(76796001)(74662001)(47976001)(81542001)(53806001)(31966008)(69226001)(76786001)(33656001)(49866001)(51856001)(71186001)(74502001)(54316002)(47446002)(55846006);DIR:OUT;SFP:;SCL:1;SRVR:BL2FFO11HUB034;H:TK5EX14HUBC103.redmond.corp.microsoft.com;CLIP:131.107.125.37;RD:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-OriginatorOrg: microsoft.onmicrosoft.com X-O365ENT-EOP-Header: Message processed by - O365_ENT: Allow from ranges (Engineering ONLY) X-Forefront-PRVS: 0904004ECB X-Virus-Scanned: amavisd-new at omg.org It is consistent with all the other redefined operations. Sent from my Windows Phone -------------------------------------------------------------------------------- From: Bock, Conrad Sent: .11/.07/.2013 20:26 To: issues@omg.org; uml25-ftf@omg.org Subject: RE: Avoid covariant parameters in metamodel operation redefinition Steve, > It isn't. It's just more explicit and consistent. It seems like a redefined parameter type is as explicit as a precondition (and they're semantically equivalent). How is it less consistent? Conrad From: Steve Cook To: "Bock, Conrad" , "issues@omg.org" , "uml25-ftf@omg.org" Subject: RE: Avoid covariant parameters in metamodel operation redefinition Thread-Topic: Avoid covariant parameters in metamodel operation redefinition Thread-Index: Ac5+QUB+Q+butcdkRTKGTomKhiu6UAACaw9AAAAnF/AACCFYIAAAjkc9AAAnGmAAA8v4iw== Date: Thu, 11 Jul 2013 21:32:00 +0000 Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: X-Forefront-Antispam-Report: CIP:131.107.125.37;CTRY:US;IPV:CAL;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(189002)(199002)(16236675002)(31966008)(69226001)(54356001)(59766001)(83072001)(63696002)(53806001)(16406001)(49866001)(20776003)(74366001)(56816003)(56776001)(77096001)(54316002)(44976005)(77982001)(76786001)(51856001)(74706001)(74876001)(6806004)(47446002)(47736001)(71186001)(33656001)(50986001)(74502001)(80022001)(55846006)(76482001)(46102001)(81542001)(79102001)(81342001)(76796001)(74662001)(47976001)(65816001)(4396001);DIR:OUT;SFP:;SCL:1;SRVR:BY2FFO11HUB038;H:TK5EX14HUBC106.redmond.corp.microsoft.com;CLIP:131.107.125.37;RD:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-OriginatorOrg: microsoft.onmicrosoft.com X-O365ENT-EOP-Header: Message processed by - O365_ENT: Allow from ranges (Engineering ONLY) X-Forefront-PRVS: 0904004ECB X-Virus-Scanned: amavisd-new at omg.org Conrad, you have the same access to the spec as me. If you feel so strongly about this I suggest you look there to answer your question. Thanks. Sent from my Windows Phone -------------------------------------------------------------------------------- From: Bock, Conrad Sent: .11/.07/.2013 20:45 To: issues@omg.org; uml25-ftf@omg.org Subject: RE: Avoid covariant parameters in metamodel operation redefinition > It is consistent with all the other redefined operations. Do the other operations restrict parameter types? Agreed they should all restrict them the same way, but if these four are the only ones restricting, then there's nothing to be consistent with. Conrad