Re: Possible to write compiler to Java VM?

dewar@cs.nyu.edu (Robert Dewar)
31 Jan 1996 23:27:29 -0500

          From comp.compilers

Related articles
[15 earlier articles]
Re: Possible to write compiler to Java VM? mw@ipx2.rz.uni-mannheim.de (1996-01-30)
Re: Possible to write compiler to Java VM? salomon@silver.cs.umanitoba.ca (1996-01-30)
Re: Possible to write compiler to Java VM? bothner@cygnus.com (1996-01-30)
Re: Possible to write compiler to Java VM? tmb@best.com--Internet (1996-01-30)
Re: Possible to write compiler to Java VM? hbaker@netcom.com (1996-01-30)
Re: Possible to write compiler to Java VM? stt@henning.camb.inmet.com (1996-01-30)
Re: Possible to write compiler to Java VM? dewar@cs.nyu.edu (1996-01-31)
Re: Ada and GC jhoward@solar.sky.net (John Howard) (1996-02-01)
Re: Possible to write compiler to Java VM? rfg@monkeys.com (1996-02-01)
Re: Possible to write compiler to Java VM? ok@cs.rmit.edu.au (1996-02-01)
Re: Ada GC (was about Java VM) dave@occl-cam.demon.co.uk (Dave Lloyd) (1996-02-02)
Re: Possible to write compiler to Java VM? gmckee@cloudnine.com (1996-02-02)
Re: Ada GC (was about Java VM) boehm@parc.xerox.com (1996-02-02)
[7 later articles]
| List of all articles for this month |
From: dewar@cs.nyu.edu (Robert Dewar)
Newsgroups: comp.lang.java,comp.compilers,comp.lang.ada
Date: 31 Jan 1996 23:27:29 -0500
Organization: Courant Institute of Mathematical Sciences
References: 96-01-100 96-01-123 96-01-134
Keywords: Ada, realtime, GC

Henry said


"You might want to take a look at Erlang, a real-time language for
telephony applications, which uses GC.


See http://www.ericsson.se/cslab/erlang/overview.html


Also, see Springer LNCS 986, Proc. IWMM'95."


No one (who is aware) would contest that real-time garbage collection
is possible, and of course there are examples (many of them from the
mid-70's), but there is still considerable doubt about the
applicability of the use of GC in general real-time applications.


That is why mainstream languages aimed at high efficiency code,
including real-time support (and I include C, C++ and Ada in this
category), have shied away from GC so far. Ada is a language whose
design is intended to be based on well-established technology where a
wide consensus exists. That wide consensus simply does not exist for
GC+Realtime yet. Henry of course is one of the advocates of this
approach, but this advocacy has not yet been successful in convincing
the real-time community as a whole (for many of whom, ANY kind of
dynamic allocation is still worrisome)


It may well be that Java pushes the envelope on this, it certainly has
the potential of being one of the first really widely used GC
languages. The current implementation approach of course is quite
unsuitable for embedded real-time applications, but there is nothing
in JAVA that makes it impossible to attempt to produce a compiler that
would be suitable. Remember that JBC has nothing to do with the Java
language, it is just one possible implementation approach. Certainly
if Java is successful, one would expect high-efficiency compilers to
appear.


Whether these will support hard realtime applications remains to be
seen (Madonna slightly out of sync occasinally is not exactly the same
as a rocket blowing up due to a missed deadline :-)


It is interesting to note that the designers of Ada 83 expected that
GC implementations of Ada would be widespread (there is even a pragma
in the language, Controlled, to suppress automatic GC).


For many reasons, this did not happen. One reason is that Ada
intentionally includes low level features that allow a user to muck at
a very low level. Frankly the idea of GC in close proximity to low
level code like this which can disturb the critical data structues on
which GC depends is quite worrisome from a reliability point of view.


I have a lot of experience with GC and GC languages from my work on
SPITBOL (see article in 1977 SP&E for details), and I agree that GC is
a highly desirable feature in general, but this issue of mixture with
low level features is definitely worrisome.


I actually suggested during the Ada 95 design that we require GC in
the context of the Information Systems annex, but even that came
nowhere near to achieving consensus.


I would certainly expect someone to add GC to GNAT at some point
(there is already a GC implementation of Modula-3 that works on the
VAX with GCC).
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.