comp.lang.ada
 help / color / mirror / Atom feed
* Ada to byte-code compiler works as advertised
@ 1996-09-27  0:00 Mike Stark
  1996-09-28  0:00 ` Ray Blaak
                   ` (3 more replies)
  0 siblings, 4 replies; 58+ messages in thread
From: Mike Stark @ 1996-09-27  0:00 UTC (permalink / raw)



I have been playing with the Intermetrics AppletMagic tool, which
compiles Ada source into Java byte code, and I have successfully met all
the objectives of my experimentation except for ones that I haven't 
gotten around to but that I expect no problems with.

The main purpose of this post is to let people know that this tool works
as advertised and to thank Tucker Taft of Intermetrics for his help
in figuring out the undocumented capabilities of the beta versions
I've been using.  Intermetrics has also developed browsable
documentation for the Ada interface to the Java APIs that is similar
in concept to the Java API documentation, as well as a software
development environment that is also Java byte code.  I haven't
had a chance to play with (evaluate, I mean ;) these features, but
they look nice when you scan the Intermetrics Web page 
(http://www.inmet.com:80/javadir/download/).

For those who are more interested in details, I wrote up a summary
of what I've done below the line.  For those who just want to know
if AppletMagic is a good tool -- I'd say it's a great one, and am
looking forward to seeing non-beta versions.

Mike

-----------------------------------------------------------------
My objectives were

1.  Have a Java applet call Ada code.  The application we have been
working with is to draw a satellite ground track over a world map.  The
graphics is coded in Java, and the computation of latitude and longitude
are computed in Ada.  This applet has been tested with the flight
dynamics state as package body variables.  The interface to Ada and the
.class files compiled from Ada work fine, but we are still debugging the
graphics that are written in Java.  When this is done, the applet will
be available from the Goddard Space Flight Center Flight Dynamics 
Division WWW page (http://fdd.gsfc.nasa.gov/).  I will post an 
announcement when this is done.

2.  Write a Java class that is called from Ada.  This was easy to do
based on the AppletMagic documentation. This is done using the 
"java2ada" tool on the compiled .class file.  The only undocumented 
step is that you need to run the "adareg" tool to register the output
from java2ada with the compilation library, so that the calling routines
can import the resulting package.

3.  Write a class in Ada that is callable from Java.  This was done
by replacing the package implementation discussed above which generated
 a Java class with static functions) with an implementation that
extended java.lang.Object with a tagged private record.  Unlike the
package implementation, to get a correct record type implementation
requires the use of pragma Export for all your functions.  Once that
little undocumented issue was resolved it was easy to compile a
package containing the tagged record type, and to run javap on the 
resulting class to verify that the interface was correct.  I then
wrote a Java application to create an object of this class and use
it to generate the longitudes and latitudes for the ground track.

The only minor problem here (which I attribute entirely to the fact 
that the product is a beta version) is that my private record
components in Ada become public instance variables in the corres-
ponding Java class. This does not have any impact on how the system
runs, but to have consistent semantics between the languages the
private record components should IMO become protected instance
variables.

4.  (the part I haven't done)  Write a Java class that extends the Ada
class.  I have no real doubts that this will work, but I won't get to it
until next week. Similarly, I could write an Ada extension to the Java
class being called from Ada.  Examining the generated code leaves me
no doubt that both can be done -- I just have run out of time before the
expiration of the AM1.5 beta license.

The source code for all this work will be forwarded to Intermetrics to
include in their applet writer's guide.  I will probably finish up
my work by mid-October and send it then.




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

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

Thread overview: 58+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-09-27  0:00 Ada to byte-code compiler works as advertised Mike Stark
1996-09-28  0:00 ` Ray Blaak
1996-09-28  0:00   ` Mike Stark
1996-09-30  0:00 ` Vince Del Vecchio
1996-10-03  0:00 ` New version of AppletMagic (was Re: Ada to byte-code compiler ...) Vince Del Vecchio
1996-10-04  0:00   ` Michael Feldman
1996-10-05  0:00     ` Tucker Taft
1996-10-06  0:00     ` Matthew Heaney
1996-10-06  0:00       ` Ada on the Mac (was: AppletMagic stuff) Michael Feldman
1996-10-07  0:00         ` Larry Kilgallen
1996-10-07  0:00           ` Michael Feldman
1996-10-07  0:00             ` Larry Kilgallen
1996-10-09  0:00               ` Michael Feldman
1996-10-08  0:00             ` Richard A. O'Keefe
1996-10-09  0:00               ` Michael Feldman
1996-10-08  0:00           ` Hosting Ada on Mac (Was: Ada on the Mac) Laurent Gasser
1996-10-09  0:00             ` Michael Feldman
1996-10-08  0:00           ` Ada on the Mac (was: AppletMagic stuff) Robert Dewar
1996-10-08  0:00             ` Larry Kilgallen
1996-10-09  0:00               ` Michael Feldman
1996-10-09  0:00             ` jim hopper
1996-10-08  0:00       ` Ada and Mac (Was: New version of AppletMagic) Stan Shebs
1996-10-08  0:00         ` Larry Kilgallen
1996-10-10  0:00         ` jim hopper
1996-10-08  0:00       ` Laurent Gasser
1996-10-08  0:00         ` jim hopper
1996-10-08  0:00           ` Larry Kilgallen
1996-10-09  0:00             ` Michael Feldman
1996-10-09  0:00               ` Matthew Heaney
1996-10-11  0:00                 ` Robert Dewar
1996-10-11  0:00                   ` Matthew Heaney
1996-10-10  0:00               ` Larry Kilgallen
1996-10-09  0:00           ` Laurent Gasser
1996-10-09  0:00             ` Larry Kilgallen
1996-10-15  0:00         ` Tucker Taft
1996-10-10  0:00       ` Jon S Anthony
1996-10-10  0:00         ` Larry Kilgallen
1996-10-11  0:00         ` Michael Feldman
1996-10-14  0:00       ` Jon S Anthony
1996-10-16  0:00         ` Michael Feldman
1996-10-17  0:00           ` Larry Kilgallen
1996-10-17  0:00             ` jim hopper
1996-10-17  0:00               ` Robert Dewar
1996-10-18  0:00                 ` Larry Kilgallen
1996-10-21  0:00                   ` Michael Feldman
1996-10-21  0:00                     ` Larry Kilgallen
1996-10-22  0:00                       ` Michael Feldman
1996-10-23  0:00                       ` Steve Wall
1996-10-22  0:00                     ` Tom Halliley
1996-10-23  0:00                       ` Anita Holmgren
1996-10-24  0:00                         ` Tom Halliley
1996-10-23  0:00                       ` Jim Easterbrook
1996-10-17  0:00             ` jim hopper
1996-10-21  0:00             ` Michael Feldman
1996-10-17  0:00       ` Jon S Anthony
1996-10-21  0:00         ` Michael Feldman
1996-10-08  0:00     ` New version of AppletMagic (was Re: Ada to byte-code compiler Dr Paul Gorman
1996-10-09  0:00 ` Ada on the Mac (was: AppletMagic stuff) Stan Shebs

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