Specifying an abstract machine

A process virtual machine specifies operations for executing programs, unlike a system virtual machine hosting a complete guest operating system. Its contract can define values, instructions, calls, and exceptions while leaving implementation details open. Different hosts can implement that contract without exposing identical physical processors to the program.

References: [1] [2]

Representing execution state

The Java Virtual Machine uses frames containing local variables and operand stacks, alongside runtime areas such as the heap. Instructions transform this state. WebAssembly also describes many operations through a stack model, but its types, storage rules, and instruction meanings differ. Sharing an abstract-machine approach does not make the formats interchangeable.

References: [1] [2]

Separating semantics from strategy

The JVM specification permits internal optimizations, including translation of virtual instructions into machine code. A virtual machine may interpret instructions or combine interpretation with compilation. The virtual contract specifies observable behavior; it does not require one software-dispatch operation for every instruction throughout the lifetime of a program.

References: [1]

The boundary of portability

Portable instructions are only one requirement for portability. Libraries, host interfaces, files, and resource limits can still vary. Limbo’s Dis and Guile’s execution system likewise provide their own contracts. Distinguishing source language, virtual instruction set, and host services reveals which part of a program actually requires adaptation.

References: [1] [2]