Issue 12752: Interface/valuetype forward declarations and Ada2005 (ada-rtf) Source: Airbus Group (Mr. Oliver M. Kellogg, oliver.kellogg(at)airbus.com) Nature: Enhancement Severity: Medium Summary: Ada2005 features a new language construct, the "limited with" clause, which brings direct support for forward declarations to the Ada language. The mapping of interface and valuetype forward declarations (section 4.9 of the Ada mapping version 1.2) could be much simplified by using this feature. In order to preserve backward compatibility, I suggest retaining the current mapping using the CORBA.Foward packages, but marking that mapping as obsolescent. I propose adding a new mapping which takes advantage of the Ada2005 "limited with" clause, accompanied by a recommendation that new code should use this simplified mapping. The example given in section 4.9.3 of formal/01-10.42, interface Chicken; interface Egg { Chicken hatch(); }; interface Chicken { Egg lay(); }; could be mapped as follows: -- code mapped from interface Egg with CORBA.Object; limited with Chicken; package Egg is type Ref is new CORBA.Object.Ref with null record; procedure hatch (Self : in Ref; Result : out Chicken.Ref'Class); function To_Ref (The_Ref : in CORBA.Object.Ref'Class) return Ref; end Egg; -- code mapped from interface Chicken with CORBA.Object; with Egg; package Chicken is type Ref is new CORBA.Object.Ref with null record; procedure lay (Self : in Ref; Result : out Egg.Ref'Class); function To_Ref (The_Ref : in CORBA.Object.Ref'Class) return Ref; end Chicken; Resolution: Introduction of Ada 2005 features into the mapping would be beyond the scope of what an RTF could do; it would require a full RFP to do this. Revised Text: Actions taken: January 12, 2010: closed issue; Closed; No Change Discussion: End of Annotations:===== iler: QUALCOMM Windows Eudora Version 7.1.0.9 Date: Thu, 07 Aug 2008 15:25:55 -0400 To: issues@omg.org, ada-rtf@omg.org From: Juergen Boldt Subject: issue 12752 -- Ada RTF issue From: oliver.kellogg@t-online.de (Oliver Kellogg) To: issues@omg.org Subject: [ada-rtf] Interface/valuetype forward declarations and Ada2005 Date: Thu, 7 Aug 2008 21:04:42 . User-Agent: KMail/1.9.6 (enterprise 20070904.708012) X-ID: X6JVscZfZhf-................... X-TOI-MSGID: 89ed49a9-efc5-4054-bf91-a2f094d466ca Nature: Enhancement Ada2005 features a new language construct, the "limited with" clause, which brings direct support for forward declarations to the Ada language. The mapping of interface and valuetype forward declarations (section 4.9 of the Ada mapping version 1.2) could be much simplified by using this feature. In order to preserve backward compatibility, I suggest retaining the current mapping using the CORBA.Foward packages, but marking that mapping as obsolescent. I propose adding a new mapping which takes advantage of the Ada2005 "limited with" clause, accompanied by a recommendation that new code should use this simplified mapping. The example given in section 4.9.3 of formal/01-10.42, interface Chicken; interface Egg { Chicken hatch(); }; interface Chicken { Egg lay(); }; could be mapped as follows: -- code mapped from interface Egg with CORBA.Object; limited with Chicken; package Egg is type Ref is new CORBA.Object.Ref with null record; procedure hatch (Self : in Ref; Result : out Chicken.Ref'Class); function To_Ref (The_Ref : in CORBA.Object.Ref'Class) return Ref; end Egg; -- code mapped from interface Chicken with CORBA.Object; with Egg; package Chicken is type Ref is new CORBA.Object.Ref with null record; procedure lay (Self : in Ref; Result : out Egg.Ref'Class); function To_Ref (The_Ref : in CORBA.Object.Ref'Class) return Ref; end Chicken; Thanks, Oliver M. Kellogg Juergen Boldt Director, Member Services Object Management Group 140 Kendrick St Building A Suite 300 Needham, MA 02494 USA tel: 781 444 0404 x 132 fax: 781 444 0320 email: juergen@omg.org www.omg.org From: oliver.kellogg@t-online.de (Oliver Kellogg) To: ada-rtf@omg.org Subject: Re: issue 12752 -- Ada RTF issue Date: Sat, 9 Aug 2008 16:17:03 +0200 User-Agent: KMail/1.9.6 (enterprise 20070904.708012) X-ID: TWFkUEZUYh7LSDSF4nm9ipsYjVJWyhXbzWDeRQ6BEjXlqF2rtfxcU56radpKnDaglG X-TOI-MSGID: 35283bbc-3b54-4ab6-8363-8c1239cb6af9 I have to correct myself: > In order to preserve backward compatibility, I suggest retaining the current > mapping using the CORBA.Foward packages, but marking that mapping as > obsolescent. Forget the part about making the current mapping obsolescent. In http://www.omg.org/spec/CORBA/3.1/20030101/CORBA_InterfaceRepository.idl I just discovered this: interface InterfaceDef; typedef sequence InterfaceDefSeq; Unfortunately the limited with clause is of no help here because the InterfaceDefSeq requires the full type. Please replace the above quoted text with: " The mapping should fall back to using the CORBA.Forward packages if the forward declared interface or valuetype is used in a further IDL type declaration before the full interface/valuetype definition is visible, " Thanks, Oliver M. Kellogg Cc: ada-rtf@omg.org From: Victor Giddings To: Oliver Kellogg , Oliver Kellogg Subject: Re: issue 12752 -- Ada RTF issue Date: Sat, 25 Oct 2008 15:50:15 -0400 X-Mailer: Apple Mail (2.929.2) Oliver, I am reluctant to introduce mapping features that require support for Ada 2005. The present spec explicitly calls out ISO/IEC 8652:1995. While I agree the proposal addresses a real problem, I think we would need an RFP (or RFC) process to make a change of this magnitude (introducing Ada2005 constructs). Within the OMG, we have had several presentations on the technical aspects of an Ada2005 mapping, including mapping IDL interfaces to Ada05 interfaces (al a the Java mapping.) However, discussions about the market aspects of this have not identified a driving reason to push the process forward. Any additional input on this would be welcome. Julio Medina from the Universidad de Cantabria has agreed to put together a strawman for an Ada05 mapping, but with no process deadlines. Victor Giddings victor_giddings@omg.org On Aug 9, 2008, at 10:17 AM, Oliver Kellogg wrote: I have to correct myself: In order to preserve backward compatibility, I suggest retaining the current mapping using the CORBA.Foward packages, but marking that mapping as obsolescent. Forget the part about making the current mapping obsolescent. In http://www.omg.org/spec/CORBA/3.1/20030101/CORBA_InterfaceRepository.idl I just discovered this: interface InterfaceDef; typedef sequence InterfaceDefSeq; Unfortunately the limited with clause is of no help here because the InterfaceDefSeq requires the full type. Please replace the above quoted text with: " The mapping should fall back to using the CORBA.Forward packages if the forward declared interface or valuetype is used in a further IDL type declaration before the full interface/valuetype definition is visible, " Thanks, Oliver M. Kellogg From: Victor Giddings To: ada-rtf@omg.org Subject: Proposed Resolution for 12752 Date: Sun, 1 Feb 2009 12:44:57 -0500 X-Mailer: Apple Mail (2.930.3) Disposition: Closed, no change OMG Issue No: 12752 Title: Interface/valuetype forward declarations and Ada2005 Source: oliver.kellogg@t-online.de (Oliver Kellogg) Summary: Ada2005 features a new language construct, the "limited with" clause, which brings direct support for forward declarations to the Ada language. The mapping of interface and valuetype forward declarations (section 4.9 of the Ada mapping version 1.2) could be much simplified by using this feature. In order to preserve backward compatibility, I suggest retaining the current mapping using the CORBA.Foward packages, but marking that mapping as obsolescent. I propose adding a new mapping which takes advantage of the Ada2005 "limited with" clause, accompanied by a recommendation that new code should use this simplified mapping. The example given in section 4.9.3 of formal/01-10.42, interface Chicken; interface Egg { Chicken hatch(); }; interface Chicken { Egg lay(); }; could be mapped as follows: -- code mapped from interface Egg with CORBA.Object; limited with Chicken; package Egg is type Ref is new CORBA.Object.Ref with null record; procedure hatch (Self : in Ref; Result : out Chicken.Ref'Class); function To_Ref (The_Ref : in CORBA.Object.Ref'Class) return Ref; end Egg; -- code mapped from interface Chicken with CORBA.Object; with Egg; package Chicken is type Ref is new CORBA.Object.Ref with null record; procedure lay (Self : in Ref; Result : out Egg.Ref'Class); function To_Ref (The_Ref : in CORBA.Object.Ref'Class) return Ref; end Chicken; ---------- and from follow up I have to correct myself: In order to preserve backward compatibility, I suggest retaining the current mapping using the CORBA.Foward packages, but marking that mapping as obsolescent. Forget the part about making the current mapping obsolescent. In http://www.omg.org/spec/CORBA/3.1/20030101/CORBA_InterfaceRepository.idl I just discovered this: interface InterfaceDef; typedef sequence InterfaceDefSeq; Unfortunately the limited with clause is of no help here because the InterfaceDefSeq requires the full type. Please replace the above quoted text with: " The mapping should fall back to using the CORBA.Forward packages if the forward declared interface or valuetype is used in a further IDL type declaration before the full interface/valuetype definition is visible, " Discussion: Introduction of Ada 2005 features into the mapping would be beyond the scope of what an RTF could do; it would require a full RFP to do this. Disposition: Closed, no change