comp.lang.ada
 help / color / mirror / Atom feed
* Ada95 & C++ Interfacing
@ 1996-08-01  0:00 Nigel Williams
  1996-08-02  0:00 ` Jon S Anthony
  1996-08-03  0:00 ` Robert Dewar
  0 siblings, 2 replies; 3+ messages in thread
From: Nigel Williams @ 1996-08-01  0:00 UTC (permalink / raw)



Hi There,

I am currently designing a new distributed Air Traffic control system
for the European Commission. At the heart of this system will be an API
which will provide the services necessary to support the system's
architectural model; this is based on the client/server model. Further
the API will have to support existing C, C++, Ada 83 and FORTRAN code.
Although CORBA would be an excellent choice, this is currently not an
option (silly isn't it).

I am considering implementing this layer in C++ in order to take
advantage of the characteristics of OOP, particularly inheritance &
polymorphism. In order to re-use existing Ada 83 legacy systems, I am
trying to gather information and refernece material concerning the
interfacing between Ada95 & C++. I have been looking at the ex6_main
example distributed with the GNAT source. This is a start but I am
unable to locate documentation relating to pragma CPP_Class, CPP_Vtable,
CPP_Virtual etc.
Can you help ?

Is the C++ interface part of the language ?
Will all Ada95 compilers be required to support this interface ?

Initially I will be developing ideas using gcc & gnat.
Eventually I will probably develop the system using Rational Apex.
Does gdb support debugging of mixed language systems ?

I would appreciate help and guidance on this matter.

Nigel Williams
Room B1013
ATC Systems Group
Defence Research Agency
Malvern
Worcestershire
WR14 3PS. UK
Tel:    (44) 1684 896635
Fax:    (44) 1684 894109
E-Mail: nigel.williams@dra.hmg.gb




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Ada95 & C++ Interfacing
  1996-08-01  0:00 Ada95 & C++ Interfacing Nigel Williams
@ 1996-08-02  0:00 ` Jon S Anthony
  1996-08-03  0:00 ` Robert Dewar
  1 sibling, 0 replies; 3+ messages in thread
From: Jon S Anthony @ 1996-08-02  0:00 UTC (permalink / raw)



In article <3200BA54.529A@dra.hmg.gb> Nigel Williams <nigel.williams@dra.hmg.gb> writes:

> I am currently designing a new distributed Air Traffic control system
>...
> Although CORBA would be an excellent choice, this is currently not an
> option (silly isn't it).

Yes.  Most unfortunate.  Why is it not an option?


> I am considering implementing this layer in C++ in order to take
> advantage of the characteristics of OOP, particularly inheritance &

Why not use Ada95?  It has all that.  It will also be a better "glue"
as it has the interface capability to other languages much more than
C++ (for example, Fortran, C, and of course, Ada83 right out of the
box...)

Also, you could try the distributed systems implementation for GNAT,
since you are using GCC based tools anyway.  Then you could have your
distributed system/object stuff by means of Ada95 and for the legacy
bits you could have Ada95 wrappers utilizing the Interfaces
capabilities of Ada95.  Seems like a much more viable route.

/Jon
-- 
Jon Anthony
Organon Motives, Inc.
1 Williston Road, Suite 4
Belmont, MA 02178

617.484.3383
jsa@organon.com





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Ada95 & C++ Interfacing
  1996-08-01  0:00 Ada95 & C++ Interfacing Nigel Williams
  1996-08-02  0:00 ` Jon S Anthony
@ 1996-08-03  0:00 ` Robert Dewar
  1 sibling, 0 replies; 3+ messages in thread
From: Robert Dewar @ 1996-08-03  0:00 UTC (permalink / raw)



Nigel asks

Is the C++ interface part of the language ?

  No, it could not possibly be. Ada 95 is an ISO standard language, and an
  ISO standard cannot reference non-standardized languages that are in a
  state of flux!

  However, GNAT does implement an interface to C++ that can be tailored
  to multiple C++ compilers. So far we have interfaced to g++ (the gcc
  version of C++) and to SGI Delta C++.

Will all Ada95 compilers be required to support this interface?

  Certainly not, because there is nothing in the language. However, the ARA,
  which is an industry consortium is developing guidelines for such interfaces
  that we hope all Ada 95 compilers will follow. The work in developing the
  ACE (Ada Common Environment), which defines common bindings, interfaces,
  pragas, attributes etc. is an open effort in which all the major Ada vendors
  are involved. The intention is that we try to encourage as much commonality
  as possible, but certainly there is no requirement. In fact Ada 95 compilers
  are not required to support anything. You can take a Pascal compiler and
  call it an Ada 95 compiler if you like -- there are no Ada police around
  to come and stop you :-)

  Now no one requires that you have NIST validate the compiler, but if you
  do, then of course you must pass the validation suite, but this suite
  certainly will not test C++ interfaces, since it refers only to the standard.

Initially I will be developing ideas using gcc & gnat.
Eventually I will probably develop the system using Rational Apex.

  Note that this is not necessarily an either/or, some of our big customers
  are experimenting with developing using Rational Apex and then using GNAT
  for the actual final compilation and delivery. Apex with its RCI (remote
  compiler interface) is well set up for such usage, and indeed Rational has
  developed an RCI interface specifically for GNAT. You will have to wait for
  the full Ada 95 version of APEX to be available, but when it is, this will
  definitely be one possible approach.

Does gdb support debugging of mixed language systems ?

  Definitely yes. gdb knows which language the current unit is written in,
  and adapts its syntax and behavior to match the current language.






^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1996-08-03  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-08-01  0:00 Ada95 & C++ Interfacing Nigel Williams
1996-08-02  0:00 ` Jon S Anthony
1996-08-03  0:00 ` Robert Dewar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox