Discussion:
Interface Repository
(too old to reply)
graham
2010-11-23 09:30:27 UTC
Permalink
also sent to ace-users...

can anybody help me out here?

----------------
Hi,

I need to populate and navigate the iterface repository based on our
IDL. The goal is to connect to the IFR after populated and navigate
it
so I can generate some code. This might seem like overkill but I need
some means of parising our IDL and generating various functions
(toString for example, corbaToNative, nativeToCorba etc. etc.). At
the
moment all this stuff is hand crafted and error prone. We're about to
take a big IDL hit (enormous changes to IDL) and if I can automate
this stuff it will make 2 weeks work and automate it.


So, can anybody tell me if there's a TAO demo that navigates the IFR?
If yes, I can put the code generation bits in place achieve our goal.


I looked at antlr and it seems like a whole lot of work to achieve
the
same.


If anybody has any ideas or suggestions, don't hesitate. I doubt i'm
the first to do this kind of stuff.


cheers and have a nice day


GrahamO
Duncan Grisby
2010-11-23 10:20:43 UTC
Permalink
Post by graham
I need to populate and navigate the iterface repository based on our
IDL. The goal is to connect to the IFR after populated and navigate
it so I can generate some code. This might seem like overkill but I
need some means of parising our IDL and generating various functions
(toString for example, corbaToNative, nativeToCorba etc. etc.). At
the moment all this stuff is hand crafted and error prone. We're
about to take a big IDL hit (enormous changes to IDL) and if I can
automate this stuff it will make 2 weeks work and automate it.
If what you want to do is to statically generate code from your IDL, I
would expect it to be much less work to implement a back-end for an
IDL compiler, rather than do it by crawling the interface repository.

I don't know how easy it is to add a new back-end to TAO's IDL
compiler, but it's dead simple with omniORB's compiler, omniidl. The
back-ends are written in Python. You can see documentation about the
compiler here:

http://omniorb.sourceforge.net/omni41/omniidl.html

Cheers,

Duncan.
--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --
graham
2010-11-24 10:20:34 UTC
Permalink
Post by Duncan Grisby
Post by graham
I need to populate and navigate the iterface repository based on our
IDL. The goal is to connect to the IFR after populated and navigate
it so I can generate some code. This might seem like overkill but I
need some means of parising our IDL and generating various functions
(toString for example, corbaToNative, nativeToCorba etc. etc.). At
the moment all this stuff is hand crafted and error prone. We're
about to take a big IDL hit (enormous changes to IDL) and if I can
automate this stuff it will make 2 weeks work and automate it.
If what you want to do is to statically generate code from your IDL, I
would expect it to be much less work to implement a back-end for an
IDL compiler, rather than do it by crawling the interface repository.
I don't know how easy it is to add a new back-end to TAO's IDL
compiler, but it's dead simple with omniORB's compiler, omniidl. The
back-ends are written in Python. You can see documentation about the
 http://omniorb.sourceforge.net/omni41/omniidl.html
Cheers,
Duncan.
--
 -- Duncan Grisby         --
   --http://www.grisby.org--
Thanks Duncan,

I'm trying to get a solution either ORB neutral (ANTLR which seems
overkill) or with TAO. I don't want to introduce a dependency on
another ORB/runtime in our build setup...

I know IONA used to have an ifr_demo that navigated the IFR and
"pretty printed" its contents. If I can get that, I think it will be
simple enough from there.

cheers

Graham
Duncan Grisby
2010-11-24 10:31:02 UTC
Permalink
Post by graham
I'm trying to get a solution either ORB neutral (ANTLR which seems
overkill) or with TAO. I don't want to introduce a dependency on
another ORB/runtime in our build setup...
We're only talking about a compiler, so there's no dependency on any
other runtime. The solution would still be ORB neutral. Certainly
implementing your own whole compiler would be overkill compared to
using one that's already been implemented.
Post by graham
I know IONA used to have an ifr_demo that navigated the IFR and
"pretty printed" its contents. If I can get that, I think it will be
simple enough from there.
Fair enough. My only comment is that the code will be a lot more ugly
than a compiler back-end, due to the IfR interfaces and their mapping
to C++.

Cheers,

Duncan.
--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --
graham
2010-11-24 13:47:54 UTC
Permalink
Post by Duncan Grisby
Post by graham
I'm trying to get a solution either ORB neutral (ANTLR which seems
overkill) or with TAO. I don't want to introduce a dependency on
another ORB/runtime in our build setup...
We're only talking about a compiler, so there's no dependency on any
other runtime. The solution would still be ORB neutral. Certainly
implementing your own whole compiler would be overkill compared to
using one that's already been implemented.
Post by graham
I know IONA used to have an ifr_demo that navigated the IFR and
"pretty printed" its contents. If I can get that, I think it will be
simple enough from there.
Fair enough. My only comment is that the code will be a lot more ugly
than a compiler back-end, due to the IfR interfaces and their mapping
to C++.
Cheers,
Duncan.
--
 -- Duncan Grisby         --
   --http://www.grisby.org--
right, you've sold it to me! :) Could you tell me if there any
starting point docs out there that I need to read to get started? I
dont do this every day of the week so I need all the help I can
get :)


I'll download the docs for omni this pm and mull them over tonight. If
you have any starting point demos/tutorials , I'm a taker :)

Cheers

Graham
Duncan Grisby
2010-11-30 10:37:08 UTC
Permalink
Post by graham
right, you've sold it to me! :) Could you tell me if there any
starting point docs out there that I need to read to get started? I
dont do this every day of the week so I need all the help I can
get :)
If you've not found it already, take a look at example.py and
dump.py in the src/tool/omniidl/python/omniidl_be directory in the
omniORB distribution. Those show simple compiler back-ends. Other than
that, the "omniidl for back-end authors" document tells you most
things you might need to know.

Cheers,

Duncan.
--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --
graham
2010-11-30 17:20:07 UTC
Permalink
Post by Duncan Grisby
right, you've sold it to me! :) Could you tell me if  there any
starting point docs out there that I need to read to get started? I
dont do this every day of the week so I need all the help I can
get :)
If you've not found it already, take a look at example.py and
dump.py in the src/tool/omniidl/python/omniidl_be directory in the
omniORB distribution. Those show simple compiler back-ends. Other than
that, the "omniidl for back-end authors" document tells you most
things you might need to know.
Cheers,
Duncan.
--
 -- Duncan Grisby         --
   --http://www.grisby.org--
thanks duncan,

this is going to save our life. with each new IDL iteration they
currently do corba to native mapping manually (which is obviously
error prone) and also they use a 3rd party utility to print corba data
structures (IONA , the legendary Ciaran Mc Hales IDLGen). there is a
huge IDL iteration on its way and I have no intention of doing all
that mapping lark by hand :)

Once I get the time to read up some python tutorials (yes, I know its
shocking I haven't already used python! :) ) i can attack this stuff.

I read those docs you mention and they are awesome. nice job
omniorb :)

cheers

GrahamO

Continue reading on narkive:
Loading...