Bug 3086 - CIAO entry point functions do not adhere to spec
Summary: CIAO entry point functions do not adhere to spec
Status: RESOLVED FIXED
Alias: None
Product: CIAO
Classification: Unclassified
Component: CIDL compiler (show other bugs)
Version: 0.6.1
Hardware: All Windows XP
: P3 enhancement
Assignee: Jeff Parsons
URL:
Depends on:
Blocks: 3253
  Show dependency tree
 
Reported: 2007-10-03 08:54 CDT by Abdul Sowayan
Modified: 2009-07-01 12:14 CDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Abdul Sowayan 2007-10-03 08:54:48 CDT
Hi Folks,

CIAO Version (0.6.1) SVN Head
CosMIC Version (0.6.0)

I'm in the process of updating the CIAO tutorial ($CIAO_ROOT/docs/tutorials/Quoters/Simple) to bring it up to date, especially to reflect recent changes to CIAO that Jeff Parsons committed recently (after 0.6.1).

The entry point for the component home (I'm working on the example above) for the StockBroker_exec in CosMIC is: 

create_Stock_StockBroker_Home_Impl

While the CIDLC compiler generates the following entry point:

create_Stock_StockBrokerHome_Impl

Notice the missing "_" between Broker and Home. My guess is that CosMIC got this right and this is a bug in the CIDLC compiler. It would be nice if they (CosMIC, CIDLC) agreed on the entry point signature so that we don't have to modify the implementation artifacts imported from idl_to_picml to address this mismatch.

Thanks,
Abdul
Comment 1 Abdul Sowayan 2007-10-03 08:55:08 CDT
Hi,

The Servant entry points suffer from the same problem as well:

CIDLC generates:

extern "C" BROKER_SVNT_Export ::PortableServer::Servant
create_Stock_StockBrokerHome_Servant (
  ::Components::HomeExecutorBase_ptr p,
  CIAO::Session_Container *c,
  const char *ins_name);


CosMIC:
create_Stock_StockBroker_Home_Servant

The "_" is missing between Broker and Home as well.

Thanks,
Abdul
Comment 2 Abdul Sowayan 2007-10-03 08:55:35 CDT
Hi,

I like the cosmic generated name better, I would propose to update cidlc.

Johnny 
Comment 3 Abdul Sowayan 2007-10-03 09:05:31 CDT
Hi,

I set this ticket as a Blocker, do we need to have this to be a blocker for x.6.2? Right now, the inconsistency between CIAO and CoSMIC entry points makes it very difficult for a user to use CoSMIC (and hence it would make using CIAO very difficult as well). The DAnCE framework spits out a cryptic message about an unknown (unhandled) C++ exception and bails out. A confused user would not know that was because of a mismatch in entry point signitures.

Thanks,
Abdul
Comment 4 Abdul Sowayan 2007-10-03 15:28:27 CDT
Hi,

The problem is that cidlc is tacking '_Impl' to the actual home
IDL type name (the code generation traverses the home
AST node), whereas PICML is tacking '_Home_Impl' to the
component type name. If the home type name bore no relationship
to the component name (it isn't required to do so), it
would be obvious that cidlc is more correct.

On top of that, the DnC spec (section 10.6.1) has requirements
for entry point function names, which don't include an '_Impl'
at all. In addition, CIAO's 2 entry point methods don't
correspond in their behavior or in their signature to what
the spec says. So I've been reluctant to make any changes
until we reach a decision on full spec compliance (which
would seem to require extensive changes to CIAO/DAnCE).

The easiest temporary fix would be to change the PICML
IDL importer to append 'Home' instead of '_Home' which
will match what cidlc generates for most existing
examples - and others as
long as the home that manages component Foo is called
FooHome. Changing cidlc is doable, but more work. I'm
open to suggestion here.

thanks,

Jeff
Comment 5 Abdul Sowayan 2007-10-04 15:34:17 CDT
Thu Oct  4 11:27:17 UTC 2007  Jeff Parsons <j.parsons@vanderbilt.edu>

        * PIM/PICML/interpreters/IDLImporter/adding_visitor.cpp(add_entrypoint):
        
          Removed the leading underscore from the suffixes added
          to the entrypoint function names for home servant and 
          home executor. This change brings PICML more in line with
          what is generated by the CIAO CIDL compiler. Thanks to
          Abdullah Sowayan <abdullah.sowayan@lmco.com> for pointing
          out this discrepancy.
Comment 6 Abdul Sowayan 2007-10-04 15:36:37 CDT
Changed the summary of this ticket and its severity. The CIAO-CoSMIC conflict has been addressed. However, CIAO entry point function are incompliant with the OMG specifications.
Comment 7 Will Otte 2009-07-01 12:14:55 CDT
CIAO/DAnCE now adhere better to the requirements of the spec.