comp.lang.ada
 help / color / mirror / Atom feed
* About Interfacing Ada to other languages.
@ 2001-07-30 17:08 Didier Utheza
  2001-07-30 21:13 ` Ehud Lamm
  2001-08-03 19:47 ` Robert Dewar
  0 siblings, 2 replies; 6+ messages in thread
From: Didier Utheza @ 2001-07-30 17:08 UTC (permalink / raw)


Hello everyone,
I would like to interface Ada to Prolog and Eiffel. I cannot find extended
information on the topic besides the ref. manual (its reading is more for
knowledgeable people on the subject). Can anyone orient me toward some
documentations or books to consult?
Thanks in advance.
			Didier Utheza.




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

* Re: About Interfacing Ada to other languages.
  2001-07-30 17:08 About Interfacing Ada to other languages Didier Utheza
@ 2001-07-30 21:13 ` Ehud Lamm
  2001-07-30 23:39   ` Didier Utheza
  2001-08-03 19:47 ` Robert Dewar
  1 sibling, 1 reply; 6+ messages in thread
From: Ehud Lamm @ 2001-07-30 21:13 UTC (permalink / raw)



Didier Utheza <ddutheza@bu.edu> wrote in message
news:Pine.A41.4.10.10107301302040.93338-100000@acstmp.bu.edu...
> Hello everyone,
> I would like to interface Ada to Prolog and Eiffel. I cannot find extended
> information on the topic besides the ref. manual (its reading is more for
> knowledgeable people on the subject). Can anyone orient me toward some
> documentations or books to consult?
> Thanks in advance.
> Didier Utheza.
>

These are not languages for which the Ada RM defines Interface packages,
whihc make life easier and portable.(you have C, Cobol and Fortran). I guess
the best apporach is to check whether the Eiffel/Prolog implementations you
want to use have some C interface, and use that to connect to the Ada
program (via Interfaces.C).
Another apporach, these days, is to use a component architecture, like COM,
and then utilize something like GNATCOM, which allows you to interface to a
COM component from Ada.
(I thin that if you paln to target a JVM environment you may some more
options, but  I haven't really checked).

Maybe if you give more details someone would be able to give more specific
advice.

Ehud Lamm





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

* Re: About Interfacing Ada to other languages.
  2001-07-30 21:13 ` Ehud Lamm
@ 2001-07-30 23:39   ` Didier Utheza
  2001-07-31  0:01     ` Ed Falis
  0 siblings, 1 reply; 6+ messages in thread
From: Didier Utheza @ 2001-07-30 23:39 UTC (permalink / raw)


Thanks for your answer Ehud,
My wish would be to be able to call directly a Prolog module from an ada
system without having to deal with a C interface. By that I mean using a
Prolog module called from an Ada system that would be able to exchange
information with it. This should be possible in theory since there are
interfaces with Fortran and Cobol. One of the advantage of an Ada/Prolog
system is (if I can say) to give a mind to a body.
A similar thing is hapening with java/Prolog as you said but it is
more network oriented if i understood well. In our case, the goal would be
to create simple models of living systems. From what you said, it looks
like the simple solution would be to pass through a c interface since, for
example, SWI-prolog is ready for it. But it would be nice one day to be
able not to use c for such work. Interfacing between two different code is
difficult enough without having to introduce the criptic aspect of c.
I have at my disposition Feldman and Koffman 's Ada95 book as well as
Barnes'book, but the topic of language interfacing is beyond them.
Thanks again anyway.
				Didier Utheza.





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

* Re: About Interfacing Ada to other languages.
  2001-07-30 23:39   ` Didier Utheza
@ 2001-07-31  0:01     ` Ed Falis
  2001-08-02 16:44       ` Didier Utheza
  0 siblings, 1 reply; 6+ messages in thread
From: Ed Falis @ 2001-07-31  0:01 UTC (permalink / raw)


You might look into putting together an Ada binding to SWIG (do a net
search).  It's been used with other languages for this purpose.

- Ed

\Didier Utheza wrote:
> 
> Thanks for your answer Ehud,
> My wish would be to be able to call directly a Prolog module from an ada
> system without having to deal with a C interface. By that I mean using a
> Prolog module called from an Ada system that would be able to exchange
> information with it. This should be possible in theory since there are
> interfaces with Fortran and Cobol. One of the advantage of an Ada/Prolog
> system is (if I can say) to give a mind to a body.
> A similar thing is hapening with java/Prolog as you said but it is
> more network oriented if i understood well. In our case, the goal would be
> to create simple models of living systems. From what you said, it looks
> like the simple solution would be to pass through a c interface since, for
> example, SWI-prolog is ready for it. But it would be nice one day to be
> able not to use c for such work. Interfacing between two different code is
> difficult enough without having to introduce the criptic aspect of c.
> I have at my disposition Feldman and Koffman 's Ada95 book as well as
> Barnes'book, but the topic of language interfacing is beyond them.
> Thanks again anyway.
>                                 Didier Utheza.



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

* Re: About Interfacing Ada to other languages.
  2001-07-31  0:01     ` Ed Falis
@ 2001-08-02 16:44       ` Didier Utheza
  0 siblings, 0 replies; 6+ messages in thread
From: Didier Utheza @ 2001-08-02 16:44 UTC (permalink / raw)
  To: Ed Falis

You are right ed,
SWI-Prolog has a binding to java (of course) and C++. The source code is
avalaible for both and the manual is relatively extensive. There are also
two Prolog interpreters written in Ada linked at AdaPower, but the problem
is maintainability and completness (way above what I will be able to do
ever). SWI-Prolog is pretty much up to date, they do a very good job in
parallel to the GNU-Prolog.
Theres is a GUI-declarative library (XPCE) that is very easy to use (a
message is just a message). The handicap of Prolog has always been the
executable and interfacing with the world. And this is changing with Java
and C++ (again and always the C family).
Of course, Prolog induced the generation of new logical languages
(Mercury,...). But Prolog is still one of the easiest to learn and AWM can
be built from any type of procedural languages.
My only deception is the lack of documentation from Ada on the hosting of
other languages (besides FORTRAN, COBOL and c the classical trio). This
was a requirement since Ada83, it is one of the strength of Ada over
others, since it was included from the beginning in its conception. But it
will stay a matter for the specialists by lack of introducery material
specific to Ada.
To conclude this thread, I thank you again for your answers. I will see
what is possible from there with my capabilities (very small). It could be
interesting as a module for the AdaOS. I wonder what people in AI that had
to use Ada with LISP or Prolog think about that?
Sincerely,
				Didier Utheza.





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

* Re: About Interfacing Ada to other languages.
  2001-07-30 17:08 About Interfacing Ada to other languages Didier Utheza
  2001-07-30 21:13 ` Ehud Lamm
@ 2001-08-03 19:47 ` Robert Dewar
  1 sibling, 0 replies; 6+ messages in thread
From: Robert Dewar @ 2001-08-03 19:47 UTC (permalink / raw)


Didier Utheza <ddutheza@bu.edu> wrote in message news:<Pine.A41.4.10.10107301302040.93338-100000@acstmp.bu.edu>...
> Hello everyone,
> I would like to interface Ada to Prolog and Eiffel. I cannot find extended
> information on the topic besides the ref. manual (its reading is more for
> knowledgeable people on the subject). Can anyone orient me toward some
> documentations or books to consult?
> Thanks in advance.
> 			Didier Utheza.

A general answer to such questions is to find out how you would
interface C to the language in question. Most languages have some
thoughts about interfacing to C. If interface to C is not possible,
then you are not going to get anywhere.

If you do know how to interface to C, then just make the Ada code look
like C, using pragma Import (C,...) and pragma Export (C,...) as
required.



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

end of thread, other threads:[~2001-08-03 19:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-30 17:08 About Interfacing Ada to other languages Didier Utheza
2001-07-30 21:13 ` Ehud Lamm
2001-07-30 23:39   ` Didier Utheza
2001-07-31  0:01     ` Ed Falis
2001-08-02 16:44       ` Didier Utheza
2001-08-03 19:47 ` Robert Dewar

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