> Is there any alternative to JVM exists as research product, like a 2
> address or 3 address instruction set VM ? Ofcourse it won't be able to
[quoted text clipped - 5 lines]
> I am not looking for a commercial product, even any research
> implementation or a IEEE/ ACM paper will help me ...
The only one that I know of is a commercial product, sorry. Investigate
TAO's "Intent" platform (http://tao-group.com). Their VM is (or was, the
last time I looked) sort of three-register RISC-like, and they transcode
java, if you want that. They've been doing this since the early nineties.
You might also want to try telling GNU's GJC to compile for a MIPS (or
perhaps Knuth's MMIX) or PowerPC or similar target. Then all you need is
an appropriate simulator. Qemu might do that job OK for you.
There might also be some milage to be had in the LLVM (low level virtual
machine) infrastructure: (http://llvm.org). LLVM's home page doesn't
indicate that it supports Java at the moment, but since it's C and C++
front ends are somehow GCC-based, then maybe GJC wouldn't be too much of a
stretch.
Cheers,

Signature
Andrew
toton - 19 Jul 2006 11:18 GMT
> > Is there any alternative to JVM exists as research product, like a 2
> > address or 3 address instruction set VM ? Ofcourse it won't be able to
[quoted text clipped - 25 lines]
> --
> Andrew
Thanks for the quick reply. I will look at LLVM. GCJ is too big to
investigate it's code. Basically I was looking how to translate a
language grammer tree to a 2-address / 3-address instruction set. It is
not very difficult for stack machine, but creates some difficulty for a
2-address/3-address machine.
So I was looking for the detail. Most of the new VM's are coming as
stack machine (Java/ .NET etc), while most of the real machines are
2-address/3-address (except mobile/PDA etc). Thus JIT compilation is
little difficult as it needs to get transformed from stack ISA to these
formats. Also it looses certain information while it makes stack code
(.class files). So I was investigating how it can make a 2/3 address
class file from Parse Tree directly.
Again thanks for the reply.
abir
Thomas Hawtin - 19 Jul 2006 19:06 GMT
> Thanks for the quick reply. I will look at LLVM. GCJ is too big to
> investigate it's code. Basically I was looking how to translate a
> language grammer tree to a 2-address / 3-address instruction set. It is
> not very difficult for stack machine, but creates some difficulty for a
> 2-address/3-address machine.
As a rough first cut, treat registers like memory locations in the stack?
> So I was looking for the detail. Most of the new VM's are coming as
> stack machine (Java/ .NET etc), while most of the real machines are
[quoted text clipped - 3 lines]
> (.class files). So I was investigating how it can make a 2/3 address
> class file from Parse Tree directly.
The processor of choice for mobiles and PDAs is the ARM series. They
typically have a (mostly) 2-operand instruction set for compactness, and
an underlying (mostly) 3-operand instruction set for performance. I
assume most of the competitors have either 2 or 3-operand instruction sets.
Assuming you are going to produced optimised code, I don't suppose it
makes much difference what form it is in. Stack based is presumably less
complicated to deal with.
Tom Hawtin

Signature
Unemployed English Java programmer
http://jroller.com/page/tackline/
> Is there any alternative to JVM exists as research product, like a 2
> address or 3 address instruction set VM ? Ofcourse it won't be able to
[quoted text clipped - 5 lines]
> I am not looking for a commercial product, even any research
> implementation or a IEEE/ ACM paper will help me ...
I don't fully understand the question, but there's the SableVM project:
http://sablevm.org/
One of the subprojects within SableVM is Soot:
http://www.sable.mcgill.ca/soot/
<quote>
Soot is a Java optimization framework. It provides four intermediate
representations for analyzing and transforming Java bytecode:
1. Baf: a streamlined representation of bytecode which is simple to
manipulate.
2. Jimple: a typed 3-address intermediate representation suitable for
optimization.
3. Shimple: an SSA variation of Jimple.
4. Grimp: an aggregated version of Jimple suitable for decompilation and
code inspection.
</quote>
Perhaps the Jimple representation will be useful to you?
- Oliver