Possible to write compiler to Java VM? (I volunteer to summarize)

fjh@cs.mu.OZ.AU
23 Jan 1996 17:27:52 -0500

          From comp.compilers

Related articles
Possible to write compiler to Java VM? (I volunteer to summarize) seibel@sirius.com (Peter Seibel) (1996-01-17)
Re: Possible to write compiler to Java VM? (I volunteer to summarize) bnm@indica.bbt.com (1996-01-18)
Re: Possible to write compiler to Java VM? (I volunteer to summarize) NoeC@po1.cpi.bls.gov (1996-01-19)
Re: Possible to write compiler to Java VM? (I volunteer to summarize) basile.starynkevitch@cea.fr (1996-01-20)
Re: Possible to write compiler to Java VM? (I volunteer to summarize) gough@dstc.qut.edu.au (John Gough) (1996-01-21)
Possible to write compiler to Java VM? (I volunteer to summarize) fjh@cs.mu.OZ.AU (1996-01-23)
Re: Possible to write compiler to Java VM? (I volunteer to summarize) andi@complang.tuwien.ac.at (Andreas Krall) (1996-01-23)
Re: Possible to write compiler to Java VM? (I volunteer to summarize) boutell.com@holly.aa.net (1996-01-23)
Re: Possible to write compiler to Java VM? (I volunteer to summarize) darius@phidani.be (Darius Blasband) (1996-01-23)
Re: Possible to write compiler to Java VM? (I volunteer to summarize) jbuck@Synopsys.COM (1996-01-25)
Re: Possible to write compiler to Java VM? (I volunteer to summarize) anicolao@cgl.UWaterloo.CA (1996-01-25)
Re: Possible to write compiler to Java VM? (I volunteer to summarize) lwall@sems.com (1996-01-25)
[4 later articles]
| List of all articles for this month |

From: fjh@cs.mu.OZ.AU
Newsgroups: comp.compilers
Date: 23 Jan 1996 17:27:52 -0500
Organization: Compilers Central
References: 96-01-037
Keywords: interpreter, prolog

> The "easy/hard/impossible" of retuning a compiler's back end to target
> Java's VM is probably most dependent on the source language's memory
> model and whether or not the language is interpretable. Languages
> like Lisp, Smalltalk, Prolog, Basic, Fortran, Pascal, Modula-n, Forth,
> and Ada are probably candidates for retargeting.


I think it would be very difficult to retarget the back end of a Prolog
compiler to Java's VM, if you care at all about efficiency, because it
is very different to the abstract machine that most Prolog compilers
for backtracking.


Most Prolog compilers use an abstract machine which is a variant of
Warren's Abstract Machine (WAM). For just one example of the sort of
issues involved, the WAM has a number of registers, and translating
these to static variables in the Java VM in a would introduce
significant inefficiency.


It would perhaps be possible to rewrite (not just "retune" or
"retarget") a compiler's backend using a different execution model that
was easier to map to the Java VM. However, that is a rather different
proposition. Even then, the lack of support for backtracking in the
Java VM poses some fundamental challenges; efficient compilation of
Prolog to a conventional high-level language is still an open
research issue.


--
Fergus Henderson WWW: http://www.cs.mu.oz.au/~fjh
fjh@cs.mu.oz.au PGP: finger fjh@128.250.37.3
--


Post a followup to this message

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