SableVM

Last updated
SableVM
SableVM Logo.png
Developer(s) Sable Research Group at McGill University
Final release
1.13 / March 30, 2007;14 years ago (2007-03-30)
Repository OOjs UI icon edit-ltr-progressive.svg
Operating system Cross-platform
Type Java Virtual Machine
License GNU Lesser General Public License
Website sablevm.org

SableVM was a clean room implementation of Java bytecode interpreter implementing the Java virtual machine (VM) specification, second edition. SableVM was designed to be a robust, extremely portable, efficient, and fully specifications-compliant (JVM spec, Java Native Interface, Invocation interface, Debug interface, etc.) Java Virtual Machine that would be easy to maintain and to extend.[ citation needed ] It is now no longer being maintained.

Contents

The implementation was a part of the effort in the early 2000s to break the Java ecosystem free from Sun Microsystems's control. [1] [2] [3]

Overview

The core engine is an interpreter which used ground-breaking techniques to deliver performance that can approach that of a "naive" just-in-time (JIT) compiler, while retaining the software engineering advantages of interpreters: portability, maintainability and simplicity. [4] [5] This simplicity makes SableVM's source code very accessible and easy to understand for new users/programmers.

SableVM is Free Software — it is licensed under the GNU Lesser General Public License (LGPL). It also makes use of GNU Classpath (copyrighted by the FSF) which is licensed under the GNU General Public License with linking exception.

SableVM is the first open-source virtual machine for Java to include the support for JVMDI (Java Virtual Machine Debugging Interface) and JDWP (Java Debug Wire Protocol).[ citation needed ] These standard Java debugging interfaces are used for example by Eclipse to provide a rich and user-friendly Java development environment.

Java Intermediate Language

Some versions of the SableVM use Java Intermediate Language, an intermediate language (which is a subset of XML) representing the type structure of a Java program. The language was proposed by the team of SableVM in McGill University in January 2002 to aid the analysis of a Java program with the goals of scalability and good performance. [6] [7] The language has not been widely adopted.

Consider the following piece of Java code.

publicMyClassimplementsMyInterfaceextendsMySupperClass{intMyField;voidMyMethod(doublex,doubley){doublez;z=x+y;this.MyField=z}}

This piece can be expressed in the language, as follows:

<jil><classname="MyClass"extends="MySupperClass"><modifiers><modifiername="public"/></modifiers><interfaces><interfacename="myinterface"/></interfaces><fields><fieldname="MyField"type="int"/></fields><methods><methodname="MyMethod"returntype="void"><parameters><parametername="x"type="double"/><parametername="y"type="double"/></parameters><locals><localname="z"type="double"/></locals><statements><!-- Each statement is expressed by some intermediate format for           code generator like three address code. In the below           a language called baf is used. --><baf><![CDATA[          $r2 = $r0 + $r1;          this.MyField = (double) $r2;        ]]><!-- Here, we are assuming x is expressed as $r0, y $r1 and z $r2. --></baf></statements></method></methods></class></jil>

See also

Related Research Articles

Java is a high-level, class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible. It is a general-purpose programming language intended to let application developers write once, run anywhere (WORA), meaning that compiled Java code can run on all platforms that support Java without the need for recompilation. Java applications are typically compiled to bytecode that can run on any Java virtual machine (JVM) regardless of the underlying computer architecture. The syntax of Java is similar to C and C++, but has fewer low-level facilities than either of them. The Java runtime provides dynamic capabilities that are typically not available in traditional compiled languages. As of 2019, Java was one of the most popular programming languages in use according to GitHub, particularly for client-server web applications, with a reported 9 million developers.

Java virtual machine Virtual machine

A Java virtual machine (JVM) is a virtual machine that enables a computer to run Java programs as well as programs written in other languages that are also compiled to Java bytecode. The JVM is detailed by a specification that formally describes what is required in a JVM implementation. Having a specification ensures interoperability of Java programs across different implementations so that program authors using the Java Development Kit (JDK) need not worry about idiosyncrasies of the underlying hardware platform.

In computer science, an interpreter is a computer program that directly executes instructions written in a programming or scripting language, without requiring them previously to have been compiled into a machine language program. An interpreter generally uses one of the following strategies for program execution:

  1. Parse the source code and perform its behavior directly;
  2. Translate source code into some efficient intermediate representation and immediately execute this;
  3. Explicitly execute stored precompiled code made by a compiler which is part of the interpreter system.

Parrot is discontinued software that implements a register-based process virtual machine designed to run dynamic languages efficiently. It is possible to compile Parrot assembly language and Parrot intermediate representation to Parrot bytecode and execute it. Parrot is free and open source software.

Bytecode, also termed portable code or p-code, is a form of instruction set designed for efficient execution by a software interpreter. Unlike human-readable source code, bytecodes are compact numeric codes, constants, and references that encode the result of compiler parsing and performing semantic analysis of things like type, scope, and nesting depths of program objects.

The GNU Compiler for Java (GCJ) is a free compiler for the Java programming language. It was part of the GNU Compiler Collection for over ten years but as of 2017 it is no longer maintained and will not be part of future releases.

