I was wondering if anyone is familiar with an abstract machine that is capable of executing Java bytecode. Note I'm looking for something I can extend, and by abstract machine, I don't mean the JVM, as I need to specify the semantics.
Specifically, I am looking for a way to keep track of what is going to be on the stack at a given point of time, without actually having to simulate all the instructions by myself. Does anyone know of a good framework for this?
Consider looking at the MLJVM project. I've never really looked at the internals, but it appears to be a JVM implementation produced in such a way that one could potentially extend or experiment with the semantics.
It might be somewhat stale, and implements only a subset of the JVM, but I assume if you're really looking at experimenting with semantics you're unlikely to want the whole JVM.
Alternatively, the Jikes Research Virtual Machine is often a nice starting point. The lines between "VM" and "Abstract Machine" start to blur at some point, and I suspect Jikes is close to that line, wherever it may be.