In computing, just-in-time (JIT) compilation is a way of executing computer code that involves compilation during execution of a program rather than before execution. Most often, this consists of source code or more commonly bytecode translation to machine code, which is then executed directly. A system implementing a JIT compiler typically continuously analyses the code being executed and identifies parts of the code where the speedup gained from compilation or recompilation would outweigh the overhead of compiling that code.

GNU Classpath

GNU Classpath is a free software implementation of the standard class library for the Java programming language. Most classes from J2SE 1.4 and 5.0 are implemented. Classpath can thus be used to run Java-based applications. GNU Classpath is a part of the GNU Project. It was originally developed in parallel with libgcj due to license incompatibilities, but later the two projects merged.

Apache Harmony is a retired open source, free Java implementation, developed by the Apache Software Foundation. It was announced in early May 2005 and on October 25, 2006, the Board of Directors voted to make Apache Harmony a top-level project. The Harmony project achieved 99% completeness for J2SE 5.0, and 97% for Java SE 6. The Android operating system has historically been a major user of Harmony, although since Android Nougat it increasingly relies on OpenJDK libraries.

Java Card refers to a software technology that allows Java-based applications (applets) to be run securely on smart cards and similar small memory footprint devices. Java Card is the tiniest of Java platforms targeted for embedded devices. Java Card gives the user the ability to program the devices and make them application specific. It is widely used in ATM cards. The first Java Card was introduced in 1996 by Schlumberger's card division which later merged with Gemplus to form Gemalto. Java Card products are based on the Java Card Platform specifications developed by Sun Microsystems. Many Java card products also rely on the GlobalPlatform specifications for the secure management of applications on the card.

picoJava is a microprocessor specification dedicated to native execution of Java bytecode without the need for an interpreter or just-in-time compilation. The aim is to speed bytecode execution up by up to 20 times, compared to standard Intel CPU with a Java Virtual Machine.

Java (software platform) Set of computer software and specifications

Java is a set of computer software and specifications developed by James Gosling at Sun Microsystems, which was later acquired by the Oracle Corporation, that provides a system for developing application software and deploying it in a cross-platform computing environment. Java is used in a wide variety of computing platforms from embedded devices and mobile phones to enterprise servers and supercomputers. Java applets, which are less common than standalone Java applications, were commonly run in secure, sandboxed environments to provide many features of native applications through being embedded in HTML pages.

A programming language implementation is a system for executing computer programs. There are two general approaches to programming language implementation: interpretation and compilation.

In computer science, ahead-of-time compilation is the act of compiling an (often) higher-level programming language into an (often) lower-level language before execution of a program, usually at build-time, to reduce the amount of work needed to be performed at run time.

Dalvik is a discontinued process virtual machine (VM) in Android operating system that executes applications written for Android. Dalvik was an integral part of the Android software stack in the Android versions 4.4 "KitKat" and earlier, which were commonly used on mobile devices such as mobile phones and tablet computers, and more in some devices such as smart TVs and wearables. Dalvik is open-source software, originally written by Dan Bornstein, who named it after the fishing village of Dalvík in Eyjafjörður, Iceland.

Da Vinci Machine

The Da Vinci Machine, also called the Multi Language Virtual Machine, was a Sun Microsystems project aiming to prototype the extension of the Java Virtual Machine (JVM) to add support for dynamic languages.

The Maxine virtual machine is an open source virtual machine that is developed at the University of Manchester. It was formerly developed by Sun Microsystems Laboratories, since renamed Oracle Labs. The emphasis in Maxine's software architecture is on modular design and code reuse for flexibility, configurability, and productivity for industrial and academic virtual machine researchers. It is one of a growing number of Java virtual machines written entirely in Java in a meta-circular style. Examples include Squawk and Jikes RVM.

This article compares the application programming interfaces (APIs) and virtual machines (VMs) of the programming language Java and operating system Android.

Java bytecode is the instruction set of the Java virtual machine (JVM).

References

  1. "Sun-approved Open Source java making progress". The Inquirer. 2006-03-31. Archived from the original on December 3, 2009. Retrieved 2012-12-02.CS1 maint: unfit URL (link)
  2. "O'Reilly Network wins a Jolt; SNAP Platform gets jolted". Onlamp.com. Retrieved 2012-12-02.
  3. "Barbarians at the Gate | SYS-CON.TV". Tv.sys-con.com. 2006-09-22. Retrieved 2012-12-02.
  4. Gagnon, Etienne M., and Laurie J. Hendren. "SableVM: A research framework for the efficient execution of Java bytecode." Proceedings of the Java Virtual Machine Research and Technology Symposium. Vol. 1. 2001.
  5. Prokopski, Gregory B., Etienne M. Gagnon, and Christian Arcand. Bytecode testing framework for SableVM code-copying engine. Technical Report SABLETR-2007-9, Sable Research Group, School of Computer Science, McGill University, Montréal, Québec, Canada, 2007.
  6. Eng, David. "JIL: an extensible intermediate language." Sable Research Group, McGill University (2002).
  7. Eng, David. Combining static and dynamic data in code visualization. Vol. 28. No. 1. ACM, 2002.